Merge branch 'nd/resolve-ref'
* nd/resolve-ref: Copy resolve_ref() return value for longer use Convert many resolve_ref() calls to read_ref*() and ref_exists() Conflicts: builtin/fmt-merge-msg.c builtin/merge.c refs.c
This commit is contained in:
@ -1259,7 +1259,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1,
|
||||
struct commit *commit;
|
||||
struct strbuf format = STRBUF_INIT;
|
||||
unsigned char junk_sha1[20];
|
||||
const char *head = resolve_ref("HEAD", junk_sha1, 0, NULL);
|
||||
const char *head;
|
||||
struct pretty_print_context pctx = {0};
|
||||
struct strbuf author_ident = STRBUF_INIT;
|
||||
struct strbuf committer_ident = STRBUF_INIT;
|
||||
@ -1304,6 +1304,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1,
|
||||
rev.diffopt.break_opt = 0;
|
||||
diff_setup_done(&rev.diffopt);
|
||||
|
||||
head = resolve_ref("HEAD", junk_sha1, 0, NULL);
|
||||
printf("[%s%s ",
|
||||
!prefixcmp(head, "refs/heads/") ?
|
||||
head + 11 :
|
||||
|
||||
Reference in New Issue
Block a user