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

Re: Marking abandoned branches

From
Shawn Pearce <spearce@spearce.org>
Date
Sep 13, 2006, 17:32 UTC
Message-ID
<20060913173212.GD29933@spearce.org>
In-Reply-To
<9e4733910609131022y19327efy541ac451bdf4b009@mail.gmail.com>
Jon Smirl <jonsmirl@gmail.com> wrote:
Show 20 quoted lines
> On 9/13/06, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> >Hi,
> >
> >On Wed, 13 Sep 2006, Jon Smirl wrote:
> >
> >> Moving the refs into refs/abandoned would work too. We would need new
> >> git commands to do this and flags on the visualization tools to
> >> include the abandoned branches. On the other hand doing this is
> >> recording state about the repository in the refs directory instead of
> >> writing this state into the repo itself.
> >
> >Well, the refs directory is _part_ of the repository. Think about it, if
> >you do not know which branches are in the object database, you lack a lot
> >of information.
> 
> If you delete all of your heads you can recover them by following all
> of the chains in the repo to find them. Doing this would recover the
> abandoned branches too but it would mix them up with the active heads.
> This is not a big deal but it is info that is getting stored outside
> of the object db.

No. Being able to get a ref back like that is like saying that I can get files back in ext2 by deleting them then running fsck and restoring the lost inodes to '/lost+found'. Sure the data is there but there's no way to tell which file is which!

The name of a ref, like the name of a file, is pretty important when it comes to describing it. Just having the SHA1 ID of 100 commits is pretty useless; it could take weeks to determine which branch head is which. The refs database is an important part of the usability of a Git repository.

-- 
Shawn.
Previous: Jon SmirlNext: Nicolas Pitre
Message 17 of 29 in “Marking abandoned branches”
  1. Jon SmirlSep 13, 2006
  2. Petr BaudisSep 13, 2006
  3. Johannes SchindelinSep 13, 2006
  4. Jakub NarebskiSep 13, 2006
  5. Junio C HamanoSep 13, 2006
  6. Jakub NarebskiSep 13, 2006
  7. Junio C HamanoSep 13, 2006
  8. Jakub NarebskiSep 13, 2006
  9. Petr BaudisSep 13, 2006
  10. Junio C HamanoSep 13, 2006
  11. Jakub NarebskiSep 13, 2006
  12. Jakub NarebskiSep 13, 2006
  13. Jakub NarebskiSep 13, 2006
  14. Jon SmirlSep 13, 2006
  15. Johannes SchindelinSep 13, 2006
  16. Jon SmirlSep 13, 2006
  17. Shawn PearceSep 13, 2006
  18. Nicolas PitreSep 13, 2006
  19. Martin LanghoffSep 13, 2006
  20. Jakub NarebskiSep 13, 2006
  21. Shawn PearceSep 13, 2006
  22. Jakub NarebskiSep 13, 2006
  23. A Large Angry SCMSep 13, 2006
  24. Shawn PearceSep 13, 2006
  25. Junio C HamanoSep 13, 2006
  26. Jakub NarebskiSep 13, 2006
  27. Jon SmirlSep 13, 2006
  28. Jakub NarebskiSep 13, 2006
  29. Sam VilainSep 14, 2006

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.