summaryrefslogtreecommitdiff
path: root/builtin-pack-refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-09-21 07:06:05 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-09-21 07:06:50 (GMT)
commit13e4aa90acad5738f54385c8a336f89fb6aacdd0 (patch)
tree518b6041133d28243ad4f8a414b29613e62536ed /builtin-pack-refs.c
parent8da197755450d4f16018bd4b5486dc8ed88b0f2a (diff)
downloadgit-13e4aa90acad5738f54385c8a336f89fb6aacdd0.zip
git-13e4aa90acad5738f54385c8a336f89fb6aacdd0.tar.gz
git-13e4aa90acad5738f54385c8a336f89fb6aacdd0.tar.bz2
pack-refs: do not pack symbolic refs.
Now we can tell which one is symbolic and which one is not, it is easy to do so. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-pack-refs.c')
-rw-r--r--builtin-pack-refs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin-pack-refs.c b/builtin-pack-refs.c
index 9871089..0fc8a55 100644
--- a/builtin-pack-refs.c
+++ b/builtin-pack-refs.c
@@ -14,7 +14,9 @@ static int handle_one_ref(const char *path, const unsigned char *sha1,
{
FILE *refs_file = cb_data;
- fprintf(refs_file, "%s %s\n", sha1_to_hex(sha1), path);
+ /* Do not pack the symbolic refs */
+ if (!(flags & REF_ISSYMREF))
+ fprintf(refs_file, "%s %s\n", sha1_to_hex(sha1), path);
return 0;
}