From: Junio C Hamano <gitster@pobox.com>
Date: Mon, 10 Jul 2017 20:42:52 +0000 (-0700)
Subject: Merge branch 'jk/reflog-walk-maint'
X-Git-Tag: v2.14.0-rc0~16
X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/4dc59cba817c30c152b72c3716dc28288769647d

Merge branch 'jk/reflog-walk-maint'

After "git branch --move" of the currently checked out branch, the
code to walk the reflog of HEAD via "log -g" and friends
incorrectly stopped at the reflog entry that records the renaming
of the branch.

* jk/reflog-walk-maint:
reflog-walk: include all fields when freeing complete_reflogs
reflog-walk: don't free reflogs added to cache
reflog-walk: duplicate strings in complete_reflogs list
reflog-walk: skip over double-null oid due to HEAD rename
---

4dc59cba817c30c152b72c3716dc28288769647d
diff --cc reflog-walk.c
index ed99437ad2,ba72020fc3..081f89b70d
--- a/reflog-walk.c
+++ b/reflog-walk.c
@@@ -252,13 -259,15 +259,15 @@@ void fake_reflog_parent(struct reflog_w
  	do {
  		reflog = &commit_reflog->reflogs->items[commit_reflog->recno];
  		commit_reflog->recno--;
 -		logobj = parse_object(reflog->ooid.hash);
 +		logobj = parse_object(&reflog->ooid);
  	} while (commit_reflog->recno && (logobj && logobj->type != OBJ_COMMIT));
  
 -	if (!logobj && commit_reflog->recno >= 0 && is_null_sha1(reflog->ooid.hash)) {
 +	if (!logobj && commit_reflog->recno >= 0 && is_null_oid(&reflog->ooid)) {
  		/* a root commit, but there are still more entries to show */
  		reflog = &commit_reflog->reflogs->items[commit_reflog->recno];
 -		logobj = parse_object(reflog->noid.hash);
 +		logobj = parse_object(&reflog->noid);
+ 		if (!logobj)
 -			logobj = parse_object(reflog->ooid.hash);
++			logobj = parse_object(&reflog->ooid);
  	}
  
  	if (!logobj || logobj->type != OBJ_COMMIT) {