git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: fsck missing dangling commits that are candidate heads?

From
Nicolas Pitre <nico@cam.org>
Date
Apr 3, 2007, 19:53 UTC
Message-ID
<alpine.LFD.0.98.0704031551090.28181@xanadu.home>
In-Reply-To
<loom.20070403T213135-68@post.gmane.org>
On Tue, 3 Apr 2007, Sergio Callegari wrote:
Show 14 quoted lines
> Hi,
> 
> on git 1.5.0.6, I have done the following:
> 
> work work
> 
> git commit -a
> 
> git reset HEAD^         (assume a mistake)
> 
> git fsck
> 
> the last fsck shows nothing...
> Is this correct?
Yes.
Show 5 quoted lines
> 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.

It is not lost. Try git log -g and you'll probably find it there... at least until the reflog entry corresponding to it gets expired.

Nicolas
Previous: Sergio Callegari
Message 7 of 7 in “fsck missing dangling commits that are candidate heads?”
  1. Sergio CallegariApr 3, 2007
  2. Shawn O. PearceApr 3, 2007
  3. Sergio CallegariApr 3, 2007
  4. Sergio CallegariApr 4, 2007
  5. Shawn O. PearceApr 4, 2007
  6. Sergio CallegariApr 4, 2007
  7. Nicolas PitreApr 3, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.