mbox series

[v12,0/8] set-head/fetch remote/HEAD updates

Message ID 20241023153736.257733-1-bence@ferdinandy.com (mailing list archive)
Headers show
Series set-head/fetch remote/HEAD updates | expand

Message

Bence Ferdinandy Oct. 23, 2024, 3:36 p.m. UTC
v12: added missing S-o-b

v11: fixed leaks found by running tests after `make SANITIZE=leak`
    green pipeline:
    https://github.com/ferdinandyb/git/actions/runs/11466803523

v10: added a new patch (8/8) on top of v9 to handle HEAD in mirrored bare
repositories, rest of the patches are unchanged

v9:
the two most notable changes are
- the new patch 1/7 which address
  https://lore.kernel.org/git/Zw8IKyPkG0Hr6%2F5t@nand.local/, but see
  https://lore.kernel.org/git/D4ZAELFWJMKN.S88LJ6YK31LZ@ferdinandy.com/
- the refs_update_symref -> refs_update_symref_extended change in 2/7,
  reflecting on Phillip's comments (see
  https://lore.kernel.org/git/a7cb48e5-d8ba-44c1-9dbe-d1e8f8a63e3c@gmail.com/)

Bence Ferdinandy (8):
  t/t5505-remote: set default branch to main
  refs: atomically record overwritten ref in update_symref
  remote set-head: refactor for readability
  remote set-head: better output for --auto
  refs: add TRANSACTION_CREATE_EXISTS error
  refs: add create_only option to refs_update_symref_extended
  fetch: set remote/HEAD if it does not exist
  fetch set_head: handle mirrored bare repositories

 builtin/fetch.c                  |  94 +++++++++++++
 builtin/remote.c                 |  52 +++++--
 refs.c                           |  41 +++++-
 refs.h                           |   8 +-
 refs/files-backend.c             |  24 ++--
 refs/reftable-backend.c          |   6 +-
 t/t4207-log-decoration-colors.sh |   3 +-
 t/t5505-remote.sh                |  83 ++++++++++-
 t/t5510-fetch.sh                 | 229 ++++++++++++++++---------------
 t/t5512-ls-remote.sh             |   2 +
 t/t5514-fetch-multiple.sh        |  17 ++-
 t/t5516-fetch-push.sh            |   3 +-
 t/t5527-fetch-odd-refs.sh        |   3 +-
 t/t7900-maintenance.sh           |   3 +-
 t/t9210-scalar.sh                |   5 +-
 t/t9211-scalar-clone.sh          |   6 +-
 t/t9902-completion.sh            |  65 +++++++++
 17 files changed, 490 insertions(+), 154 deletions(-)

Comments

Bence Ferdinandy Nov. 14, 2024, 8:23 p.m. UTC | #1
Hi all,

I just wanted to ping this thread in hopes of another round of reviews.

Aside from some smaller fixes, the main things that have not yet been reviewed are:

- the new patches 1/8 and 8/8
  (https://lore.kernel.org/git/Zw8IKyPkG0Hr6%2F5t@nand.local/, but see
  https://lore.kernel.org/git/D4ZAELFWJMKN.S88LJ6YK31LZ@ferdinandy.com/)
- changes to 2/8 (refs_update_symref -> refs_update_symref_extended change
  reflecting on Phillip's comments see
  https://lore.kernel.org/git/a7cb48e5-d8ba-44c1-9dbe-d1e8f8a63e3c@gmail.com/)

Regarding the latter name: reading another thread about code style here I was
wondering if refs_update_symref_1 would be a better choice.

I'm hoping that otherwise the series is mature now.

Thanks,
Bence