Note that followRemoteHEAD invents a URL-less origin

Git materialises a remote from the existence of any remote.<name>.* key,
so remote.origin.followRemoteHEAD makes `git remote` list an origin in
every repo without one - this dotfiles repo included. It reads as a
broken remote to anyone looking, and has now been misdiagnosed as
leftover cruft twice. Nothing is actually wrong: get-url still fails, so
the guards in git-sync and nvim's default_branch() hold. Say so in both
places someone would look.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonny Barnes 2026-08-31 21:45:12 +01:00
commit 3b4b84fb20
No known key found for this signature in database
2 changed files with 12 additions and 0 deletions

View file

@ -47,6 +47,12 @@
# branch that may not even exist. `always` re-points it on each fetch, off the
# ref advertisement that fetch already receives, so it costs no extra round
# trip. Only applies to remotes actually named origin.
#
# Side effect: git conjures a remote from the existence of any remote.<name>.*
# key, so this makes `git remote` list a URL-less origin in every repo that
# has not got one - this repo included. Nothing breaks (`git remote get-url
# origin` still says No such remote, which is what the scripts test), but do
# not read that listing as evidence a real origin exists.
followRemoteHEAD = always
[core]