]> git.ipfire.org Git - thirdparty/git.git/commit
Merge branch 'bf/set-head-symref'
authorJunio C Hamano <gitster@pobox.com>
Thu, 19 Dec 2024 18:58:27 +0000 (10:58 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 19 Dec 2024 18:58:27 +0000 (10:58 -0800)
commit5f212684abb66c9604e745a2296af8c4bb99961c
tree16d25571b9d3d66c5ccf49df359c7adb99a0124c
parentd882f382b3d939d90cfa58d17b17802338f05d66
parentb1b713f722894d7f66e9ec64bc934ca32004d3d1
Merge branch 'bf/set-head-symref'

When "git fetch $remote" notices that refs/remotes/$remote/HEAD is
missing and discovers what branch the other side points with its
HEAD, refs/remotes/$remote/HEAD is updated to point to it.

* bf/set-head-symref:
  fetch set_head: handle mirrored bare repositories
  fetch: set remote/HEAD if it does not exist
  refs: add create_only option to refs_update_symref_extended
  refs: add TRANSACTION_CREATE_EXISTS error
  remote set-head: better output for --auto
  remote set-head: refactor for readability
  refs: atomically record overwritten ref in update_symref
  refs: standardize output of refs_read_symbolic_ref
  t/t5505-remote: test failure of set-head
  t/t5505-remote: set default branch to main
16 files changed:
builtin/fetch.c
builtin/remote.c
refs.c
refs.h
refs/files-backend.c
refs/refs-internal.h
refs/reftable-backend.c
t/t4207-log-decoration-colors.sh
t/t5505-remote.sh
t/t5510-fetch.sh
t/t5512-ls-remote.sh
t/t5514-fetch-multiple.sh
t/t5516-fetch-push.sh
t/t5527-fetch-odd-refs.sh
t/t7900-maintenance.sh
t/t9902-completion.sh