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

Re: [PATCH] logging branch deletion to help recovering from mistakes

From
Jakub Narebski <jnareb@gmail.com>
Date
Dec 7, 2010, 16:22 UTC
Message-ID
<m3fwu9365i.fsf@localhost.localdomain>
In-Reply-To
<AANLkTinDyix3KEdLLGJEWQ8X+a3zQZOAiTh2mLf5wuvQ@mail.gmail.com>
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
Show 27 quoted lines
> On Tue, Dec 7, 2010 at 1:28 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
>>
>>> On Tue, Dec 7, 2010 at 4:16 AM, Junio C Hamano <gitster@pobox.com> wrote:
>>>> +#define BRANCH_DELETION_LOG "DELETED-REFS"
>>>> +
>>>
>>> Should this special log be mentioned in git-update-ref.txt or
>>> gitrepository-layout.txt?
>>
>> Perhaps, but I wasn't sure if this patch itself is a good idea to begin
>> with.  Not the problem it tries to solve, but its approach.
>>
>> For example, this cannot be shown with "reflog show" or "log -g" due to
>> the way these frontends locate the reflog file to read (the logic wants to
>> have an underlying ref).
>>
> 
> I think you have thought of this. What's wrong with keeping reflog
> when a branch is removed and appending "delete" line to the said
> reflog? I don't know how reflogs are managed, but those reflogs
> without associated branch will (or should) be cleaned when they are
> expired.
>
> I stick with this idea because I also want to archive old branches and
> am thinking those reflogs ending with "archive" line will be kept
> forever, or until I feel like digging up them again.

The problem with this idea is deleting branch 'foo' and creating 'foo/bar', or deleting branch 'foo/bar' and creating branch 'foo'. Old reflog with "delete" line would block creating reflog for new branch.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Nguyen Thai Ngoc DuyNext: Nguyen Thai Ngoc Duy
Message 9 of 28 in “logging branch deletion to help recovering from mistakes”
  1. logging branch deletion to help recovering from mistakesJunio C Hamano, Dec 6, 2010
  2. Štěpán NěmecDec 6, 2010
  3. Andreas SchwabDec 6, 2010
  4. Nguyen Thai Ngoc DuyDec 7, 2010
  5. Junio C HamanoDec 7, 2010
  6. Nguyen Thai Ngoc DuyDec 7, 2010
  7. Michael J GruberDec 7, 2010
  8. Nguyen Thai Ngoc DuyDec 7, 2010
  9. Jakub NarebskiDec 7, 2010
  10. Nguyen Thai Ngoc DuyDec 7, 2010
  11. Jeff KingDec 7, 2010
  12. Shawn PearceDec 7, 2010
  13. Jeff KingDec 7, 2010
  14. Shawn O. PearceDec 7, 2010
  15. Jeff KingDec 7, 2010
  16. Shawn O. PearceDec 7, 2010
  17. Jeff KingDec 7, 2010
  18. Shawn O. PearceDec 7, 2010
  19. Junio C HamanoDec 7, 2010
  20. Jeff KingDec 7, 2010
  21. Casey DahlinDec 7, 2010
  22. Jonathan NiederDec 7, 2010
  23. Casey DahlinDec 7, 2010
  24. Jonathan NiederDec 7, 2010
  25. Casey DahlinDec 7, 2010
  26. Junio C HamanoDec 7, 2010
  27. Jonathan NiederDec 7, 2010
  28. Jeff KingDec 7, 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.