Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 1/2] Add branch --set-upstream

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:48:03
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

Possibly related (same subject, not in this thread)

Ilari Liusvaara [off-list ref] writes:
Add --set-upstream option to branch that works like --track, except that
when branch exists already, its upstream info is changed without changing
the ref value.

Based-on-patch-from: Matthieu Moy [off-list ref]
Signed-off-by: Matthieu Moy <redacted>
I'm short on Git time budget, so I happily let you take over on this
patch.

I'm a bit worried about the vocabulary: my understanding is that
"--track" is considered confusing, and should have been called
"--set-upstream" since the beginning.

With your patch, we have both --set-upstream and --track, with
different meanings. Should we consider --track as semi-deprecated, and
--set-upstream as "--track done right"? If so, you can consider
squashing this to promote your option instead of --track, and perhaps
reword git-branch.txt so that --track says it does like
--set-upstream, and not the other way around.
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index b169836..4c66f19 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -2114,12 +2114,12 @@ linkgit:git-fetch[1] to keep them up-to-date; see
 
 Now create the branches in which you are going to work; these start out
 at the current tip of origin/master branch, and should be set up (using
-the --track option to linkgit:git-branch[1]) to merge changes in from
+the --set-upstream option to linkgit:git-branch[1]) to merge changes in from
 Linus by default.
 
 -------------------------------------------------
-$ git branch --track test origin/master
-$ git branch --track release origin/master
+$ git branch --set-upstream test origin/master
+$ git branch --set-upstream release origin/master
 -------------------------------------------------
 
 These can be easily kept up to date using linkgit:git-pull[1].

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help