diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-12-09 13:37:14 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-09 13:37:14 -0800 |
commit | b7f7c07977ab6e41899b835b873a1ac499eaa2b3 (patch) | |
tree | 9b20151eb2b1a325ed2c72c22fad41616d8d98db /builtin/commit.c | |
parent | Merge branch 'jc/pull-signed-tag' (diff) | |
parent | Copy resolve_ref() return value for longer use (diff) | |
download | tgif-b7f7c07977ab6e41899b835b873a1ac499eaa2b3.tar.xz |
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
Diffstat (limited to 'builtin/commit.c')
-rw-r--r-- | builtin/commit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/commit.c b/builtin/commit.c index cf1447204f..e36e9adf87 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -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 : |