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

Re: Question about 'branch -d' safety

From
Jakub Narebski <jnareb@gmail.com>
Date
Jul 19, 2010, 20:40 UTC
Message-ID
<201007192240.38681.jnareb@gmail.com>
In-Reply-To
<1279568744.3009.14.camel@dreddbeard>
On Mon, 19 Jul 2010, Will Palmer wrote:
> On Mon, 2010-07-19 at 11:16 -0600, Joshua Jensen wrote:
Show 19 quoted lines
> > My brain has become muddied with all the ~2 stuff.  Explain again why it 
> > can't be as simple as this?
> ...snip...
> > git checkout -b integration HEAD@{1}  (or 8000000)
> > 
> > -Josh
> 
> Because:
>  1) The HEAD reflog is the wrong place to stick things which weren't
> recently checked-out.
>  and 2) the previous tip is currently the easiest-to-recover part of a
> deleted branch. What's lost is all the reflog data: order of states, and
> how they were reached.
> 
> However, I /do/ think it's as simple as "don't delete the reflog right
> away when you delete a branch", and other edge-cases and niceties in
> terms of UI (such as ref renaming, resurrection of refs for tracking
> unrelated data, etc) can be taken care of later, if there's actually a
> need for them.
There are at least two issues, which are not niceties, but requirements:
1.) not deleting reflog for 'foo' when deleting 'foo' branch blocks
    creating reflog for 'foo/bar' branch because of D/F conflict.
2.) there is issue of 'git branch -m bar foo', i.e. renaming some other
    branch to 'foo', a branch which has its own reflog.

But you are right in that "moving reflog to attic" can be postponed till needed.

-- 
Jakub Narebski
Poland
Previous: Will PalmerNext: Joshua Jensen
Message 34 of 42 in “Question about 'branch -d' safety”
  1. Nanako ShiraishiDec 29, 2009
  2. Nicolas SebrechtDec 29, 2009
  3. Nanako ShiraishiDec 30, 2009
  4. Junio C HamanoDec 30, 2009
  5. Nicolas SebrechtDec 30, 2009
  6. Clemens BuchacherJul 10, 2010
  7. Jonathan NiederJul 10, 2010
  8. Jakub NarebskiJul 10, 2010
  9. Jonathan NiederJul 10, 2010
  10. Clemens BuchacherJul 11, 2010
  11. Jakub NarebskiJul 11, 2010
  12. Julian PhillipsJul 11, 2010
  13. Clemens BuchacherJul 11, 2010
  14. Junio C HamanoJul 11, 2010
  15. Jakub NarebskiJul 11, 2010
  16. Will PalmerJul 11, 2010
  17. Clemens BuchacherJul 12, 2010
  18. Junio C HamanoJul 12, 2010
  19. Clemens BuchacherJul 13, 2010
  20. Will PalmerJul 13, 2010
  21. Johannes SixtJul 13, 2010
  22. Will PalmerJul 13, 2010
  23. Clemens BuchacherJul 13, 2010
  24. Clemens BuchacherJul 17, 2010
  25. Jonathan NiederJul 18, 2010
  26. Jakub NarebskiJul 18, 2010
  27. Will PalmerJul 18, 2010
  28. Jakub NarebskiJul 18, 2010
  29. Will PalmerJul 19, 2010
  30. Jakub NarebskiJul 19, 2010
  31. Joshua JensenJul 19, 2010
  32. Clemens BuchacherJul 19, 2010
  33. Will PalmerJul 19, 2010
  34. Jakub NarebskiJul 19, 2010
  35. Joshua JensenJul 20, 2010
  36. Will PalmerJul 20, 2010
  37. Jakub NarebskiJul 19, 2010
  38. Junio C HamanoJul 19, 2010
  39. Clemens BuchacherJul 19, 2010
  40. Jakub NarebskiJul 19, 2010
  41. Ævar Arnfjörð BjarmasonJul 20, 2010
  42. Matthieu MoyJul 20, 2010

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.