Re: Re: "git stash list" shows HEAD reflog
- From
Dave Olszewski <cxreg@pobox.com>
- Date
- Mar 13, 2010, 17:41 UTC
- Message-ID
- <alpine.DEB.2.00.1003130939240.796@narbuckle.genericorp.net>
- 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:
Show 11 quoted lines
>> 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