git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "SZEDER Gábor" <szeder@ira.uka.de>
To: git@vger.kernel.org
Subject: accessing oldest reflog entry with ref@{N}?
Date: Wed, 19 Jun 2013 14:50:59 +0200	[thread overview]
Message-ID: <20130619125059.GD20052@goldbirke> (raw)

Hi,

after a couple of months of inactivity I recently updated my git clone
from the main repo, and later ran 'git gc', which, of course,
dutifully pruned the old reflog entries, leaving my reflogs quite
shallow:

$ git reflog master
0dbd8125 master@{0}: merge origin/master: Fast-forward
f3828dc0

Then later I had to access the previous state, which I usually do with
master@{1}, but not this time:

$ git log --oneline -1 master@{1}
fatal: Log for 'master' only has 1 entries.

Annoyed, I just copy-pasted the sha and got the job done.

However, I wonder why it didn't worked.  'git reflog' didn't print
master@{1} or any message for the oldest entry, but I can live without
that.  The sha is undoubtedly there, however, so git should know where
master@{1} points and should "Just Work", shouldn't it?


Thanks,
Gábor

             reply	other threads:[~2013-06-19 12:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19 12:50 SZEDER Gábor [this message]
2013-06-19 18:48 ` accessing oldest reflog entry with ref@{N}? Junio C Hamano
2013-06-19 19:41   ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130619125059.GD20052@goldbirke \
    --to=szeder@ira.uka.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).