From: "Shawn O. Pearce" <spearce@spearce.org>
To: Sergio Callegari <scallegari@arces.unibo.it>
Cc: git@vger.kernel.org
Subject: Re: fsck missing dangling commits that are candidate heads?
Date: Tue, 3 Apr 2007 15:47:50 -0400 [thread overview]
Message-ID: <20070403194750.GG27706@spearce.org> (raw)
In-Reply-To: <loom.20070403T213135-68@post.gmane.org>
Sergio Callegari <scallegari@arces.unibo.it> wrote:
> on git 1.5.0.6, I have done the following:
> git commit -a
> git reset HEAD^ (assume a mistake)
> git fsck
>
> the last fsck shows nothing...
> Is this correct? Shouldn't the latest commit (the one made unreachable by the
> reset) be reported as dangling and as a candidate branch head?
>
> Also git lost-found misses the commit...
> But it is there... I can find it manually in the object database and tag it.
>
> Also git gc --prune seems to miss the commit... so when we gc useless objects
> appear to be kept around.
Right. This is the reflog in action. Your current branch has two
reflogs, .git/logs/HEAD and .git/logs/refs/heads/$foo, where $foo
is your current branch name. Both of these logs mention the commit
you are looking for, so they aren't considered dangling garbage,
nor are they pruneable.
Use `git log -g` or `git log -g $foo` to look at the reflog for
HEAD and $foo to locate the commit in question.
--
Shawn.
next prev parent reply other threads:[~2007-04-03 19:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-03 19:41 fsck missing dangling commits that are candidate heads? Sergio Callegari
2007-04-03 19:47 ` Shawn O. Pearce [this message]
2007-04-03 19:56 ` Sergio Callegari
2007-04-04 13:32 ` Sergio Callegari
2007-04-04 14:46 ` Shawn O. Pearce
2007-04-04 20:08 ` Sergio Callegari
2007-04-03 19:53 ` Nicolas Pitre
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=20070403194750.GG27706@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=scallegari@arces.unibo.it \
/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).