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

[PATCH 00/15] refs: introduce `--auto` to pack refs as needed

From
Han-Wen Nienhuys <hanwenn@gmail.com>
Date
Mar 18, 2024, 22:14 UTC
Message-ID
<CAOw_e7aEPE1QRsqsgvdBVGkk2uFo4e080wWbM5dsVwkiSpYcbA@mail.gmail.com>

I had a quick look over the reftable bits of this series. It looks OK, but here are some comments. Nothing blocking.

* reftable/error: discern locked/outdated errors

It is not obvious to me why you need two different codes. Is it so you can print the offending lock file (so people can delete them manually?). FWIW, this was based on JGit, which has

              /**
                 * The ref could not be locked for update/delete.
                 * <p>
                 * This is generally a transient failure and is
usually caused by
                 * another process trying to access the ref at the
same time as this
                 * process was trying to update it. It is possible a
future operation
                 * will be successful.
                 */
* reftable/stack: gracefully handle failed auto-compaction due to locks

It's a bit unsatisfying that you have to use details of the locking protocol to test it, but I couldn't think of a way to unittest this using only the API. Maybe it's worth considering removing the automatic compaction from the reftable-stack.h API, and have the caller (eg. in refs/reftable-backend.c) call it explicitly?

-- 
Han-Wen Nienhuys - hanwenn@gmail.com - http://www.xs4all.nl/~hanwen
Next: Patrick Steinhardt
Message 1 of 2 in “refs: introduce `--auto` to pack refs as needed”
  1. 00/15 refs: introduce `--auto` to pack refs as neededHan-Wen Nienhuys, Mar 18, 2024
  2. Patrick SteinhardtMar 19, 2024

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.