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

Re: Marking abandoned branches

From
Jakub Narebski <jnareb@gmail.com>
Date
Sep 13, 2006, 16:12 UTC
Message-ID
<ee9akc$d62$1@sea.gmane.org>
In-Reply-To
<9e4733910609130859v347a7a9ew5c3ebc982bf9b07b@mail.gmail.com>
Jon Smirl wrote:
Show 13 quoted lines
> On 9/13/06, Petr Baudis <pasky@suse.cz> wrote:
>> Dear diary, on Wed, Sep 13, 2006 at 05:17:59PM CEST, I got a letter
>> where Jon Smirl <jonsmirl@gmail.com> said that...
>> > Abandoned branches are common in CVS since it is not distributed.
>> > People start working on something in the main repo and then decide it
>> > was a bad idea. In the git world these branches usually don't end up
>> > in the main repo.
>>
>> Can't you just toss the branch away in that case? :-)
> 
> It is a historical import. Everything that was in the initial repo
> needs to be preserved otherwise they aren't going to get rid of the
> old CVS repo.

You can leave this in historical repository, and strip current repository from abandoned work, by the way.

Show 8 quoted lines
>> 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.
> 
> If this is done with an object there should probably be some way to
> encode it into the existing commit object.
As it was said somewhere in this thread, you can use tags (tag objects) for
that, i.e. tag each of the abandoned branches, explaining why branch wa
abandoned for example, remove head refs, and move tag refs to
refs/abandoned or refs/tags-abandoned/ or refs/Attic/ or in refs-abandoned/
(the last has the advantage to not be included by default in any command,
even when --all is given)
 
Show 5 quoted lines
> 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.

There is no need for new flag. If you give --all flag to the gitk command line or the list of commits option field, all the refs in $GIT_DIR/refs/ would be included. If you will use refs-abandoned/ instead, it would be enough I guess to give refs-abandoned/ or refs-abandoned/*. Of course you would need some change to visualisers to mar abandoned branches in different way.

gitweb as of now uses only refs/heads and refs/tags; markers are taken from $GIT_DIR/info/refs or "git-ls-remotes ." (i.e. all refs/)

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Shawn PearceNext: A Large Angry SCM
Message 22 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.