Skip to content

set-head/fetch remote/HEAD updates, small change from v7

Bence Ferdinandy git 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest6 patches 8 repliesIn review
  2. v76 patches 8 repliesSuperseded

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6refs: atomically record overwritten ref in update_symrefbuiltin/branch.c builtin/checkout.c builtin/clone.c +10 more+29 -222 replies
2/6remote set-head: add new variable for readabilitybuiltin/remote.c+4 -30 replies
3/6remote set-head: better output for --autobuiltin/remote.c t/t5505-remote.sh+81 -52 replies
4/6refs: add TRANSACTION_CREATE_EXISTS errorrefs.h refs/files-backend.c refs/reftable-backend.c+23 -110 replies
5/6refs: add create_only option to refs_update_symrefbuiltin/branch.c builtin/checkout.c builtin/clone.c +10 more+48 -250 replies
6/6fetch: set remote/HEAD if it does not existbuiltin/fetch.c t/t4207-log-decoration-colors.sh t/t5505-remote.sh +9 more+308 -1230 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v8 yet.

Read the v8 thread

Cover letter [PATCH v8 0/6] set-head/fetch remote/HEAD updates, small change from v7

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(-)
Signature · 1 line
2.47.0.7.g072c39eddb.dirty