git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git switch has fatal dependency on default fetch config
@ 2023-12-06  3:41 Jeremiah Steele (Jerry)
  2023-12-06 19:11 ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: Jeremiah Steele (Jerry) @ 2023-12-06  3:41 UTC (permalink / raw)
  To: git

Changing the default fetch refspec for a remote breaks git switch:

% git branch -r
  origin/HEAD -> origin/master
  origin/feature
  origin/master
% git remote set-branches origin master
% git switch -c feature --track origin/feature
fatal: cannot set up tracking information; starting point 'origin/feature' is not a branch
% git remote set-branches --add origin feature
% git switch -c feature --track origin/feature
branch 'feature' set up to track 'origin/feature'.
Switched to a new branch 'feature'

It seems like I should be able to fetch a remote branch and track it without having to monkey around with my default fetch config. Is there a reason git switch has a hard dependency on the default remote fetch refspec configuration?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-07  2:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-06  3:41 git switch has fatal dependency on default fetch config Jeremiah Steele (Jerry)
2023-12-06 19:11 ` Jeff King
2023-12-07  2:20   ` Jeremiah Steele (Jerry)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).