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, 16:09 UTC
Message-ID
<20060913160939.GA29933@spearce.org>
In-Reply-To
<9e4733910609130859v347a7a9ew5c3ebc982bf9b07b@mail.gmail.com>
Jon Smirl <jonsmirl@gmail.com> wrote:
Show 11 quoted lines
> On 9/13/06, Petr Baudis <pasky@suse.cz> wrote:
> >You could also stash the ref to refs/heads-abandoned/ instead of
> >refs/heads/ if you want to keep the junk around for some reason. Of
> >course you don't get the nice marker with explanation of why is this
> >abandoned and who decided that, but you can just use an empty commit for
> >the same purpose.
> >
> >Object classes are precious things and we shouldn't get carried away.
> 
> If this is done with an object there should probably be some way to
> encode it into the existing commit object.
I agree completely with what Petr is saying.  Allocating a new
class of object in Git is a *major* deal.  We don't really have
any IDs left.  Tags would quite easily carry information stating
that the branch is considered abandoned, who abandoned it, and
when the did so.  The tags can also easily be saved off into a
refs/abandoned directory.
 
> 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.

I fail to see why. If a branch is abandoned then its not merged into any of the active branches. If this is the case then gitk doesn't display it when viewing an active branch. So what's the problem?

> 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.

Same difference. The repository is a union of the objects stored in the objects directory and the pack files and the symbolic ref names holding the heads of the commit chains. We're already talking about some other ways to handle larger sets of refs, and Linus has contributed some cleanup code heading in that direction. The refs *are* the repository.

-- 
Shawn.
Previous: Jakub NarebskiNext: Jakub Narebski
Message 21 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.