From: Junio C Hamano Date: Fri, 21 Oct 2011 23:04:36 +0000 (-0700) Subject: Merge branch 'jc/broken-ref-dwim-fix' X-Git-Tag: v1.7.8-rc0~19 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0445ba2457b066a70334877f2d638e1f7a974220;p=git.git Merge branch 'jc/broken-ref-dwim-fix' * jc/broken-ref-dwim-fix: resolve_ref(): report breakage to the caller without warning resolve_ref(): expose REF_ISBROKEN flag refs.c: move dwim_ref()/dwim_log() from sha1_name.c --- 0445ba2457b066a70334877f2d638e1f7a974220 diff --cc refs.c index ee7e38182,448f0271f..e69ba26b7 --- a/refs.c +++ b/refs.c @@@ -4,11 -4,11 +4,10 @@@ #include "tag.h" #include "dir.h" - /* ISSYMREF=01 and ISPACKED=02 are public interfaces */ - #define REF_KNOWS_PEELED 04 - #define REF_BROKEN 010 + /* ISSYMREF=0x01, ISPACKED=0x02 and ISBROKEN=0x04 are public interfaces */ + #define REF_KNOWS_PEELED 0x10 -struct ref_list { - struct ref_list *next; +struct ref_entry { unsigned char flag; /* ISSYMREF? ISPACKED? */ unsigned char sha1[20]; unsigned char peeled[20]; @@@ -337,9 -313,9 +336,9 @@@ static void get_ref_dir(const char *sub } else if (!resolve_ref(ref, sha1, 1, &flag)) { hashclr(sha1); - flag |= REF_BROKEN; + flag |= REF_ISBROKEN; } - list = add_ref(ref, sha1, flag, list, NULL); + add_ref(ref, sha1, flag, array, NULL); } free(ref); closedir(dir);