summaryrefslogtreecommitdiff
path: root/reflog-walk.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-10-05 13:48:19 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-10-05 13:48:19 +0900
commitefe9d6ce33ed817150f4ff63ebfc14a3f7667eb4 (patch)
tree445ad62e5235a01002086d2009b35fb9cc16af96 /reflog-walk.c
parentMerge branch 'er/fast-import-dump-refs-on-checkpoint' (diff)
parentrefs: pass NULL to resolve_refdup() if hash is not needed (diff)
downloadtgif-efe9d6ce33ed817150f4ff63ebfc14a3f7667eb4.tar.xz
Merge branch 'rs/resolve-ref-optional-result'
Code clean-up. * rs/resolve-ref-optional-result: refs: pass NULL to resolve_refdup() if hash is not needed refs: pass NULL to refs_resolve_refdup() if hash is not needed
Diffstat (limited to 'reflog-walk.c')
-rw-r--r--reflog-walk.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/reflog-walk.c b/reflog-walk.c
index 74ebe5148f..842b2f77dc 100644
--- a/reflog-walk.c
+++ b/reflog-walk.c
@@ -61,11 +61,10 @@ static struct complete_reflogs *read_complete_reflog(const char *ref)
reflogs->ref = xstrdup(ref);
for_each_reflog_ent(ref, read_one_reflog, reflogs);
if (reflogs->nr == 0) {
- struct object_id oid;
const char *name;
void *name_to_free;
name = name_to_free = resolve_refdup(ref, RESOLVE_REF_READING,
- oid.hash, NULL);
+ NULL, NULL);
if (name) {
for_each_reflog_ent(name, read_one_reflog, reflogs);
free(name_to_free);
@@ -151,9 +150,8 @@ int add_reflog_for_walk(struct reflog_walk_info *info,
reflogs = item->util;
else {
if (*branch == '\0') {
- struct object_id oid;
free(branch);
- branch = resolve_refdup("HEAD", 0, oid.hash, NULL);
+ branch = resolve_refdup("HEAD", 0, NULL, NULL);
if (!branch)
die ("No current branch");