From: Junio C Hamano Date: Wed, 29 May 2013 21:23:10 +0000 (-0700) Subject: Merge branch 'jh/checkout-auto-tracking' X-Git-Tag: v1.8.4-rc0~253 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/77eb44b8ed601a17a5ec9b1fb8c4c53ba10aaa56?hp=--cc Merge branch 'jh/checkout-auto-tracking' Update "git checkout foo" that DWIMs the intended "upstream" and turns it into "git checkout -t -b foo remotes/origin/foo" to correctly take existing remote definitions into account. The remote "origin" may be what uniquely map its own branch to remotes/some/where/foo but that some/where may not be "origin". * jh/checkout-auto-tracking: glossary: Update and rephrase the definition of a remote-tracking branch branch.c: Validate tracking branches with refspecs instead of refs/remotes/* t9114.2: Don't use --track option against "svn-remote"-tracking branches t7201.24: Add refspec to keep --track working t3200.39: tracking setup should fail if there is no matching refspec. checkout: Use remote refspecs when DWIMming tracking branches t2024: Show failure to use refspec when DWIMming remote branch names t2024: Add tests verifying current DWIM behavior of 'git checkout ' --- 77eb44b8ed601a17a5ec9b1fb8c4c53ba10aaa56 diff --cc Documentation/glossary-content.txt index 68a18e1497,7a79f26231..db2a74df93 --- a/Documentation/glossary-content.txt +++ b/Documentation/glossary-content.txt @@@ -397,15 -412,24 +397,16 @@@ should not be combined with other paths [[def_refspec]]refspec:: A "refspec" is used by <> and <> to describe the mapping between remote - <> and local ref. They are combined with a colon in - the format :, preceded by an optional plus sign, +. - For example: `git fetch $URL - refs/heads/master:refs/heads/origin` means "grab the master - <> <> from the $URL and store - it as my origin branch head". And `git push - $URL refs/heads/master:refs/heads/to-upstream` means "publish my - master branch head as to-upstream branch at $URL". See also - linkgit:git-push[1]. + <> and local ref. [[def_remote_tracking_branch]]remote-tracking branch:: - A regular Git <> that is used to follow changes from - another <>. A remote-tracking - branch should not contain direct modifications or have local commits - made to it. A remote-tracking branch can usually be - identified as the right-hand-side <> in a Pull: - <>. + A <> that is used to follow changes from another + <>. It typically looks like + 'refs/remotes/foo/bar' (indicating that it tracks a branch named + 'bar' in a remote named 'foo'), and matches the right-hand-side of + a configured fetch <>. A remote-tracking + branch should not contain direct modifications or have local + commits made to it. [[def_repository]]repository:: A collection of <> together with an