[PATCH v8 0/6] set-head/fetch remote/HEAD updates, small change from v7
From: Bence Ferdinandy <hidden>
Date: 2024-10-14 22:55:31
v8 is minor non-functional fix from v7
❯ git range-diff v7~6..v7 v8~6..v8
1: e4a2d01bca = 1: e4a2d01bca refs: atomically record overwritten ref in update_symref
2: e6c40ef04c = 2: e6c40ef04c remote set-head: add new variable for readability
3: aefa49aa0d = 3: aefa49aa0d remote set-head: better output for --auto
4: ad8907c6a3 = 4: ad8907c6a3 refs: add TRANSACTION_CREATE_EXISTS error
5: ff616d8b77 = 5: ff616d8b77 refs: add create_only option to refs_update_symref
6: 35b93f454c ! 6: 7b844b1dbb fetch: set remote/HEAD if it does not exist
@@ Notes
v7: - no change
+ v8: - changed logmsg in call to refs_update_symref from "remote
+ set-head" to "fetch"
+
## builtin/fetch.c ##
@@ builtin/fetch.c: static int backfill_tags(struct display_state *display_state,
return retcode;
@@ builtin/fetch.c: static int backfill_tags(struct display_state *display_state,
+ if (!refs_ref_exists(refs, b_remote_head.buf))
+ result = 1;
+ else if (refs_update_symref(refs, b_head.buf, b_remote_head.buf,
-+ "remote set-head", &b_local_head, 1))
++ "fetch", &b_local_head, 1))
+ result = 1;
+ else
+ report_set_head(remote, head_name, &b_local_head);
Bence Ferdinandy (6):
refs: atomically record overwritten ref in update_symref
remote set-head: add new variable for readability
remote set-head: better output for --auto
refs: add TRANSACTION_CREATE_EXISTS error
refs: add create_only option to refs_update_symref
fetch: set remote/HEAD if it does not exist
builtin/branch.c | 2 +-
builtin/checkout.c | 5 +-
builtin/clone.c | 8 +-
builtin/fetch.c | 82 +++++++++++
builtin/notes.c | 3 +-
builtin/remote.c | 47 +++++--
builtin/symbolic-ref.c | 2 +-
builtin/worktree.c | 2 +-
refs.c | 38 +++--
refs.h | 7 +-
refs/files-backend.c | 24 ++--
refs/reftable-backend.c | 6 +-
reset.c | 2 +-
sequencer.c | 3 +-
setup.c | 3 +-
t/helper/test-ref-store.c | 2 +-
t/t4207-log-decoration-colors.sh | 3 +-
t/t5505-remote.sh | 62 ++++++++-
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 +++++++++
27 files changed, 469 insertions(+), 165 deletions(-)
--
2.47.0.7.g072c39eddb.dirty