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

Re: [PATCH 1/2] remote: defer repacking packed-refs when deleting refs

From
Junio C Hamano <gitster@pobox.com>
Date
May 27, 2014, 16:55 UTC
Message-ID
<xmqqha4bgo0p.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAEef6Wxg2QkWDzjuogh5sjjE=HZ9NRUmiY9AhExSXK7H3pAcNA@mail.gmail.com>
Jens Lindström <jl@opera.com> writes:
Show 6 quoted lines
>> Puzzled....
>
> There is one reason why one would want to call delete_ref() even if
> the ref itself was already fully deleted by repack_without_refs()
> (because it was only packed) and that is that delete_ref() also
> removes the ref log, if there is one.
Ahh, ok, no longer puzzled---I completely forgot about that part.
Show 8 quoted lines
> We could refactor the deletion to
>
>   1) repack_without_refs() on all refs
>   2) delete_ref() on still existing (loose) refs
>   3) delete_ref_log() on all refs
>
> to let us only call delete_ref() on existing refs, and then keep the
> current value check.

I tend to agree that it is sufficient for the purpose of this topic to be loose about the check; the refactoring can come later, as part of the ref-transaction refactoring that is going on in a separate thread.

Previous: Jens LindströmNext: Jens Lindström
Message 8 of 16 in “remote: optimize rm/prune ref deletion”
  1. 0/2 remote: optimize rm/prune ref deletionJens Lindström, May 20, 2014
  2. 1/2 remote: defer repacking packed-refs when deleting refsJens Lindström, May 20, 2014
  3. Junio C HamanoMay 20, 2014
  4. Junio C HamanoMay 20, 2014
  5. Jens LindströmMay 23, 2014
  6. Junio C HamanoMay 23, 2014
  7. Jens LindströmMay 24, 2014
  8. Junio C HamanoMay 27, 2014
  9. 2/2 remote prune: optimize "dangling symref" check/warningJens Lindström, May 20, 2014
  10. 0/3 remote: optimize rm/prune ref deletionJens Lindström, May 23, 2014
  11. 1/3 remote rm: delete remote configuration as the lastJens Lindström, May 23, 2014
  12. Junio C HamanoMay 23, 2014
  13. 2/3 remote: repack packed-refs once when deleting multiple refsJens Lindström, May 23, 2014
  14. Junio C HamanoMay 23, 2014
  15. Junio C HamanoMay 23, 2014
  16. 3/3 remote prune: optimize "dangling symref" check/warningJens Lindström, May 23, 2014

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.