git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* First/oldest entry in reflog dropped
@ 2010-11-21  3:11 Martin von Zweigbergk
  2010-11-21  5:35 ` Jeff King
  0 siblings, 1 reply; 8+ messages in thread
From: Martin von Zweigbergk @ 2010-11-21  3:11 UTC (permalink / raw)
  To: git

Can someone explain the behavior in the execution below?

# I expected this reflog...
$ git branch tmp
$ git reflog show refs/heads/tmp
b60a214 refs/heads/tmp@{0}: branch: Created from master

# ... and this one as well...
$ git update-ref refs/heads/tmp HEAD^
$ git reflog show refs/heads/tmp
7d1a0b8 refs/heads/tmp@{0}:
b60a214 refs/heads/tmp@{1}: branch: Created from master

# ... but why is the first entry (i.e. "branch: Created from master")
# dropped here?
$ git update-ref refs/heads/tmp HEAD
$ git reflog show refs/heads/tmp
b60a214 refs/heads/tmp@{0}:
7d1a0b8 refs/heads/tmp@{1}:

If the ref is updated once more (to e.g. HEAD^^) before being moved back
to HEAD, the first entry will be shown in the output.

If this is a bug, it seems to be in reflog, rather than in update-ref,
because the first entry does exist in .git/logs/refs/heads/tmp.

Thanks,
Martin

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-11-25 16:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-21  3:11 First/oldest entry in reflog dropped Martin von Zweigbergk
2010-11-21  5:35 ` Jeff King
2010-11-21 11:36   ` Johannes Schindelin
2010-11-22  4:42     ` Jeff King
2010-11-22  9:32       ` Johannes Schindelin
2010-11-24  0:35       ` Junio C Hamano
2010-11-25 16:15         ` Jeff King
2010-11-21 22:57   ` Martin von Zweigbergk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).