From: Dave Olszewski Date: Sat, 13 Mar 2010 17:41:27 GMT Subject: Re: Re: "git stash list" shows HEAD reflog Message-ID: In-Reply-To: <4B9BCD6E.4090902@lsrfire.ath.cx> On Sat, 13 Mar 2010, Ren? Scharfe wrote: > Am 12.03.2010 15:52, schrieb Vladimir Panteleev: >> That doesn't explain why git displayed the HEAD reflog, though. That >> seems to happen thanks to the check (revs->def && !revs->pending.nr) in >> setup_revisions ("HEAD" is the default, as specified in the caller >> cmd_log_init). It looks like (ideally) git shouldn't rely on whether >> revs->pending is empty to decide whether to use the default, but rather >> if a ref was specified by the user or not. > > We could add some kind of check there, but with the patch applied I can't > trigger this second issue any more. It would be nice to have a test script > along with such a sanity check. Any idea how to cause this error, perhaps > with another type of invalid reflog file? I actually noticed this last week. You can reproduce it by doing "git reflog" on a branch which has been idle for longer than the expiration. Any 0-byte files in logs/refs/heads would give me this same behavior. Dave