diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-09-28 14:47:56 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-09-28 14:47:56 +0900 |
commit | 73ecdc606eedbfd98ec66d50d44b3374425fd13b (patch) | |
tree | 6a2aeb6eb0b30e1645c8af06b10c9f4ec2815dd8 /builtin/log.c | |
parent | Merge branch 'rs/mailinfo-qp-decode-fix' (diff) | |
parent | refs: pass NULL to resolve_ref_unsafe() if hash is not needed (diff) | |
download | tgif-73ecdc606eedbfd98ec66d50d44b3374425fd13b.tar.xz |
Merge branch 'rs/resolve-ref-optional-result'
Code clean-up.
* rs/resolve-ref-optional-result:
refs: pass NULL to resolve_ref_unsafe() if hash is not needed
refs: pass NULL to refs_resolve_ref_unsafe() if hash is not needed
refs: make sha1 output parameter of refs_resolve_ref_unsafe() optional
Diffstat (limited to 'builtin/log.c')
-rw-r--r-- | builtin/log.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/log.c b/builtin/log.c index f8cccbc964..d81a09051e 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1660,10 +1660,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) check_head = 1; if (check_head) { - struct object_id oid; const char *ref, *v; ref = resolve_ref_unsafe("HEAD", RESOLVE_REF_READING, - oid.hash, NULL); + NULL, NULL); if (ref && skip_prefix(ref, "refs/heads/", &v)) branch_name = xstrdup(v); else |