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

Re: [PATCH v4 0/7] update-ref: add symref support for --stdin

From
Karthik Nayak <karthik.188@gmail.com>
Date
Jun 6, 2024, 08:22 UTC
Message-ID
<CAOLa=ZSkBj5V1sqW6pyraqMJOw4QUntFgo660NFoTKRTwrsvhA@mail.gmail.com>
In-Reply-To
<20240605102958.716432-1-knayak@gitlab.com>
Karthik Nayak <karthik.188@gmail.com> writes:
Show 39 quoted lines
> From: Karthik Nayak <karthik.188@gmail.com>
>
> The 'update-ref' command is used to update refs using transactions. The
> command allows users to also utilize a '--stdin' mode to provide a
> batch of sub-commands which can be processed in a transaction.
>
> Currently, the sub-commands involve {verify, delete, create, update}
> and they allow users to work with regular refs in the repository. To
> work with symrefs, users only have the option of using
> 'git-symbolic-ref', which doesn't provide transaction support to the
> users eventhough it uses the same behind the hood.
>
> Recently, we modified the reference backend to add symref support,
> following which, 'git-symbolic-ref' also uses the transaction backend.
> But, it doesn't expose this to the user. To allow users to work with
> symrefs via transaction, this series adds support for new sub-commands
> {symrer-verify, symref-delete, symref-create, symref-update} to the
> '--stdin' mode of update-ref. These complement the existing
> sub-commands.
>
> The patches 1, 2, & 6 fix small issues in the reference backends. The other
> patches 3, 4, 5, & 7 each add one of the new sub-commands.
>
> The series is based off master, with 'kn/ref-transaction-symref' merged
> in.
>
> There was some discussion [1] also about adding `old_target` support to
> the existing `update` command. I think its worthwhile to do this with
> some tests cleanup, will follow that up as a separate series.
>
> Changes since v3:
> * Changed the position of `old_target` and `flags` in `ref_transaction_delete`
> to make it a coherent.
> * Added tests for deletion of regular refs using 'symref-delete', this lead to
> adding a new commit to have specific errors for when a regular update contains
> `old_target`.
>
> [1]: https://lore.kernel.org/r/CAOLa=ZQW-cCV5BP_fCvuZimfkjwAzjEiqXYRPft1Wf9kAX=_bw@mail.gmail.com
>

Somehow I added the wrong link in the reply-to and this has come out as a thread of its own. This is a follow up of v3:

https://lore.kernel.org/all/20240530120940.456817-1-knayak@gitlab.com/#t
[snip]
Previous: Karthik NayakNext: Karthik Nayak
Message 2 of 22 in “update-ref: add symref support for --stdin”
  1. 0/7 update-ref: add symref support for --stdinKarthik Nayak, Jun 5, 2024
  2. Karthik NayakJun 6, 2024
  3. Karthik NayakJun 6, 2024
  4. 0/7 update-ref: add symref support for --stdinKarthik Nayak, Jun 7, 2024
  5. 1/7 refs: create and use `ref_update_expects_existing_old_ref()`Karthik Nayak, Jun 7, 2024
  6. 2/7 refs: specify error for regular refs with `old_target`Karthik Nayak, Jun 7, 2024
  7. Patrick SteinhardtJun 10, 2024
  8. Karthik NayakJun 10, 2024
  9. 3/7 update-ref: add support for 'symref-verify' commandKarthik Nayak, Jun 7, 2024
  10. 4/7 update-ref: add support for 'symref-delete' commandKarthik Nayak, Jun 7, 2024
  11. 5/7 update-ref: add support for 'symref-create' commandKarthik Nayak, Jun 7, 2024
  12. 6/7 reftable: pick either 'oid' or 'target' for new updatesKarthik Nayak, Jun 7, 2024
  13. 7/7 update-ref: add support for 'symref-update' commandKarthik Nayak, Jun 7, 2024
  14. 1/7 refs: create and use `ref_update_expects_existing_old_ref()`Karthik Nayak, Jun 5, 2024
  15. 2/7 refs: specify error for regular refs with `old_target`Karthik Nayak, Jun 5, 2024
  16. Patrick SteinhardtJun 6, 2024
  17. Karthik NayakJun 6, 2024
  18. 3/7 update-ref: add support for 'symref-verify' commandKarthik Nayak, Jun 5, 2024
  19. 4/7 update-ref: add support for 'symref-delete' commandKarthik Nayak, Jun 5, 2024
  20. 5/7 update-ref: add support for 'symref-create' commandKarthik Nayak, Jun 5, 2024
  21. 6/7 reftable: pick either 'oid' or 'target' for new updatesKarthik Nayak, Jun 5, 2024
  22. 7/7 update-ref: add support for 'symref-update' commandKarthik Nayak, Jun 5, 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.