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>
Junio C Hamano committed
Sep 21, 2006 at 00:06 UTC
13e4aa90acad5738f54385c8a336f89fb6aacdd0
1 file changed
+3
-1
builtin-pack-refs.c
+3
-1
@@ -14,7 +14,9 @@ static int handle_one_ref(const char *path, const unsigned char *sha1,
14
{
15
FILE *refs_file = cb_data;
16
17
- fprintf(refs_file, "%s %s\n", sha1_to_hex(sha1), path);
17
+ /* Do not pack the symbolic refs */
18
+ if (!(flags & REF_ISSYMREF))
19
+ fprintf(refs_file, "%s %s\n", sha1_to_hex(sha1), path);
20
return 0;
21
}
22