From: Junio C Hamano Date: Thu, 20 Sep 2018 21:51:43 +0000 (-0700) Subject: Merge branch 'bp/checkout-new-branch-optim' X-Git-Tag: v2.20.0-rc0~226 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dbc50fd63c75320720481a1787312e080249220d;p=git Merge branch 'bp/checkout-new-branch-optim' "git checkout -b newbranch [HEAD]" should not have to do as much as checking out a commit different from HEAD. An attempt is made to optimize this special case. * bp/checkout-new-branch-optim: config doc: add missing list separator for checkout.optimizeNewBranch --- dbc50fd63c75320720481a1787312e080249220d diff --cc Documentation/config.txt index 112041f407,139f55210f..8d85d1a324 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@@ -1143,23 -1101,7 +1143,23 @@@ browser..path: browse HTML help (see `-w` option in linkgit:git-help[1]) or a working repository in gitweb (see linkgit:git-instaweb[1]). +checkout.defaultRemote:: + When you run 'git checkout ' and only have one + remote, it may implicitly fall back on checking out and + tracking e.g. 'origin/'. This stops working as soon + as you have more than one remote with a '' + reference. This setting allows for setting the name of a + preferred remote that should always win when it comes to + disambiguation. The typical use-case is to set this to + `origin`. ++ +Currently this is used by linkgit:git-checkout[1] when 'git checkout +' will checkout the '' branch on another remote, +and by linkgit:git-worktree[1] when 'git worktree add' refers to a +remote branch. This setting might be used for other checkout-like +commands or functionality in the future. + - checkout.optimizeNewBranch + checkout.optimizeNewBranch:: Optimizes the performance of "git checkout -b " when using sparse-checkout. When set to true, git will not update the repo based on the current sparse-checkout settings. This means it