author | Junio C Hamano <gitster@pobox.com> | |
Fri, 21 Oct 2011 23:04:36 +0000 (16:04 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 21 Oct 2011 23:04:36 +0000 (16:04 -0700) |
* 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
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
1 | 2 | |||
---|---|---|---|---|
refs.c | patch | | diff1 | | diff2 | | blob | history |
refs.h | patch | | diff1 | | diff2 | | blob | history |
sha1_name.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc refs.c
index ee7e38182a5ded3aa13e513880be7edf52a5be2b,448f0271f830ca1b38f4d077b667e7aa122657d3..e69ba26b74e430388c63af21473438468678bb4b
+++ b/refs.c
#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];
} 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);
diff --cc refs.h
Simple merge
diff --cc sha1_name.c
Simple merge