threads / patch / 25535

patch, 10 partsChange "tracking branch" to "remote-tracking branch"

Subject: [PATCH 04/10] Change "tracking branch" to "remote-tracking branch"

## tl;dr

101 messages between Oct 23, 2010 and Oct 31, 2010. Diffs are folded; open one to read it.

replies: 100people: 9as markdown or json

Matthieu Moy· Oct 23, 2010, 16:31 UTC · lore

[PATCH 00/11] More consistant terminology ("remote-tracking branch", "not updated")

Following the discussion in

http://thread.gmane.org/gmane.comp.version-control.git/159287/ http://thread.gmane.org/gmane.comp.version-control.git/159287/focus=159288

this is an attempt to be more consistant in the terminology used in Git.

The first patch fixes git status's "changed but not updated", and the rest tries to use "remote-tracking branch" consistantly. This essentially changes the doc, and also does slight modifications to the code. This changes error message, and maybe more controversially the generated merge messages (in a separate patch in case this is too controversial).

I've tried splitting this into systematic changes to ease review, but patches should be applicable in any order (i.e. Junio: if you find some of the patches good and uncontroversial, you can pick them right away).

Patch "user-manual.txt: explain better the remote(-tracking) branch terms" comes last, and adds a few sentences to make the distinction between remote, remote branch, remote-tracking branches explicit. Hopefully, this should avoid future users to have the same difficulties as Thore ;-).

The last 2 patches are minor things I noticed while going through the docs, but are essentially unrelated.

I'll be busy next week, so if anyone else wants to pick this patch serie and update it according to list review, he's welcome. Otherwise, it may have to wait.

Matthieu Moy (11):
  Better "Changed but not updated" message in git-status
  Remplace "remote tracking" with "remote-tracking"
  Change remote tracking to remote-tracking in non-trivial places
  Change "tracking branch" to "remote-tracking branch"
  Change "tracking branch" to "remote-tracking branch" in C code
  Change incorrect uses of "remote branch" meaning "remote-tracking"
  Change incorrect "remote branch" to "remote tracking branch" in C
    code
  Use 'remote-tracking branch' in generated merge messages
  user-manual.txt: explain better the remote(-tracking) branch terms
  git-branch.txt: mention --set-upstream as a way to change upstream
    configuration
  git-http-push.txt: fix typo (branch -> branches)
 Documentation/config.txt               |   13 ++++++-----
 Documentation/everyday.txt             |    6 ++--
 Documentation/fetch-options.txt        |    2 +-
 Documentation/git-branch.txt           |   14 +++++++-----
 Documentation/git-checkout.txt         |    2 +-
 Documentation/git-clone.txt            |    2 +-
 Documentation/git-describe.txt         |    2 +-
 Documentation/git-fetch.txt            |    2 +-
 Documentation/git-gc.txt               |    6 ++--
 Documentation/git-http-push.txt        |    2 +-
 Documentation/git-log.txt              |    2 +-
 Documentation/git-pull.txt             |    8 +++---
 Documentation/git-remote.txt           |    6 ++--
 Documentation/git-tag.txt              |    4 +-
 Documentation/gittutorial-2.txt        |    2 +-
 Documentation/gittutorial.txt          |    6 ++--
 Documentation/glossary-content.txt     |    8 +++---
 Documentation/rev-list-options.txt     |    2 +-
 Documentation/user-manual.txt          |   22 +++++++++++++++-----
 branch.h                               |    2 +-
 builtin/checkout.c                     |    4 +-
 builtin/fetch.c                        |    6 ++--
 builtin/fmt-merge-msg.c                |    6 ++--
 builtin/merge.c                        |    2 +-
 builtin/remote.c                       |    6 ++--
 contrib/examples/builtin-fetch--tool.c |    2 +-
 remote.c                               |    2 +-
 t/t1507-rev-parse-upstream.sh          |    2 +-
 t/t3409-rebase-preserve-merges.sh      |    2 +-
 t/t5400-send-pack.sh                   |    2 +-
 t/t5505-remote.sh                      |    6 ++--
 t/t5513-fetch-track.sh                 |    2 +-
 t/t7508-status.sh                      |   34 ++++++++++++++++----------------
 t/t7608-merge-messages.sh              |    4 +-
 wt-status.c                            |    2 +-
 35 files changed, 104 insertions(+), 91 deletions(-)
-- 
1.7.3.2.537.g7e355
Matthieu Moy· Oct 23, 2010, 16:31 UTC · re: Matthieu Moy · lore

[PATCH 01/10] Better "Changed but not updated" message in git-status

Older Gits talked about "updating" a file to add its content to the index, but this terminology is confusing for new users. "to stage" is far more intuitive and already used in e.g. the "git stage" command name.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/gittutorial-2.txt |    2 +-
 t/t7508-status.sh               |   34 +++++++++++++++++-----------------
 wt-status.c                     |    2 +-
 3 files changed, 19 insertions(+), 19 deletions(-)
Show changes to 3 files +19 −19

Documentation/gittutorial-2.txt, t/t7508-status.sh, wt-status.c

diff --git a/Documentation/gittutorial-2.txt b/Documentation/gittutorial-2.txt
index ecab0c0..9b17a71 100644
--- a/Documentation/gittutorial-2.txt
+++ b/Documentation/gittutorial-2.txt
@@ -373,7 +373,7 @@ $ git status
 #
 #       new file: closing.txt
 #
-# Changed but not updated:
+# Changed but not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #
 #       modified: file.txt
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index c9300f3..bfb47a2 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -44,7 +44,7 @@ cat >expect <<\EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changed but not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -73,7 +73,7 @@ cat >expect <<\EOF
 # Changes to be committed:
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changed but not staged for commit:
 #	modified:   dir1/modified
 #
 # Untracked files:
@@ -140,7 +140,7 @@ cat >expect <<EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changed but not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -167,7 +167,7 @@ cat >expect <<EOF
 # Changes to be committed:
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changed but not staged for commit:
 #	modified:   dir1/modified
 #
 # Untracked files not listed
@@ -202,7 +202,7 @@ cat >expect <<EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changed but not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -260,7 +260,7 @@ cat >expect <<EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changed but not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -320,7 +320,7 @@ cat >expect <<\EOF
 #
 #	new file:   ../dir2/added
 #
-# Changed but not updated:
+# Changed but not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -392,7 +392,7 @@ cat >expect <<\EOF
 #
 #	<GREEN>new file:   dir2/added<RESET>
 #
-# Changed but not updated:
+# Changed but not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -521,7 +521,7 @@ cat >expect <<\EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changed but not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -614,7 +614,7 @@ cat >expect <<EOF
 #	new file:   dir2/added
 #	new file:   sm
 #
-# Changed but not updated:
+# Changed but not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -673,7 +673,7 @@ cat >expect <<EOF
 #	new file:   dir2/added
 #	new file:   sm
 #
-# Changed but not updated:
+# Changed but not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -718,7 +718,7 @@ test_expect_success 'status -s submodule summary' '
 
 cat >expect <<EOF
 # On branch master
-# Changed but not updated:
+# Changed but not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -766,7 +766,7 @@ cat >expect <<EOF
 #	new file:   dir2/added
 #	new file:   sm
 #
-# Changed but not updated:
+# Changed but not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -819,7 +819,7 @@ cat > expect << EOF
 #
 #	modified:   sm
 #
-# Changed but not updated:
+# Changed but not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -931,7 +931,7 @@ cat > expect << EOF
 #
 #	modified:   sm
 #
-# Changed but not updated:
+# Changed but not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #   (commit or discard the untracked or modified content in submodules)
@@ -989,7 +989,7 @@ cat > expect << EOF
 #
 #	modified:   sm
 #
-# Changed but not updated:
+# Changed but not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -1067,7 +1067,7 @@ test_expect_success ".git/config ignore=dirty doesn't suppress submodule summary
 
 cat > expect << EOF
 # On branch master
-# Changed but not updated:
+# Changed but not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
diff --git a/wt-status.c b/wt-status.c
index fc2438f..afb3c78 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -88,7 +88,7 @@ static void wt_status_print_dirty_header(struct wt_status *s,
 {
 	const char *c = color(WT_STATUS_HEADER, s);
 
-	color_fprintf_ln(s->fp, c, "# Changed but not updated:");
+	color_fprintf_ln(s->fp, c, "# Changed but not staged for commit:");
 	if (!advice_status_hints)
 		return;
 	if (!has_deleted)
-- 
1.7.3.2.537.g7e355
Jonathan Nieder· Oct 23, 2010, 18:13 UTC · re: Matthieu Moy · lore

Re: [PATCH 01/10] Better "Changed but not updated" message in git-status

Matthieu Moy wrote:
Show 9 quoted lines
> --- a/Documentation/gittutorial-2.txt
> +++ b/Documentation/gittutorial-2.txt
> @@ -373,7 +373,7 @@ $ git status
>  #
>  #       new file: closing.txt
>  #
> -# Changed but not updated:
> +# Changed but not staged for commit:
>  #   (use "git add <file>..." to update what will be committed)

I find this even more confusing, though I admit that may be due to habit more than anything else.

My reading, before:
	These files were changed, but the version to be committed has
	not been updated to include the latest changes (use "git add
	<file>..." to add these changes to the index).
Afterwards:
	These files were changed, but they are not staged for the
	next commit.
If I do
	echo hello >hi.c
	git add hi.c
	echo world >>hi.c
	git status

then what does it mean to say "hi.c" is not staged for commit? It actually does have changes ready for committing.

I would prefer to say something to the effect of
	# Has unstaged changes:
Anyone wordsmiths out there with ideas to make this clearer?
Matthieu Moy· Oct 23, 2010, 18:33 UTC · re: Jonathan Nieder · lore

Re: [PATCH 01/10] Better "Changed but not updated" message in git-status

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 25 quoted lines
> Matthieu Moy wrote:
>
>> --- a/Documentation/gittutorial-2.txt
>> +++ b/Documentation/gittutorial-2.txt
>> @@ -373,7 +373,7 @@ $ git status
>>  #
>>  #       new file: closing.txt
>>  #
>> -# Changed but not updated:
>> +# Changed but not staged for commit:
>>  #   (use "git add <file>..." to update what will be committed)
>
> I find this even more confusing, though I admit that may be due to
> habit more than anything else.
>
> My reading, before:
>
> 	These files were changed, but the version to be committed has
> 	not been updated to include the latest changes (use "git add
> 	<file>..." to add these changes to the index).
>
> Afterwards:
>
> 	These files were changed, but they are not staged for the
> 	next commit.

I don't see what "git status" lists as "files", but more as "changes". Actually, the header for staged commit agrees with me:

  # Changes to be committed:

So, while these _files_ may have staged changes, the modifications themselves are not commited.

> I would prefer to say something to the effect of
>
> 	# Has unstaged changes:
I'm fine with that if people prefer it. Otherwise, I propose:
  # Changes not staged for commit:
which would give some symetry in the complete output:
  # Changes to be committed:
  #
  #       modified:   foo.txt
  #
  # Changes not staged for commit:
  #
  #       modified:   foo.txt
  #
Which one do you like best?
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Jakub Narebski· Oct 23, 2010, 18:55 UTC · re: Jonathan Nieder · lore

Re: [PATCH 01/10] Better "Changed but not updated" message in git-status

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 14 quoted lines
> Matthieu Moy wrote:
> 
> > --- a/Documentation/gittutorial-2.txt
> > +++ b/Documentation/gittutorial-2.txt
> > @@ -373,7 +373,7 @@ $ git status
> >  #
> >  #       new file: closing.txt
> >  #
> > -# Changed but not updated:
> > +# Changed but not staged for commit:
> >  #   (use "git add <file>..." to update what will be committed)
> 
> I find this even more confusing, though I admit that may be due to
> habit more than anything else.
Perhaps
     # Changed but changes not staged for commit:
 
Show 26 quoted lines
> My reading, before:
> 
> 	These files were changed, but the version to be committed has
> 	not been updated to include the latest changes (use "git add
> 	<file>..." to add these changes to the index).
> 
> Afterwards:
> 
> 	These files were changed, but they are not staged for the
> 	next commit.
> 
> If I do
> 
> 	echo hello >hi.c
> 	git add hi.c
> 	echo world >>hi.c
> 	git status
> 
> then what does it mean to say "hi.c" is not staged for commit?
> It actually does have changes ready for committing.
> 
> I would prefer to say something to the effect of
> 
> 	# Has unstaged changes:
> 
> Anyone wordsmiths out there with ideas to make this clearer?
But this might be a better solution.
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Matthieu Moy· Oct 23, 2010, 16:31 UTC · re: Matthieu Moy · lore

[PATCH 02/10] Remplace "remote tracking" with "remote-tracking"

"remote-tracking" branch makes it explicit that the branch is "tracking a remote", as opposed to "remote, and tracking something".

See discussion in e.g. http://mid.gmane.org/8835ADF9-45E5-4A26-9F7F-A72ECC065BB2@gmail.com for more details.

This patch is a straightforward application of
  perl -pi -e 's/remote tracking branch/remote-tracking branch/'
except in the RelNotes directory.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/config.txt           |    2 +-
 Documentation/fetch-options.txt    |    2 +-
 Documentation/git-log.txt          |    2 +-
 Documentation/git-pull.txt         |    2 +-
 Documentation/git-remote.txt       |    4 ++--
 Documentation/gittutorial.txt      |    2 +-
 Documentation/rev-list-options.txt |    2 +-
 Documentation/user-manual.txt      |    2 +-
 builtin/checkout.c                 |    2 +-
 t/t5513-fetch-track.sh             |    2 +-
 10 files changed, 11 insertions(+), 11 deletions(-)
Show changes to 10 files +11 −11

Documentation/config.txt, Documentation/fetch-options.txt, Documentation/git-log.txt, Documentation/git-pull.txt, Documentation/git-remote.txt, Documentation/gittutorial.txt, Documentation/rev-list-options.txt, Documentation/user-manual.txt, builtin/checkout.c, t/t5513-fetch-track.sh

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 538ebb5..e625d6a 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -708,7 +708,7 @@ color.diff.<slot>::
 color.decorate.<slot>::
 	Use customized color for 'git log --decorate' output.  `<slot>` is one
 	of `branch`, `remoteBranch`, `tag`, `stash` or `HEAD` for local
-	branches, remote tracking branches, tags, stash and HEAD, respectively.
+	branches, remote-tracking branches, tags, stash and HEAD, respectively.
 
 color.grep::
 	When set to `always`, always highlight matches.  When `false` (or
diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index 470ac31..a435c23 100644
--- a/Documentation/fetch-options.txt
+++ b/Documentation/fetch-options.txt
@@ -36,7 +36,7 @@ ifndef::git-pull[]
 
 -p::
 --prune::
-	After fetching, remove any remote tracking branches which
+	After fetching, remove any remote-tracking branches which
 	no longer exist	on the remote.
 endif::git-pull[]
 
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
index 6d40f00..ff41784 100644
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -116,7 +116,7 @@ git log --follow builtin-rev-list.c::
 git log --branches --not --remotes=origin::
 
 	Shows all commits that are in any of local branches but not in
-	any of remote tracking branches for 'origin' (what you have that
+	any of remote-tracking branches for 'origin' (what you have that
 	origin doesn't).
 
 git log master --not --remotes=*/master::
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index c50f7dc..33e8438 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -26,7 +26,7 @@ With `--rebase`, it runs 'git rebase' instead of 'git merge'.
 <repository> should be the name of a remote repository as
 passed to linkgit:git-fetch[1].  <refspec> can name an
 arbitrary remote ref (for example, the name of a tag) or even
-a collection of refs with corresponding remote tracking branches
+a collection of refs with corresponding remote-tracking branches
 (e.g., refs/heads/*:refs/remotes/origin/*), but usually it is
 the name of a branch in the remote repository.
 
diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt
index 0d28feb..5e4989d 100644
--- a/Documentation/git-remote.txt
+++ b/Documentation/git-remote.txt
@@ -75,7 +75,7 @@ was passed.
 
 'rename'::
 
-Rename the remote named <old> to <new>. All remote tracking branches and
+Rename the remote named <old> to <new>. All remote-tracking branches and
 configuration settings for the remote are updated.
 +
 In case <old> and <new> are the same, and <old> is a file under
@@ -84,7 +84,7 @@ the configuration file format.
 
 'rm'::
 
-Remove the remote named <name>. All remote tracking branches and
+Remove the remote named <name>. All remote-tracking branches and
 configuration settings for the remote are removed.
 
 'set-head'::
diff --git a/Documentation/gittutorial.txt b/Documentation/gittutorial.txt
index 1c16066..f1f4086 100644
--- a/Documentation/gittutorial.txt
+++ b/Documentation/gittutorial.txt
@@ -385,7 +385,7 @@ alice$ git fetch bob
 
 Unlike the longhand form, when Alice fetches from Bob using a
 remote repository shorthand set up with 'git remote', what was
-fetched is stored in a remote tracking branch, in this case
+fetched is stored in a remote-tracking branch, in this case
 `bob/master`.  So after this:
 
 -------------------------------------
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 7a42567..7a1b164 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -264,7 +264,7 @@ endif::git-rev-list[]
 
 	Pretend as if all the refs in `refs/remotes` are listed
 	on the command line as '<commit>'. If '<pattern>' is given, limit
-	remote tracking branches to ones matching given shell glob.
+	remote-tracking branches to ones matching given shell glob.
 	If pattern lacks '?', '*', or '[', '/*' at the end is implied.
 
 --glob=<glob-pattern>::
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index fc56da6..d5505e8 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1700,7 +1700,7 @@ may wish to check the original repository for updates and merge them
 into your own work.
 
 We have already seen <<Updating-a-repository-With-git-fetch,how to
-keep remote tracking branches up to date>> with linkgit:git-fetch[1],
+keep remote-tracking branches up to date>> with linkgit:git-fetch[1],
 and how to merge two branches.  So you can merge in changes from the
 original repository's master branch with:
 
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 9240faf..9a934af 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -786,7 +786,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
 	 *   With no paths, if <something> is _not_ a commit, no -t nor -b
 	 *   was given, and there is a tracking branch whose name is
 	 *   <something> in one and only one remote, then this is a short-hand
-	 *   to fork local <something> from that remote tracking branch.
+	 *   to fork local <something> from that remote-tracking branch.
 	 *
 	 *   Otherwise <something> shall not be ambiguous.
 	 *   - If it's *only* a reference, treat it like case (1).
diff --git a/t/t5513-fetch-track.sh b/t/t5513-fetch-track.sh
index 9e74862..65d1e05 100755
--- a/t/t5513-fetch-track.sh
+++ b/t/t5513-fetch-track.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_description='fetch follows remote tracking branches correctly'
+test_description='fetch follows remote-tracking branches correctly'
 
 . ./test-lib.sh
 
-- 
1.7.3.2.537.g7e355
Jonathan Nieder· Oct 23, 2010, 18:16 UTC · re: Matthieu Moy · lore

Re: [PATCH 02/10] Remplace "remote tracking" with "remote-tracking"

Matthieu Moy wrote:
> [Subject: [PATCH 02/10] Remplace "remote tracking" with "remote-tracking"]
I think you mean "Replace". :)
> "remote-tracking" branch makes it explicit that the branch is "tracking a
> remote", as opposed to "remote, and tracking something".
All changes in this patch look good to me, for what it's worth.
Jonathan Nieder· Oct 23, 2010, 18:31 UTC · re: Matthieu Moy · lore

Re: [PATCH 02/10] Remplace "remote tracking" with "remote-tracking"

Matthieu Moy wrote:
> [Subject: [PATCH 02/10] Remplace "remote tracking" with "remote-tracking"]
I think this should say "Replace".
> "remote-tracking" branch makes it explicit that the branch is "tracking a
> remote", as opposed to "remote, and tracking something".
All changes in this patch look good to me, for what it's worth.
Matthieu Moy· Oct 23, 2010, 19:01 UTC · re: Jonathan Nieder · lore

Re: [PATCH 02/10] Remplace "remote tracking" with "remote-tracking"

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 5 quoted lines
> Matthieu Moy wrote:
>
>> [Subject: [PATCH 02/10] Remplace "remote tracking" with "remote-tracking"]
>
> I think this should say "Replace".
Sure, sorry. Probably my fingers wanted to type the french word here?
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Matthieu Moy· Oct 23, 2010, 16:31 UTC · re: Matthieu Moy · lore

[PATCH 03/10] Change remote tracking to remote-tracking in non-trivial places

To complement the straightforward perl application in previous patch, this adds a few manual changes.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/everyday.txt    |    6 +++---
 Documentation/git-gc.txt      |    6 +++---
 Documentation/gittutorial.txt |    4 ++--
 t/t5400-send-pack.sh          |    2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)
Show changes to 4 files +9 −9

Documentation/everyday.txt, Documentation/git-gc.txt, Documentation/gittutorial.txt, t/t5400-send-pack.sh

diff --git a/Documentation/everyday.txt b/Documentation/everyday.txt
index e0ba8cc..ae413e5 100644
--- a/Documentation/everyday.txt
+++ b/Documentation/everyday.txt
@@ -180,12 +180,12 @@ directory; clone from it to start a repository on the satellite
 machine.
 <2> clone sets these configuration variables by default.
 It arranges `git pull` to fetch and store the branches of mothership
-machine to local `remotes/origin/*` tracking branches.
+machine to local `remotes/origin/*` remote-tracking branches.
 <3> arrange `git push` to push local `master` branch to
 `remotes/satellite/master` branch of the mothership machine.
 <4> push will stash our work away on `remotes/satellite/master`
-tracking branch on the mothership machine.  You could use this as
-a back-up method.
+remote-tracking branch on the mothership machine.  You could use this
+as a back-up method.
 <5> on mothership machine, merge the work done on the satellite
 machine into the master branch.
 
diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt
index 315f07e..801aede 100644
--- a/Documentation/git-gc.txt
+++ b/Documentation/git-gc.txt
@@ -89,7 +89,7 @@ are not part of the current project most users will want to expire
 them sooner.  This option defaults to '30 days'.
 
 The above two configuration variables can be given to a pattern.  For
-example, this sets non-default expiry values only to remote tracking
+example, this sets non-default expiry values only to remote-tracking
 branches:
 
 ------------
@@ -128,8 +128,8 @@ Notes
 
 'git gc' tries very hard to be safe about the garbage it collects. In
 particular, it will keep not only objects referenced by your current set
-of branches and tags, but also objects referenced by the index, remote
-tracking branches, refs saved by 'git filter-branch' in
+of branches and tags, but also objects referenced by the index,
+remote-tracking branches, refs saved by 'git filter-branch' in
 refs/original/, or reflogs (which may reference commits in branches
 that were later amended or rewound).
 
diff --git a/Documentation/gittutorial.txt b/Documentation/gittutorial.txt
index f1f4086..0982f74 100644
--- a/Documentation/gittutorial.txt
+++ b/Documentation/gittutorial.txt
@@ -402,8 +402,8 @@ could merge the changes into her master branch:
 alice$ git merge bob/master
 -------------------------------------
 
-This `merge` can also be done by 'pulling from her own remote
-tracking branch', like this:
+This `merge` can also be done by 'pulling from her own remote-tracking
+branch', like this:
 
 -------------------------------------
 alice$ git pull . remotes/bob/master
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index 5bcf0b8..b0b2684 100755
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -129,7 +129,7 @@ test_expect_success 'denyNonFastforwards trumps --force' '
 	test "$victim_orig" = "$victim_head"
 '
 
-test_expect_success 'push --all excludes remote tracking hierarchy' '
+test_expect_success 'push --all excludes remote-tracking hierarchy' '
 	mkdir parent &&
 	(
 	    cd parent &&
-- 
1.7.3.2.537.g7e355
Jonathan Nieder· Oct 23, 2010, 18:44 UTC · re: Matthieu Moy · lore

Re: [PATCH 03/10] Change remote tracking to remote-tracking in non-trivial places

Matthieu Moy wrote:
Show 8 quoted lines
> --- a/Documentation/everyday.txt
> +++ b/Documentation/everyday.txt
> @@ -180,12 +180,12 @@ directory; clone from it to start a repository on the satellite
>  machine.
>  <2> clone sets these configuration variables by default.
>  It arranges `git pull` to fetch and store the branches of mothership
> -machine to local `remotes/origin/*` tracking branches.
> +machine to local `remotes/origin/*` remote-tracking branches.

I find this scans better as "tracking branches", but consistent use of jargon might trump that. Maybe it could be reworded somehow?

	<2> clone sets these configuration variables by default.
	They arrange for `git pull` to fetch and store the branches
	of the mothership machine to local `remotes/origin/*` tracking
	refs.

Not sure. remotes/origin/* are not branches for local development, so calling them "branches" without a "remote-tracking" caveat can be confusing.

Show 9 quoted lines
> --- a/Documentation/git-gc.txt
> +++ b/Documentation/git-gc.txt
> @@ -89,7 +89,7 @@ are not part of the current project most users will want to expire
>  them sooner.  This option defaults to '30 days'.
>  
>  The above two configuration variables can be given to a pattern.  For
> -example, this sets non-default expiry values only to remote tracking
> +example, this sets non-default expiry values only to remote-tracking
>  branches:

The rest of the changes in this patch would have been caught by the "perl -pi ..." command, except line wrapping got in the way. They are obviously good.

Matthieu Moy· Oct 23, 2010, 19:04 UTC · re: Jonathan Nieder · lore

Re: [PATCH 03/10] Change remote tracking to remote-tracking in non-trivial places

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 22 quoted lines
> Matthieu Moy wrote:
>
>> --- a/Documentation/everyday.txt
>> +++ b/Documentation/everyday.txt
>> @@ -180,12 +180,12 @@ directory; clone from it to start a repository on the satellite
>>  machine.
>>  <2> clone sets these configuration variables by default.
>>  It arranges `git pull` to fetch and store the branches of mothership
>> -machine to local `remotes/origin/*` tracking branches.
>> +machine to local `remotes/origin/*` remote-tracking branches.
>
> I find this scans better as "tracking branches", but consistent use of
> jargon might trump that.  Maybe it could be reworded somehow?
>
> 	<2> clone sets these configuration variables by default.
> 	They arrange for `git pull` to fetch and store the branches
> 	of the mothership machine to local `remotes/origin/*` tracking
> 	refs.
>
> Not sure.  remotes/origin/* are not branches for local development, so
> calling them "branches" without a "remote-tracking" caveat can be
> confusing.

That's not terribly important, since we already have "tracking" in the sentence, and `remotes/origin/*` to make it unambiguous, but I tend to prefer using the exact same wording everywhere.

What do other think?
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Matthieu Moy· Oct 23, 2010, 16:31 UTC · re: Matthieu Moy · lore
One more step towards consistancy in our documentation...
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/config.txt           |    4 ++--
 Documentation/git-fetch.txt        |    2 +-
 Documentation/git-pull.txt         |    6 +++---
 Documentation/git-remote.txt       |    2 +-
 Documentation/git-tag.txt          |    4 ++--
 Documentation/glossary-content.txt |    8 ++++----
 Documentation/user-manual.txt      |    2 +-
 7 files changed, 14 insertions(+), 14 deletions(-)
Show changes to 7 files +14 −14

Documentation/config.txt, Documentation/git-fetch.txt, Documentation/git-pull.txt, Documentation/git-remote.txt, Documentation/git-tag.txt, Documentation/glossary-content.txt, Documentation/user-manual.txt

diff --git a/Documentation/config.txt b/Documentation/config.txt
index e625d6a..e4f16d8 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -680,7 +680,7 @@ color.branch::
 color.branch.<slot>::
 	Use customized color for branch coloration. `<slot>` is one of
 	`current` (the current branch), `local` (a local branch),
-	`remote` (a tracking branch in refs/remotes/), `plain` (other
+	`remote` (a remote-tracking branch in refs/remotes/), `plain` (other
 	refs).
 +
 The value for these configuration variables is a list of colors (at most
@@ -1102,7 +1102,7 @@ gui.newbranchtemplate::
 	linkgit:git-gui[1].
 
 gui.pruneduringfetch::
-	"true" if linkgit:git-gui[1] should prune tracking branches when
+	"true" if linkgit:git-gui[1] should prune remote-tracking branches when
 	performing a fetch. The default value is "false".
 
 gui.trustmtime::
diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt
index d159e88..c76e313 100644
--- a/Documentation/git-fetch.txt
+++ b/Documentation/git-fetch.txt
@@ -26,7 +26,7 @@ The ref names and their object names of fetched refs are stored
 in `.git/FETCH_HEAD`.  This information is left for a later merge
 operation done by 'git merge'.
 
-When <refspec> stores the fetched result in tracking branches,
+When <refspec> stores the fetched result in remote-tracking branches,
 the tags that point at these branches are automatically
 followed.  This is done by first fetching from the remote using
 the given <refspec>s, and if the repository has objects that are
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index 33e8438..54e7013 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -134,7 +134,7 @@ and if there is not any such variable, the value on `URL: ` line
 in `$GIT_DIR/remotes/<origin>` file is used.
 
 In order to determine what remote branches to fetch (and
-optionally store in the tracking branches) when the command is
+optionally store in the remote-tracking branches) when the command is
 run without any refspec parameters on the command line, values
 of the configuration variable `remote.<origin>.fetch` are
 consulted, and if there aren't any, `$GIT_DIR/remotes/<origin>`
@@ -147,9 +147,9 @@ refs/heads/*:refs/remotes/origin/*
 ------------
 
 A globbing refspec must have a non-empty RHS (i.e. must store
-what were fetched in tracking branches), and its LHS and RHS
+what were fetched in remote-tracking branches), and its LHS and RHS
 must end with `/*`.  The above specifies that all remote
-branches are tracked using tracking branches in
+branches are tracked using remote-tracking branches in
 `refs/remotes/origin/` hierarchy under the same name.
 
 The rule to determine which remote branch to merge after
diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt
index 5e4989d..c258ea4 100644
--- a/Documentation/git-remote.txt
+++ b/Documentation/git-remote.txt
@@ -146,7 +146,7 @@ With `-n` option, the remote heads are not queried first with
 
 'prune'::
 
-Deletes all stale tracking branches under <name>.
+Deletes all stale remote-tracking branches under <name>.
 These stale branches have already been removed from the remote repository
 referenced by <name>, but are still locally available in
 "remotes/<name>".
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index 31c78a8..8b169e3 100644
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -177,7 +177,7 @@ On Automatic following
 ~~~~~~~~~~~~~~~~~~~~~~
 
 If you are following somebody else's tree, you are most likely
-using tracking branches (`refs/heads/origin` in traditional
+using remote-tracking branches (`refs/heads/origin` in traditional
 layout, or `refs/remotes/origin/master` in the separate-remote
 layout).  You usually want the tags from the other end.
 
@@ -232,7 +232,7 @@ this case.
 It may well be that among networking people, they may want to
 exchange the tags internal to their group, but in that workflow
 they are most likely tracking with each other's progress by
-having tracking branches.  Again, the heuristic to automatically
+having remote-tracking branches.  Again, the heuristic to automatically
 follow such tags is a good thing.
 
 
diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt
index 1f029f8..a76de62 100644
--- a/Documentation/glossary-content.txt
+++ b/Documentation/glossary-content.txt
@@ -131,7 +131,7 @@ to point at the new commit.
 	you have. In such these cases, you do not make a new <<def_merge,merge>>
 	<<def_commit,commit>> but instead just update to his
 	revision. This will happen frequently on a
-	<<def_tracking_branch,tracking branch>> of a remote
+	<<def_remote_tracking_branch,remote-tracking branch>> of a remote
 	<<def_repository,repository>>.
 
 [[def_fetch]]fetch::
@@ -260,7 +260,7 @@ This commit is referred to as a "merge commit", or sometimes just a
 	The default upstream <<def_repository,repository>>. Most projects have
 	at least one upstream project which they track. By default
 	'origin' is used for that purpose. New upstream updates
-	will be fetched into remote <<def_tracking_branch,tracking branches>> named
+	will be fetched into remote <<def_remote_tracking_branch,remote-tracking branches>> named
 	origin/name-of-upstream-branch, which you can see using
 	`git branch -r`.
 
@@ -418,11 +418,11 @@ This commit is referred to as a "merge commit", or sometimes just a
 	that each contain very well defined concepts or small incremental yet
 	related changes.
 
-[[def_tracking_branch]]tracking branch::
+[[def_remote_tracking_branch]]remote-tracking branch::
 	A regular git <<def_branch,branch>> that is used to follow changes from
 	another <<def_repository,repository>>. A tracking
 	branch should not contain direct modifications or have local commits
-	made to it. A tracking branch can usually be
+	made to it. A remote-tracking branch can usually be
 	identified as the right-hand-side <<def_ref,ref>> in a Pull:
 	<<def_refspec,refspec>>.
 
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index d5505e8..d7835ca 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -435,7 +435,7 @@ linux-nfs/master
 origin/master
 -------------------------------------------------
 
-If you run "git fetch <remote>" later, the tracking branches for the
+If you run "git fetch <remote>" later, the remote-tracking branches for the
 named <remote> will be updated.
 
 If you examine the file .git/config, you will see that git has added
-- 
1.7.3.2.537.g7e355
Jonathan Nieder· Oct 23, 2010, 18:48 UTC · re: Matthieu Moy · lore

Re: [PATCH 04/10] Change "tracking branch" to "remote-tracking branch"

Matthieu Moy wrote:
Show 9 quoted lines
> --- a/Documentation/glossary-content.txt
> +++ b/Documentation/glossary-content.txt
> @@ -131,7 +131,7 @@ to point at the new commit.
>  	you have. In such these cases, you do not make a new <<def_merge,merge>>
>  	<<def_commit,commit>> but instead just update to his
>  	revision. This will happen frequently on a
> -	<<def_tracking_branch,tracking branch>> of a remote
> +	<<def_remote_tracking_branch,remote-tracking branch>> of a remote
>  	<<def_repository,repository>>.
Why not keep the anchor name, like so:
	<<def_tracking_branch,remote-tracking branch>>
(for brevity and to keep old links valid)?
Matthieu Moy· Oct 28, 2010, 01:55 UTC · re: Jonathan Nieder · lore

Re: [PATCH 04/10] Change "tracking branch" to "remote-tracking branch"

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 17 quoted lines
> Matthieu Moy wrote:
>
>> --- a/Documentation/glossary-content.txt
>> +++ b/Documentation/glossary-content.txt
>> @@ -131,7 +131,7 @@ to point at the new commit.
>>  	you have. In such these cases, you do not make a new <<def_merge,merge>>
>>  	<<def_commit,commit>> but instead just update to his
>>  	revision. This will happen frequently on a
>> -	<<def_tracking_branch,tracking branch>> of a remote
>> +	<<def_remote_tracking_branch,remote-tracking branch>> of a remote
>>  	<<def_repository,repository>>.
>
> Why not keep the anchor name, like so:
>
> 	<<def_tracking_branch,remote-tracking branch>>
>
> (for brevity and to keep old links valid)?
(sorry, I had overlooked this message)

We could do that, but I don't think there are many links to the anchor from outside (http://www.google.com/search?q=link%3Ahttp%3A%2F%2Fwww.kernel.org%2Fpub%2Fsoftware%2Fscm%2Fgit%2Fdocs%2Fgitglossary.html suggests there are none, but it seems to have missed at least the one in git(1)), and links would still point to the right page, if not to the right anchor.

Your proposal would break the regularity of anchor names, which I think is more important than brievety.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Matthieu Moy· Oct 23, 2010, 16:31 UTC · re: Matthieu Moy · lore

[PATCH 05/10] Change "tracking branch" to "remote-tracking branch" in C code

(Just like we did for documentation already)
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 builtin/checkout.c |    2 +-
 builtin/fetch.c    |    4 ++--
 remote.c           |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
Show changes to 3 files +4 −4

builtin/checkout.c, builtin/fetch.c, remote.c

diff --git a/builtin/checkout.c b/builtin/checkout.c
index 9a934af..1fa9ce4 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -784,7 +784,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
 	 *   between A and B, A...B names that merge base.
 	 *
 	 *   With no paths, if <something> is _not_ a commit, no -t nor -b
-	 *   was given, and there is a tracking branch whose name is
+	 *   was given, and there is a remote-tracking branch whose name is
 	 *   <something> in one and only one remote, then this is a short-hand
 	 *   to fork local <something> from that remote-tracking branch.
 	 *
diff --git a/builtin/fetch.c b/builtin/fetch.c
index d35f000..3b0b614 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -52,7 +52,7 @@ static struct option builtin_fetch_options[] = {
 	OPT_SET_INT('n', NULL, &tags,
 		    "do not fetch all tags (--no-tags)", TAGS_UNSET),
 	OPT_BOOLEAN('p', "prune", &prune,
-		    "prune tracking branches no longer on remote"),
+		    "prune remote-tracking branches no longer on remote"),
 	OPT_BOOLEAN(0, "dry-run", &dry_run,
 		    "dry run"),
 	OPT_BOOLEAN('k', "keep", &keep, "keep downloaded pack"),
@@ -98,7 +98,7 @@ static void add_merge_config(struct ref **head,
 			continue;
 
 		/*
-		 * Not fetched to a tracking branch?  We need to fetch
+		 * Not fetched to a remote-tracking branch?  We need to fetch
 		 * it anyway to allow this branch's "branch.$name.merge"
 		 * to be honored by 'git pull', but we do not have to
 		 * fail if branch.$name.merge is misconfigured to point
diff --git a/remote.c b/remote.c
index 9143ec7..ca42a12 100644
--- a/remote.c
+++ b/remote.c
@@ -493,7 +493,7 @@ static void read_config(void)
 }
 
 /*
- * We need to make sure the tracking branches are well formed, but a
+ * We need to make sure the remote-tracking branches are well formed, but a
  * wildcard refspec in "struct refspec" must have a trailing slash. We
  * temporarily drop the trailing '/' while calling check_ref_format(),
  * and put it back.  The caller knows that a CHECK_REF_FORMAT_ONELEVEL
-- 
1.7.3.2.537.g7e355
Jonathan Nieder· Oct 23, 2010, 18:51 UTC · re: Matthieu Moy · lore

Re: [PATCH 05/10] Change "tracking branch" to "remote-tracking branch" in C code

Matthieu Moy wrote:
> [Subject: [PATCH 05/10] Change "tracking branch" to "remote-tracking branch" in C code]
>
> (Just like we did for documentation already)

Could be squashed with the previous in my opinion. Comments especially but also usage strings still feel like documentation.

Matthieu Moy· Oct 26, 2010, 22:15 UTC · re: Jonathan Nieder · lore

Re: [PATCH 05/10] Change "tracking branch" to "remote-tracking branch" in C code

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 8 quoted lines
> Matthieu Moy wrote:
>
>> [Subject: [PATCH 05/10] Change "tracking branch" to "remote-tracking branch" in C code]
>>
>> (Just like we did for documentation already)
>
> Could be squashed with the previous in my opinion.  Comments
> especially but also usage strings still feel like documentation.
Oups, I had missed this one.
Yes, why not. I'll do that in the next round.
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Matthieu Moy· Oct 23, 2010, 16:31 UTC · re: Matthieu Moy · lore

[PATCH 06/10] Change incorrect uses of "remote branch" meaning "remote-tracking"

"remote branch" is a branch hosted in a remote repository, while "remote-tracking branch" is a copy of such branch, hosted locally. The distinction is subtle when the copy is up-to-date, but rather fundamental to understand what "git fetch" and "git push" do.

This patch should fix all incorrect usages in Documentation/ directory.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/config.txt       |    7 ++++---
 Documentation/git-branch.txt   |   11 ++++++-----
 Documentation/git-checkout.txt |    2 +-
 Documentation/git-clone.txt    |    2 +-
 Documentation/git-describe.txt |    2 +-
 Documentation/user-manual.txt  |    9 +++++----
 6 files changed, 18 insertions(+), 15 deletions(-)
Show changes to 6 files +18 −14

Documentation/config.txt, Documentation/git-branch.txt, Documentation/git-checkout.txt, Documentation/git-clone.txt, Documentation/git-describe.txt, Documentation/user-manual.txt

diff --git a/Documentation/config.txt b/Documentation/config.txt
index e4f16d8..6a6c0b5 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -601,8 +601,9 @@ branch.autosetupmerge::
 	this behavior can be chosen per-branch using the `--track`
 	and `--no-track` options. The valid settings are: `false` -- no
 	automatic setup is done; `true` -- automatic setup is done when the
-	starting point is a remote branch; `always` -- automatic setup is
-	done when the starting point is either a local branch or remote
+	starting point is a remote-tracking branch; `always` --
+	automatic setup is done when the starting point is either a
+	local branch or remote-tracking
 	branch. This option defaults to true.
 
 branch.autosetuprebase::
@@ -613,7 +614,7 @@ branch.autosetuprebase::
 	When `local`, rebase is set to true for tracked branches of
 	other local branches.
 	When `remote`, rebase is set to true for tracked branches of
-	remote branches.
+	remote-tracking branches.
 	When `always`, rebase will be set to true for all tracking
 	branches.
 	See "branch.autosetupmerge" for details on how to set up a
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 1940256..7f23c56 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -37,9 +37,9 @@ Note that this will create the new branch, but it will not switch the
 working tree to it; use "git checkout <newbranch>" to switch to the
 new branch.
 
-When a local branch is started off a remote branch, git sets up the
+When a local branch is started off a remote-tracking branch, git sets up the
 branch so that 'git pull' will appropriately merge from
-the remote branch. This behavior may be changed via the global
+the remote-tracking branch. This behavior may be changed via the global
 `branch.autosetupmerge` configuration flag. That setting can be
 overridden by using the `--track` and `--no-track` options.
 
@@ -89,7 +89,8 @@ OPTIONS
 	Move/rename a branch even if the new branch name already exists.
 
 --color[=<when>]::
-	Color branches to highlight current, local, and remote branches.
+	Color branches to highlight current, local, and
+	remote-tracking branches.
 	The value must be always (the default), never, or auto.
 
 --no-color::
@@ -125,11 +126,11 @@ OPTIONS
 	it directs `git pull` without arguments to pull from the
 	upstream when the new branch is checked out.
 +
-This behavior is the default when the start point is a remote branch.
+This behavior is the default when the start point is a remote-tracking branch.
 Set the branch.autosetupmerge configuration variable to `false` if you
 want `git checkout` and `git branch` to always behave as if '--no-track'
 were given. Set it to `always` if you want this behavior when the
-start-point is either a local or remote branch.
+start-point is either a local or remote-tracking branch.
 
 --no-track::
 	Do not set up "upstream" configuration, even if the
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 22d3611..880763d 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -98,7 +98,7 @@ entries; instead, unmerged entries are ignored.
 	"--track" in linkgit:git-branch[1] for details.
 +
 If no '-b' option is given, the name of the new branch will be
-derived from the remote branch.  If "remotes/" or "refs/remotes/"
+derived from the remote-tracking branch.  If "remotes/" or "refs/remotes/"
 is prefixed it is stripped away, and then the part up to the
 next slash (which would be the nickname of the remote) is removed.
 This would tell us to use "hack" as the local branch when branching
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index ab72933..2320382 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -131,7 +131,7 @@ objects from the source repository into a pack in the cloned repository.
 	Set up a mirror of the source repository.  This implies `--bare`.
 	Compared to `--bare`, `--mirror` not only maps local branches of the
 	source to local branches of the target, it maps all refs (including
-	remote branches, notes etc.) and sets up a refspec configuration such
+	remote-tracking branches, notes etc.) and sets up a refspec configuration such
 	that all these refs are overwritten by a `git remote update` in the
 	target repository.
 
diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
index 7ef9d51..02e015a 100644
--- a/Documentation/git-describe.txt
+++ b/Documentation/git-describe.txt
@@ -37,7 +37,7 @@ OPTIONS
 --all::
 	Instead of using only the annotated tags, use any ref
 	found in `.git/refs/`.  This option enables matching
-	any known branch, remote branch, or lightweight tag.
+	any known branch, remote-tracking branch, or lightweight tag.
 
 --tags::
 	Instead of using only the annotated tags, use any tag
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index d7835ca..d70f3e0 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1724,7 +1724,8 @@ accomplish the above with just a simple
 $ git pull
 -------------------------------------------------
 
-More generally, a branch that is created from a remote branch will pull
+More generally, a branch that is created from a remote-tracking branch
+will pull
 by default from that branch.  See the descriptions of the
 branch.<name>.remote and branch.<name>.merge options in
 linkgit:git-config[1], and the discussion of the `--track` option in
@@ -2106,7 +2107,7 @@ $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
 $ cd work
 -------------------------------------------------
 
-Linus's tree will be stored in the remote branch named origin/master,
+Linus's tree will be stored in the remote-tracking branch named origin/master,
 and can be updated using linkgit:git-fetch[1]; you can track other
 public trees using linkgit:git-remote[1] to set up a "remote" and
 linkgit:git-fetch[1] to keep them up-to-date; see
@@ -2800,8 +2801,8 @@ Be aware that commits that the old version of example/master pointed at
 may be lost, as we saw in the previous section.
 
 [[remote-branch-configuration]]
-Configuring remote branches
----------------------------
+Configuring remote-tracking branches
+------------------------------------
 
 We saw above that "origin" is just a shortcut to refer to the
 repository that you originally cloned from.  This information is
-- 
1.7.3.2.537.g7e355
Matthieu Moy· Oct 23, 2010, 16:31 UTC · re: Matthieu Moy · lore

[PATCH 07/10] Change incorrect "remote branch" to "remote tracking branch" in C code

(Just like we did for documentation already)
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 branch.h                               |    2 +-
 builtin/fetch.c                        |    2 +-
 builtin/remote.c                       |    6 +++---
 contrib/examples/builtin-fetch--tool.c |    2 +-
 t/t5505-remote.sh                      |    6 +++---
 t/t7608-merge-messages.sh              |    2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)
Show changes to 6 files +10 −10

branch.h, builtin/fetch.c, builtin/remote.c, contrib/examples/builtin-fetch--tool.c, t/t5505-remote.sh, t/t7608-merge-messages.sh

diff --git a/branch.h b/branch.h
index eed817a..2004632 100644
--- a/branch.h
+++ b/branch.h
@@ -22,7 +22,7 @@ void create_branch(const char *head, const char *name, const char *start_name,
 void remove_branch_state(void);
 
 /*
- * Configure local branch "local" to merge remote branch "remote"
+ * Configure local branch "local" to merge remote-tracking branch "remote"
  * taken from origin "origin".
  */
 #define BRANCH_CONFIG_VERBOSE 01
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 3b0b614..4243ef0 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -359,7 +359,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
 			what = rm->name + 10;
 		}
 		else if (!prefixcmp(rm->name, "refs/remotes/")) {
-			kind = "remote branch";
+			kind = "remote-tracking branch";
 			what = rm->name + 13;
 		}
 		else {
diff --git a/builtin/remote.c b/builtin/remote.c
index e9a6e09..4149e30 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -507,7 +507,7 @@ static int add_branch_for_removal(const char *refname,
 			return 0;
 	}
 
-	/* don't delete non-remote refs */
+	/* don't delete non-remote-tracking refs */
 	if (prefixcmp(refname, "refs/remotes")) {
 		/* advise user how to delete local branches */
 		if (!prefixcmp(refname, "refs/heads/"))
@@ -791,9 +791,9 @@ static int rm(int argc, const char **argv)
 
 	if (skipped.nr) {
 		fprintf(stderr, skipped.nr == 1 ?
-			"Note: A non-remote branch was not removed; "
+			"Note: A non-remote-tracking branch was not removed; "
 			"to delete it, use:\n" :
-			"Note: Non-remote branches were not removed; "
+			"Note: Non-remote-tracking branches were not removed; "
 			"to delete them, use:\n");
 		for (i = 0; i < skipped.nr; i++)
 			fprintf(stderr, "  git branch -d %s\n",
diff --git a/contrib/examples/builtin-fetch--tool.c b/contrib/examples/builtin-fetch--tool.c
index cd10dbc..3140e40 100644
--- a/contrib/examples/builtin-fetch--tool.c
+++ b/contrib/examples/builtin-fetch--tool.c
@@ -148,7 +148,7 @@ static int append_fetch_head(FILE *fp,
 		what = remote_name + 10;
 	}
 	else if (!strncmp(remote_name, "refs/remotes/", 13)) {
-		kind = "remote branch";
+		kind = "remote-tracking branch";
 		what = remote_name + 13;
 	}
 	else {
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index 5d1c66e..48eeba3 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -107,16 +107,16 @@ test_expect_success 'remove remote' '
 )
 '
 
-test_expect_success 'remove remote protects non-remote branches' '
+test_expect_success 'remove remote protects non-remote-tracking branches' '
 (
 	cd test &&
 	{ cat >expect1 <<EOF
-Note: A non-remote branch was not removed; to delete it, use:
+Note: A non-remote-tracking branch was not removed; to delete it, use:
   git branch -d master
 EOF
 	} &&
 	{ cat >expect2 <<EOF
-Note: Non-remote branches were not removed; to delete them, use:
+Note: Non-remote-tracking branches were not removed; to delete them, use:
   git branch -d foobranch
   git branch -d master
 EOF
diff --git a/t/t7608-merge-messages.sh b/t/t7608-merge-messages.sh
index 28d5679..1c71296 100755
--- a/t/t7608-merge-messages.sh
+++ b/t/t7608-merge-messages.sh
@@ -47,7 +47,7 @@ test_expect_success 'ambiguous tag' '
 	check_oneline "Merge commit QambiguousQ"
 '
 
-test_expect_success 'remote branch' '
+test_expect_success 'remote-tracking branch' '
 	git checkout -b remote master &&
 	test_commit remote-1 &&
 	git update-ref refs/remotes/origin/master remote &&
-- 
1.7.3.2.537.g7e355
Jonathan Nieder· Oct 23, 2010, 18:58 UTC · re: Matthieu Moy · lore

Re: [PATCH 07/10] Change incorrect "remote branch" to "remote tracking branch" in C code

Matthieu Moy wrote:
Show 11 quoted lines
> --- a/branch.h
> +++ b/branch.h
> @@ -22,7 +22,7 @@ void create_branch(const char *head, const char *name, const char *start_name,
>  void remove_branch_state(void);
>  
>  /*
> - * Configure local branch "local" to merge remote branch "remote"
> + * Configure local branch "local" to merge remote-tracking branch "remote"
>   * taken from origin "origin".
>   */
>  #define BRANCH_CONFIG_VERBOSE 01

Is this really more accurate? I thought what install_branch_config does is to configure local branch "local" as downstream to remote branch "remote" from origin "origin". That means:

 - "git pull" fetches that remote and then merges the corresponding
   remote-tracking branch
 - "git remote show" compares the local branch to the remote branch
 - "git branch -v" compares the local branch to the remote-tracking
   branch
and so on.
Show 9 quoted lines
> index 3b0b614..4243ef0 100644
> --- a/builtin/fetch.c
> +++ b/builtin/fetch.c
> @@ -359,7 +359,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
>  			what = rm->name + 10;
>  		}
>  		else if (!prefixcmp(rm->name, "refs/remotes/")) {
> -			kind = "remote branch";
> +			kind = "remote-tracking branch";
For use by "git merge" and other "git fmt-merge-msg"-like consumers.  Good.
Show 12 quoted lines
> --- a/builtin/remote.c
> +++ b/builtin/remote.c
> @@ -791,9 +791,9 @@ static int rm(int argc, const char **argv)
>  
>  	if (skipped.nr) {
>  		fprintf(stderr, skipped.nr == 1 ?
> -			"Note: A non-remote branch was not removed; "
> +			"Note: A non-remote-tracking branch was not removed; "
>  			"to delete it, use:\n" :
> -			"Note: Non-remote branches were not removed; "
> +			"Note: Non-remote-tracking branches were not removed; "
>  			"to delete them, use:\n");
This wording is ugly.  Maybe something to this effect would be better?
	Note: A ref outside the refs/remotes/ hierarchy was not removed:
Show 8 quoted lines
> --- a/t/t5505-remote.sh
> +++ b/t/t5505-remote.sh
> @@ -107,16 +107,16 @@ test_expect_success 'remove remote' '
>  )
>  '
>  
> -test_expect_success 'remove remote protects non-remote branches' '
> +test_expect_success 'remove remote protects non-remote-tracking branches' '
Maybe:
	test_expect_success 'remove remote protects local branches' '
since that is what is important in practice.
Matthieu Moy· Oct 23, 2010, 19:19 UTC · re: Jonathan Nieder · lore

Re: [PATCH 07/10] Change incorrect "remote branch" to "remote tracking branch" in C code

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 15 quoted lines
> Matthieu Moy wrote:
>
>> --- a/branch.h
>> +++ b/branch.h
>> @@ -22,7 +22,7 @@ void create_branch(const char *head, const char *name, const char *start_name,
>>  void remove_branch_state(void);
>>  
>>  /*
>> - * Configure local branch "local" to merge remote branch "remote"
>> + * Configure local branch "local" to merge remote-tracking branch "remote"
>>   * taken from origin "origin".
>>   */
>>  #define BRANCH_CONFIG_VERBOSE 01
>
> Is this really more accurate?
Good question ;-).
Show 11 quoted lines
> I thought what install_branch_config does is to configure local
> branch "local" as downstream to remote branch "remote" from origin
> "origin". That means:
>
>  - "git pull" fetches that remote and then merges the corresponding
>    remote-tracking branch
>  - "git remote show" compares the local branch to the remote branch
>  - "git branch -v" compares the local branch to the remote-tracking
>    branch
>
> and so on.

(there's also "git status" which says how many commits are in a branch and not the other)

Well, actually, this configuration creates a relationship from the local branch to both the remote-tracking and the remote branch. Disconnected operations (git status for example) will deal with the remote-tracking, but "pull" will pull from the actually remote one.

Anyway, the original wording was not ambiguous (thanks to the "taken from origin" part), so I'm fine with dropping this hunk.

Show 26 quoted lines
>> index 3b0b614..4243ef0 100644
>> --- a/builtin/fetch.c
>> +++ b/builtin/fetch.c
>> @@ -359,7 +359,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
>>  			what = rm->name + 10;
>>  		}
>>  		else if (!prefixcmp(rm->name, "refs/remotes/")) {
>> -			kind = "remote branch";
>> +			kind = "remote-tracking branch";
>
> For use by "git merge" and other "git fmt-merge-msg"-like consumers.  Good.
>
>> --- a/builtin/remote.c
>> +++ b/builtin/remote.c
>> @@ -791,9 +791,9 @@ static int rm(int argc, const char **argv)
>>  
>>  	if (skipped.nr) {
>>  		fprintf(stderr, skipped.nr == 1 ?
>> -			"Note: A non-remote branch was not removed; "
>> +			"Note: A non-remote-tracking branch was not removed; "
>>  			"to delete it, use:\n" :
>> -			"Note: Non-remote branches were not removed; "
>> +			"Note: Non-remote-tracking branches were not removed; "
>>  			"to delete them, use:\n");
>
> This wording is ugly.

I didn't like the double-dash either, but couldn't find anything better.

> Maybe something to this effect would be better?
>
> 	Note: A ref outside the refs/remotes/ hierarchy was not removed:

Actually, that's even more accurate. The non-deleted branch is somehow a remote-tracking since "fetch" feeds it, and the code detecting this case is:

	/* don't delete non-remote-tracking refs */
	if (prefixcmp(refname, "refs/remotes")) {
		/* advise user how to delete local branches */
		if (!prefixcmp(refname, "refs/heads/"))
			string_list_append(branches->skipped,
					   abbrev_branch(refname));
		/* silently skip over other non-remote refs */
		return 0;
	}

hence, really what you wrote. I just disagree with the "ref", since according to the code, only branches show this note, other are skept silently.

So, I'll make this:
Note: A branch outside the refs/remotes/ hierarchy was not removed:
Show 14 quoted lines
>> --- a/t/t5505-remote.sh
>> +++ b/t/t5505-remote.sh
>> @@ -107,16 +107,16 @@ test_expect_success 'remove remote' '
>>  )
>>  '
>>  
>> -test_expect_success 'remove remote protects non-remote branches' '
>> +test_expect_success 'remove remote protects non-remote-tracking branches' '
>
> Maybe:
>
> 	test_expect_success 'remove remote protects local branches' '
>
> since that is what is important in practice.
I buy that too.
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Matthieu Moy· Oct 23, 2010, 16:31 UTC · re: Matthieu Moy · lore

[PATCH 08/10] Use 'remote-tracking branch' in generated merge messages

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 builtin/fmt-merge-msg.c           |    6 +++---
 builtin/merge.c                   |    2 +-
 t/t1507-rev-parse-upstream.sh     |    2 +-
 t/t3409-rebase-preserve-merges.sh |    2 +-
 t/t7608-merge-messages.sh         |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)
Show changes to 5 files +7 −7

builtin/fmt-merge-msg.c, builtin/merge.c, t/t1507-rev-parse-upstream.sh, t/t3409-rebase-preserve-merges.sh, t/t7608-merge-messages.sh

diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index 78c7774..5189b16 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -100,8 +100,8 @@ static int handle_line(char *line)
 		origin = line;
 		string_list_append(&src_data->tag, origin + 4);
 		src_data->head_status |= 2;
-	} else if (!prefixcmp(line, "remote branch ")) {
-		origin = line + 14;
+	} else if (!prefixcmp(line, "remote-tracking branch ")) {
+		origin = line + strlen("remote-tracking branch ");
 		string_list_append(&src_data->r_branch, origin);
 		src_data->head_status |= 2;
 	} else {
@@ -233,7 +233,7 @@ static void do_fmt_merge_msg_title(struct strbuf *out,
 		if (src_data->r_branch.nr) {
 			strbuf_addstr(out, subsep);
 			subsep = ", ";
-			print_joined("remote branch ", "remote branches ",
+			print_joined("remote-tracking branch ", "remote-tracking branches ",
 					&src_data->r_branch, out);
 		}
 		if (src_data->tag.nr) {
diff --git a/builtin/merge.c b/builtin/merge.c
index 10f091b..9ec13f1 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -403,7 +403,7 @@ static void merge_name(const char *remote, struct strbuf *msg)
 			goto cleanup;
 		}
 		if (!prefixcmp(found_ref, "refs/remotes/")) {
-			strbuf_addf(msg, "%s\t\tremote branch '%s' of .\n",
+			strbuf_addf(msg, "%s\t\tremote-tracking branch '%s' of .\n",
 				    sha1_to_hex(branch_head), remote);
 			goto cleanup;
 		}
diff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh
index 8c8dfda..a455551 100755
--- a/t/t1507-rev-parse-upstream.sh
+++ b/t/t1507-rev-parse-upstream.sh
@@ -85,7 +85,7 @@ test_expect_success 'merge my-side@{u} records the correct name' '
 	git branch -t new my-side@{u} &&
 	git merge -s ours new@{u} &&
 	git show -s --pretty=format:%s >actual &&
-	echo "Merge remote branch ${sq}origin/side${sq}" >expect &&
+	echo "Merge remote-tracking branch ${sq}origin/side${sq}" >expect &&
 	test_cmp expect actual
 )
 '
diff --git a/t/t3409-rebase-preserve-merges.sh b/t/t3409-rebase-preserve-merges.sh
index 74161a4..19341e5 100755
--- a/t/t3409-rebase-preserve-merges.sh
+++ b/t/t3409-rebase-preserve-merges.sh
@@ -72,7 +72,7 @@ test_expect_success 'rebase -p fakes interactive rebase' '
 	git fetch &&
 	git rebase -p origin/topic &&
 	test 1 = $(git rev-list --all --pretty=oneline | grep "Modify A" | wc -l) &&
-	test 1 = $(git rev-list --all --pretty=oneline | grep "Merge remote branch " | wc -l)
+	test 1 = $(git rev-list --all --pretty=oneline | grep "Merge remote-tracking branch " | wc -l)
 	)
 '
 
diff --git a/t/t7608-merge-messages.sh b/t/t7608-merge-messages.sh
index 1c71296..9225fa6 100755
--- a/t/t7608-merge-messages.sh
+++ b/t/t7608-merge-messages.sh
@@ -54,7 +54,7 @@ test_expect_success 'remote-tracking branch' '
 	git checkout master &&
 	test_commit master-5 &&
 	git merge origin/master &&
-	check_oneline "Merge remote branch Qorigin/masterQ"
+	check_oneline "Merge remote-tracking branch Qorigin/masterQ"
 '
 
 test_done
-- 
1.7.3.2.537.g7e355
Jonathan Nieder· Oct 23, 2010, 19:04 UTC · re: Matthieu Moy · lore

Re: [PATCH 08/10] Use 'remote-tracking branch' in generated merge messages

Matthieu Moy wrote:
> [Subject: [PATCH 08/10] Use 'remote-tracking branch' in generated merge messages]

Maybe this should be squashed with the corresponding "git fetch" hunk in 7/10 for bisectability.

Matthieu Moy· Oct 23, 2010, 19:53 UTC · re: Jonathan Nieder · lore

Re: [PATCH 08/10] Use 'remote-tracking branch' in generated merge messages

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 6 quoted lines
> Matthieu Moy wrote:
>
>> [Subject: [PATCH 08/10] Use 'remote-tracking branch' in generated merge messages]
>
> Maybe this should be squashed with the corresponding "git fetch" hunk
> in 7/10 for bisectability.

Actually, the "git fetch" hunk is not directly used by fmt-merge-msg, it is parsed, and re-pretty-printed. I'm not sure I understood all the details of the code, but the tests do pass between patch 7 and patch 8.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Matthieu Moy· Oct 23, 2010, 16:31 UTC · re: Matthieu Moy · lore

[PATCH 09/10] user-manual.txt: explain better the remote(-tracking) branch terms

Now that the documentation is mostly consistant in the use of "remote branch" Vs "remote-tracking branch", let's make this distinction explicit early in the user-manual.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/user-manual.txt |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
Show changes to Documentation/user-manual.txt +9 −0
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index d70f3e0..02126f1 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -359,6 +359,11 @@ $ git branch -r
   origin/todo
 ------------------------------------------------
 
+In this case, "origin" is called a remote repository, or "remote" for
+short. The branches of this repository are called "remote branches"
+from our point of view, and Git will maintain a copy of these
+branches, called "remote-tracking branches" in the local repository.
+
 You cannot check out these remote-tracking branches, but you can
 examine them on a branch of your own, just as you would a tag:
 
@@ -1716,6 +1721,10 @@ one step:
 $ git pull origin master
 -------------------------------------------------
 
+This command will fetch the changes from the remote branch to your
+remote-tracking branch `origin/master`, and merge the result in the
+current branch.
+
 In fact, if you have "master" checked out, then by default "git pull"
 merges from the HEAD branch of the origin repository.  So often you can
 accomplish the above with just a simple
-- 
1.7.3.2.537.g7e355
Jonathan Nieder· Oct 23, 2010, 19:08 UTC · re: Matthieu Moy · lore

Re: [PATCH 09/10] user-manual.txt: explain better the remote(-tracking) branch terms

Matthieu Moy wrote:
Show 10 quoted lines
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -1716,6 +1721,10 @@ one step:
>  $ git pull origin master
>  -------------------------------------------------
>  
> +This command will fetch the changes from the remote branch to your
> +remote-tracking branch `origin/master`, and merge the result in the
> +current branch.
> +

I wish. :) Actually this fetched to FETCH_HEAD and left origin/master alone the last time I checked.

Matthieu Moy· Oct 23, 2010, 19:34 UTC · re: Jonathan Nieder · lore

Re: [PATCH 09/10] user-manual.txt: explain better the remote(-tracking) branch terms

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 15 quoted lines
> Matthieu Moy wrote:
>
>> --- a/Documentation/user-manual.txt
>> +++ b/Documentation/user-manual.txt
>> @@ -1716,6 +1721,10 @@ one step:
>>  $ git pull origin master
>>  -------------------------------------------------
>>
>> +This command will fetch the changes from the remote branch to your
>> +remote-tracking branch `origin/master`, and merge the result in the
>> +current branch.
>> +
>
> I wish. :)  Actually this fetched to FETCH_HEAD and left origin/master
> alone the last time I checked.

Woops, right. I actually learnt and experimented that behavior today when reading the doc, so I've got no excuse ;-).

We can drop this hunk, but I think it's important for users to understand the two steps of "git pull". What about this:

Show changes to diff +7 −5
@@ -1716,14 +1721,19 @@ one step:
 $ git pull origin master
 -------------------------------------------------

-In fact, if you have "master" checked out, then by default "git pull"
-merges from the HEAD branch of the origin repository.  So often you
-can
+In fact, if you have "master" checked out, then this branch has been
+configured by "git clone" to get changes from the HEAD branch of the
+origin repository.  So often you can
 accomplish the above with just a simple

 -------------------------------------------------
 $ git pull
 -------------------------------------------------

+This command will fetch the changes from the remote branches to your
+remote-tracking branches `origin/*`, and merge default branch in the
+current branch.
+
 More generally, a branch that is created from a remote-tracking
 branch
 will pull
 by default from that branch.  See the descriptions of the


The difficulty is to be technically sound and still helpfull. I've
written "merge default branch" to avoid entering the details of the
--set-upstream stuff, and avoid saying "merge one of the branch"
too ;-).

(the first part of the patch is just to make it technically accurate)

--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Thore Husfeldt· Oct 24, 2010, 14:47 UTC · re: Matthieu Moy · lore

Re: [PATCH 09/10] user-manual.txt: explain better the remote(-tracking) branch terms

On 23 Oct 2010, at 18:31, Matthieu Moy wrote:
Show 15 quoted lines
> Documentation/user-manual.txt |    9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
> index d70f3e0..02126f1 100644
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -359,6 +359,11 @@ $ git branch -r
>   origin/todo
> ------------------------------------------------
> 
> +In this case, "origin" is called a remote repository, or "remote" for
> +short. The branches of this repository are called "remote branches"
> +from our point of view, and Git will maintain a copy of these
> +branches, called "remote-tracking branches" in the local repository.
No. Git does not “maintain a copy of [the remote] branches”. It’s exactly one of the pitfalls I fell into: that Git, automagically, puts the *current* state of the remote branch into remote/branchname, or at least updates it behind my back whenever it gets the chance. The Pro Git book goes as far as saying “they’re moved automatically whenever you do any network communication,” which is extremely misleading. (And then it goes on: “Remote branches act as bookmarks to remind you where the branches on your remote repositories were the last time you connected to them.” This is a good way of saying it, except that “remote branches” should be ”remote-tracking branches,” and “connected to them” could be more concrete.)
I appreciate that this misunderstanding looks ridiculous in hindsight—it does to me, today. Luckily, I kept a copy of my old brain in thore/oldbrain and try to not fetch to it.
Also note that the two following lines in user-manual.txt are plain wrong (“You cannot check out these remote-tracking branches, but you can examine them on a branch of your own, just as you would a tag”).
I realise that it would be more constructive for me to suggest a concrete improvement, but I’m not quite there yet. I would really like to see a good conceptualisation, with strong, versatile verbs, of the relationships between bobsstuff bob/master and Bob’s master.
Jonathan Nieder· Oct 24, 2010, 15:18 UTC · re: Thore Husfeldt · lore

Re: [PATCH 09/10] user-manual.txt: explain better the remote(-tracking) branch terms

Thore Husfeldt wrote:
> On 23 Oct 2010, at 18:31, Matthieu Moy wrote:
Show 8 quoted lines
>> +In this case, "origin" is called a remote repository, or "remote" for
>> +short. The branches of this repository are called "remote branches"
>> +from our point of view, and Git will maintain a copy of these
>> +branches, called "remote-tracking branches" in the local repository.
>
> No. Git does not “maintain a copy of [the remote] branches”. It’s exactly one
> of the pitfalls I fell into: that Git, automagically, puts the *current*
> state of the remote branch into remote/branchname, or at least
[...]
> I realise that it would be more constructive for me to suggest a concrete
> improvement, but I’m not quite there yet.

Yes, it really would. Or could you try to figure out what exactly is confusing in the wording (for example by giving an interpretation like

	[do a good job at] maintain[ing] a copy of the branches
to indicate which part was confusing)?

As it is, I'm a little confused. At least according to one interpretation, Git does maintain a copy of the remote branches. This is not tracking like a Basset hound, and it is not maintaining a copy like cron running rsync every 5 minutes, but git tracks remote branches like a human and maintains a copy like a human running rsync whenever she finds time to get around to it.

Of course, the wording can be improved. A nice side-effect of clear suggestions intended to disambiguate one aspect is that they tend to result in the text becoming clearer in other ways at the same time.

Jakub Narebski· Oct 24, 2010, 23:32 UTC · re: Thore Husfeldt · lore

Re: [PATCH 09/10] user-manual.txt: explain better the remote(-tracking) branch terms

Thore Husfeldt <thore.husfeldt@gmail.com> writes:
> On 23 Oct 2010, at 18:31, Matthieu Moy wrote:
Show 21 quoted lines
> > Documentation/user-manual.txt |    9 +++++++++
> > 1 files changed, 9 insertions(+), 0 deletions(-)
> > 
> > diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
> > index d70f3e0..02126f1 100644
> > --- a/Documentation/user-manual.txt
> > +++ b/Documentation/user-manual.txt
> > @@ -359,6 +359,11 @@ $ git branch -r
> >   origin/todo
> > ------------------------------------------------
> > 
> > +In this case, "origin" is called a remote repository, or "remote" for
> > +short. The branches of this repository are called "remote branches"
> > +from our point of view, and Git will maintain a copy of these
> > +branches, called "remote-tracking branches" in the local repository.
> 
> No. Git does not "maintain a copy of [the remote]
> branches". It’s exactly one of the pitfalls I fell into: that
> Git, automagically, puts the *current* state of the remote branch
> into remote/branchname, or at least updates it behind my back
> whenever it gets the chance.

So you don't like the word "maintain" here, is it? Perhaps "keep" instead of "maintain" would be a better word?

I guess that we can also add the following explanation:
  Those "remote-tracking branches" would be updated to the state of tracked
  branches in remote repository on fetch.
Show 7 quoted lines
> The Pro Git book goes as far as saying "they’re moved
> automatically whenever you do any network communication," which
> is extremely misleading. (And then it goes on: "Remote branches
> act as bookmarks to remind you where the branches on your remote
> repositories were the last time you connected to them." This is a
> good way of saying it, except that "remote branches" should be
> "remote-tracking branches,"
Right
> and "connected to them" could be more concrete.)

I guess that the word 'connected' is used here to avoid repetition. But it is a bit unprecise: "git remote show <remote>" connects to remote repository but does not update remote-tracking branches.

> Also note that the two following lines in user-manual.txt are plain
> wrong ("You cannot check out these remote-tracking branches, but you
> can examine them on a branch of your own, just as you would a tag").

This is simply outdated information, predating invention of detached HEAD (also known as anonymous / unnamed branch). They are not _that_ wrong, as you don't checkout a remote-tracking branch: you checkout _state_ of remote tracking branch, creating unnamed branch for that (state marked in git-branch output as "(no branch)"). But I guess it is too fine distinction (splitting hairs).

Show 5 quoted lines
> 
> I realise that it would be more constructive for me to suggest a
> concrete improvement, but I’m not quite there yet. I would really
> like to see a good conceptualisation, with strong, versatile verbs,
> of the relationships between bobsstuff bob/master and Bob’s master

Nevertheless your contributions, even those in the form of pointing errors and inconsistences, are very welcome.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Matthieu Moy· Oct 26, 2010, 03:11 UTC · re: Thore Husfeldt · lore

Re: [PATCH 09/10] user-manual.txt: explain better the remote(-tracking) branch terms

Thore Husfeldt <thore.husfeldt@gmail.com> writes:
Show 18 quoted lines
>> 
>> diff --git a/Documentation/user-manual.txt
> b/Documentation/user-manual.txt
>> index d70f3e0..02126f1 100644
>> --- a/Documentation/user-manual.txt
>> +++ b/Documentation/user-manual.txt
>> @@ -359,6 +359,11 @@ $ git branch -r
>>   origin/todo
>> ------------------------------------------------
>> 
>> +In this case, "origin" is called a remote repository, or "remote"
> for
>> +short. The branches of this repository are called "remote branches"
>> +from our point of view, and Git will maintain a copy of these
>> +branches, called "remote-tracking branches" in the local
> repository.
>
> No. Git does not “maintain a copy of [the remote] branches”.
Which part of the sentence is problematic to you ?

Remote-tracking branches _are_ a copy of the branches. The copy is made at "git clone" time, and is periodically updated with "git fetch" later. And it seems to me that "periodically update" is a way to "maintain" the copy up-to-date.

In the latest version of the patch, I changed "maintain" to "keep", following Jakub's remark. Is that better?

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Miles Bader· Oct 26, 2010, 04:16 UTC · re: Matthieu Moy · lore

Re: [PATCH 09/10] user-manual.txt: explain better the remote(-tracking) branch terms

Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 11 quoted lines
>> No. Git does not “maintain a copy of [the remote] branches”.
>
> Which part of the sentence is problematic to you ?
>
> Remote-tracking branches _are_ a copy of the branches. The copy is
> made at "git clone" time, and is periodically updated with "git fetch"
> later. And it seems to me that "periodically update" is a way to
> "maintain" the copy up-to-date.
>
> In the latest version of the patch, I changed "maintain" to "keep",
> following Jakub's remark. Is that better?
Yup.

As far as I can tell, Thore's complaint is that the copy is not kept perfectly up-to-date automatically, but I think he's incorrect to assume that the language here implies that. It doesn't. "Maintaining a copy" simply means to keep a copy, so your change seems valid, though.

I supposes git is also used by many people with a less-than-perfect command of english though, so perhaps using simpler language is sometimes warranted...

-Miles
-- 
Ocean, n. A body of water covering seven-tenths of a world designed for Man -
who has no gills.
Matthieu Moy· Oct 23, 2010, 16:31 UTC · re: Matthieu Moy · lore

[PATCH 10/10] git-branch.txt: mention --set-upstream as a way to change upstream configuration

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/git-branch.txt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Show changes to Documentation/git-branch.txt +2 −1
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 7f23c56..9106d38 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -41,7 +41,8 @@ When a local branch is started off a remote-tracking branch, git sets up the
 branch so that 'git pull' will appropriately merge from
 the remote-tracking branch. This behavior may be changed via the global
 `branch.autosetupmerge` configuration flag. That setting can be
-overridden by using the `--track` and `--no-track` options.
+overridden by using the `--track` and `--no-track` options, and
+changed later using `git branch --set-upstream`.
 
 With a '-m' or '-M' option, <oldbranch> will be renamed to <newbranch>.
 If <oldbranch> had a corresponding reflog, it is renamed to match
-- 
1.7.3.2.537.g7e355
Jakub Narebski· Oct 23, 2010, 18:55 UTC · re: Matthieu Moy · lore

Re: [PATCH 00/11] More consistant terminology ("remote-tracking branch", "not updated")

Matthieu Moy <Matthieu.Moy@imag.fr> writes:
Show 6 quoted lines
> Following the discussion in
> 
> http://thread.gmane.org/gmane.comp.version-control.git/159287/
> http://thread.gmane.org/gmane.comp.version-control.git/159287/focus=159288
> 
> this is an attempt to be more consistant in the terminology used in Git.
Thank you very much for your work!
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Jonathan Nieder· Oct 23, 2010, 19:11 UTC · re: Jakub Narebski · lore

Re: [PATCH 00/11] More consistant terminology ("remote-tracking branch", "not updated")

Jakub Narebski wrote:
> Matthieu Moy <Matthieu.Moy@imag.fr> writes:
>> this is an attempt to be more consistant in the terminology used in Git.
>
> Thank you very much for your work!
Yes, seconded!  

I've sent comments as replies to patches 1, 2, 3, 4, 5, 7, 8, and 9. Except as noted,

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
These changes are not a moment too soon.
Matthieu Moy· Oct 25, 2010, 17:30 UTC · re: Jonathan Nieder · lore

Re: [PATCH 00/11] More consistant terminology ("remote-tracking branch", "not updated")

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 8 quoted lines
> Jakub Narebski wrote:
>> Matthieu Moy <Matthieu.Moy@imag.fr> writes:
>
>>> this is an attempt to be more consistant in the terminology used in Git.
>>
>> Thank you very much for your work!
>
> Yes, seconded!  

Actually, I did the easy part ;-) (easy grep-able patterns, and uncontroversal solution).

There's still a mess about the "upstream/downstream" Vs "remote-tracking" terminology, both in the UI (--track options here and there) and the doc.

And I'd really like the "index/cache/stage" thing to be fixed too. I like "stage/staging area" best, but it seems this part does not make a consensus (yet?).

I'm just hoping I gave the right example and someone else will now take care of these two ;-).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Matthieu Moy· Oct 25, 2010, 06:08 UTC · re: Matthieu Moy · lore

[PATCH v2 00/10] More consistant terminology ("remote-tracking branch", "not updated")

Here's a new version that should address Jonathan's remarks.

I've reworded a bit the user-manual.txt changes, they may adress Thore's remark, but we can probably do better. But no time for that now ;-).

Matthieu Moy (10):
  Better "Changed but not updated" message in git-status
  Replace "remote tracking" with "remote-tracking"
  Change remote tracking to remote-tracking in non-trivial places
  Change "tracking branch" to "remote-tracking branch"
  Change "tracking branch" to "remote-tracking branch" in C code
  Change incorrect uses of "remote branch" meaning "remote-tracking"
  Change incorrect "remote branch" to "remote tracking branch" in C
    code
  Use 'remote-tracking branch' in generated merge messages
  user-manual.txt: explain better the remote(-tracking) branch terms
  git-branch.txt: mention --set-upstream as a way to change upstream
    configuration
 Documentation/config.txt               |   13 ++++++-----
 Documentation/everyday.txt             |    6 ++--
 Documentation/fetch-options.txt        |    2 +-
 Documentation/git-branch.txt           |   14 +++++++-----
 Documentation/git-checkout.txt         |    2 +-
 Documentation/git-clone.txt            |    2 +-
 Documentation/git-describe.txt         |    2 +-
 Documentation/git-fetch.txt            |    2 +-
 Documentation/git-gc.txt               |    6 ++--
 Documentation/git-log.txt              |    2 +-
 Documentation/git-pull.txt             |    8 +++---
 Documentation/git-remote.txt           |    6 ++--
 Documentation/git-tag.txt              |    4 +-
 Documentation/gittutorial-2.txt        |    2 +-
 Documentation/gittutorial.txt          |    6 ++--
 Documentation/glossary-content.txt     |    8 +++---
 Documentation/rev-list-options.txt     |    2 +-
 Documentation/user-manual.txt          |   30 ++++++++++++++++++++-------
 branch.h                               |    2 +-
 builtin/checkout.c                     |    4 +-
 builtin/fetch.c                        |    6 ++--
 builtin/fmt-merge-msg.c                |    6 ++--
 builtin/merge.c                        |    2 +-
 builtin/remote.c                       |    6 ++--
 contrib/examples/builtin-fetch--tool.c |    2 +-
 remote.c                               |    2 +-
 t/t1507-rev-parse-upstream.sh          |    2 +-
 t/t3409-rebase-preserve-merges.sh      |    2 +-
 t/t5400-send-pack.sh                   |    2 +-
 t/t5505-remote.sh                      |    8 ++++--
 t/t5513-fetch-track.sh                 |    2 +-
 t/t7508-status.sh                      |   34 ++++++++++++++++----------------
 t/t7608-merge-messages.sh              |    4 +-
 wt-status.c                            |    2 +-
 34 files changed, 111 insertions(+), 92 deletions(-)
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 25, 2010, 06:08 UTC · re: Matthieu Moy · lore

[PATCH 01/10] Better "Changed but not updated" message in git-status

Older Gits talked about "updating" a file to add its content to the index, but this terminology is confusing for new users. "to stage" is far more intuitive and already used in e.g. the "git stage" command name.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/gittutorial-2.txt |    2 +-
 t/t7508-status.sh               |   34 +++++++++++++++++-----------------
 wt-status.c                     |    2 +-
 3 files changed, 19 insertions(+), 19 deletions(-)
Show changes to 3 files +19 −19

Documentation/gittutorial-2.txt, t/t7508-status.sh, wt-status.c

diff --git a/Documentation/gittutorial-2.txt b/Documentation/gittutorial-2.txt
index ecab0c0..7fe5848 100644
--- a/Documentation/gittutorial-2.txt
+++ b/Documentation/gittutorial-2.txt
@@ -373,7 +373,7 @@ $ git status
 #
 #       new file: closing.txt
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #
 #       modified: file.txt
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index c9300f3..4de3e27 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -44,7 +44,7 @@ cat >expect <<\EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -73,7 +73,7 @@ cat >expect <<\EOF
 # Changes to be committed:
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #	modified:   dir1/modified
 #
 # Untracked files:
@@ -140,7 +140,7 @@ cat >expect <<EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -167,7 +167,7 @@ cat >expect <<EOF
 # Changes to be committed:
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #	modified:   dir1/modified
 #
 # Untracked files not listed
@@ -202,7 +202,7 @@ cat >expect <<EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -260,7 +260,7 @@ cat >expect <<EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -320,7 +320,7 @@ cat >expect <<\EOF
 #
 #	new file:   ../dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -392,7 +392,7 @@ cat >expect <<\EOF
 #
 #	<GREEN>new file:   dir2/added<RESET>
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -521,7 +521,7 @@ cat >expect <<\EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -614,7 +614,7 @@ cat >expect <<EOF
 #	new file:   dir2/added
 #	new file:   sm
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -673,7 +673,7 @@ cat >expect <<EOF
 #	new file:   dir2/added
 #	new file:   sm
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -718,7 +718,7 @@ test_expect_success 'status -s submodule summary' '
 
 cat >expect <<EOF
 # On branch master
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -766,7 +766,7 @@ cat >expect <<EOF
 #	new file:   dir2/added
 #	new file:   sm
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -819,7 +819,7 @@ cat > expect << EOF
 #
 #	modified:   sm
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -931,7 +931,7 @@ cat > expect << EOF
 #
 #	modified:   sm
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #   (commit or discard the untracked or modified content in submodules)
@@ -989,7 +989,7 @@ cat > expect << EOF
 #
 #	modified:   sm
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -1067,7 +1067,7 @@ test_expect_success ".git/config ignore=dirty doesn't suppress submodule summary
 
 cat > expect << EOF
 # On branch master
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
diff --git a/wt-status.c b/wt-status.c
index fc2438f..d9f3d9f 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -88,7 +88,7 @@ static void wt_status_print_dirty_header(struct wt_status *s,
 {
 	const char *c = color(WT_STATUS_HEADER, s);
 
-	color_fprintf_ln(s->fp, c, "# Changed but not updated:");
+	color_fprintf_ln(s->fp, c, "# Changes not staged for commit:");
 	if (!advice_status_hints)
 		return;
 	if (!has_deleted)
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 25, 2010, 06:08 UTC · re: Matthieu Moy · lore

[PATCH 02/10] Replace "remote tracking" with "remote-tracking"

"remote-tracking" branch makes it explicit that the branch is "tracking a remote", as opposed to "remote, and tracking something".

See discussion in e.g. http://mid.gmane.org/8835ADF9-45E5-4A26-9F7F-A72ECC065BB2@gmail.com for more details.

This patch is a straightforward application of
  perl -pi -e 's/remote tracking branch/remote-tracking branch/'
except in the RelNotes directory.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/config.txt           |    2 +-
 Documentation/fetch-options.txt    |    2 +-
 Documentation/git-log.txt          |    2 +-
 Documentation/git-pull.txt         |    2 +-
 Documentation/git-remote.txt       |    4 ++--
 Documentation/gittutorial.txt      |    2 +-
 Documentation/rev-list-options.txt |    2 +-
 Documentation/user-manual.txt      |    2 +-
 builtin/checkout.c                 |    2 +-
 t/t5513-fetch-track.sh             |    2 +-
 10 files changed, 11 insertions(+), 11 deletions(-)
Show changes to 10 files +11 −11

Documentation/config.txt, Documentation/fetch-options.txt, Documentation/git-log.txt, Documentation/git-pull.txt, Documentation/git-remote.txt, Documentation/gittutorial.txt, Documentation/rev-list-options.txt, Documentation/user-manual.txt, builtin/checkout.c, t/t5513-fetch-track.sh

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 538ebb5..e625d6a 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -708,7 +708,7 @@ color.diff.<slot>::
 color.decorate.<slot>::
 	Use customized color for 'git log --decorate' output.  `<slot>` is one
 	of `branch`, `remoteBranch`, `tag`, `stash` or `HEAD` for local
-	branches, remote tracking branches, tags, stash and HEAD, respectively.
+	branches, remote-tracking branches, tags, stash and HEAD, respectively.
 
 color.grep::
 	When set to `always`, always highlight matches.  When `false` (or
diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index 470ac31..a435c23 100644
--- a/Documentation/fetch-options.txt
+++ b/Documentation/fetch-options.txt
@@ -36,7 +36,7 @@ ifndef::git-pull[]
 
 -p::
 --prune::
-	After fetching, remove any remote tracking branches which
+	After fetching, remove any remote-tracking branches which
 	no longer exist	on the remote.
 endif::git-pull[]
 
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
index 6d40f00..ff41784 100644
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -116,7 +116,7 @@ git log --follow builtin-rev-list.c::
 git log --branches --not --remotes=origin::
 
 	Shows all commits that are in any of local branches but not in
-	any of remote tracking branches for 'origin' (what you have that
+	any of remote-tracking branches for 'origin' (what you have that
 	origin doesn't).
 
 git log master --not --remotes=*/master::
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index c50f7dc..33e8438 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -26,7 +26,7 @@ With `--rebase`, it runs 'git rebase' instead of 'git merge'.
 <repository> should be the name of a remote repository as
 passed to linkgit:git-fetch[1].  <refspec> can name an
 arbitrary remote ref (for example, the name of a tag) or even
-a collection of refs with corresponding remote tracking branches
+a collection of refs with corresponding remote-tracking branches
 (e.g., refs/heads/*:refs/remotes/origin/*), but usually it is
 the name of a branch in the remote repository.
 
diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt
index 0d28feb..5e4989d 100644
--- a/Documentation/git-remote.txt
+++ b/Documentation/git-remote.txt
@@ -75,7 +75,7 @@ was passed.
 
 'rename'::
 
-Rename the remote named <old> to <new>. All remote tracking branches and
+Rename the remote named <old> to <new>. All remote-tracking branches and
 configuration settings for the remote are updated.
 +
 In case <old> and <new> are the same, and <old> is a file under
@@ -84,7 +84,7 @@ the configuration file format.
 
 'rm'::
 
-Remove the remote named <name>. All remote tracking branches and
+Remove the remote named <name>. All remote-tracking branches and
 configuration settings for the remote are removed.
 
 'set-head'::
diff --git a/Documentation/gittutorial.txt b/Documentation/gittutorial.txt
index 1c16066..f1f4086 100644
--- a/Documentation/gittutorial.txt
+++ b/Documentation/gittutorial.txt
@@ -385,7 +385,7 @@ alice$ git fetch bob
 
 Unlike the longhand form, when Alice fetches from Bob using a
 remote repository shorthand set up with 'git remote', what was
-fetched is stored in a remote tracking branch, in this case
+fetched is stored in a remote-tracking branch, in this case
 `bob/master`.  So after this:
 
 -------------------------------------
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 7a42567..7a1b164 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -264,7 +264,7 @@ endif::git-rev-list[]
 
 	Pretend as if all the refs in `refs/remotes` are listed
 	on the command line as '<commit>'. If '<pattern>' is given, limit
-	remote tracking branches to ones matching given shell glob.
+	remote-tracking branches to ones matching given shell glob.
 	If pattern lacks '?', '*', or '[', '/*' at the end is implied.
 
 --glob=<glob-pattern>::
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index fc56da6..d5505e8 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1700,7 +1700,7 @@ may wish to check the original repository for updates and merge them
 into your own work.
 
 We have already seen <<Updating-a-repository-With-git-fetch,how to
-keep remote tracking branches up to date>> with linkgit:git-fetch[1],
+keep remote-tracking branches up to date>> with linkgit:git-fetch[1],
 and how to merge two branches.  So you can merge in changes from the
 original repository's master branch with:
 
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 9240faf..9a934af 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -786,7 +786,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
 	 *   With no paths, if <something> is _not_ a commit, no -t nor -b
 	 *   was given, and there is a tracking branch whose name is
 	 *   <something> in one and only one remote, then this is a short-hand
-	 *   to fork local <something> from that remote tracking branch.
+	 *   to fork local <something> from that remote-tracking branch.
 	 *
 	 *   Otherwise <something> shall not be ambiguous.
 	 *   - If it's *only* a reference, treat it like case (1).
diff --git a/t/t5513-fetch-track.sh b/t/t5513-fetch-track.sh
index 9e74862..65d1e05 100755
--- a/t/t5513-fetch-track.sh
+++ b/t/t5513-fetch-track.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_description='fetch follows remote tracking branches correctly'
+test_description='fetch follows remote-tracking branches correctly'
 
 . ./test-lib.sh
 
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 25, 2010, 06:08 UTC · re: Matthieu Moy · lore

[PATCH 03/10] Change remote tracking to remote-tracking in non-trivial places

To complement the straightforward perl application in previous patch, this adds a few manual changes.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/everyday.txt    |    6 +++---
 Documentation/git-gc.txt      |    6 +++---
 Documentation/gittutorial.txt |    4 ++--
 t/t5400-send-pack.sh          |    2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)
Show changes to 4 files +9 −9

Documentation/everyday.txt, Documentation/git-gc.txt, Documentation/gittutorial.txt, t/t5400-send-pack.sh

diff --git a/Documentation/everyday.txt b/Documentation/everyday.txt
index e0ba8cc..ae413e5 100644
--- a/Documentation/everyday.txt
+++ b/Documentation/everyday.txt
@@ -180,12 +180,12 @@ directory; clone from it to start a repository on the satellite
 machine.
 <2> clone sets these configuration variables by default.
 It arranges `git pull` to fetch and store the branches of mothership
-machine to local `remotes/origin/*` tracking branches.
+machine to local `remotes/origin/*` remote-tracking branches.
 <3> arrange `git push` to push local `master` branch to
 `remotes/satellite/master` branch of the mothership machine.
 <4> push will stash our work away on `remotes/satellite/master`
-tracking branch on the mothership machine.  You could use this as
-a back-up method.
+remote-tracking branch on the mothership machine.  You could use this
+as a back-up method.
 <5> on mothership machine, merge the work done on the satellite
 machine into the master branch.
 
diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt
index 315f07e..801aede 100644
--- a/Documentation/git-gc.txt
+++ b/Documentation/git-gc.txt
@@ -89,7 +89,7 @@ are not part of the current project most users will want to expire
 them sooner.  This option defaults to '30 days'.
 
 The above two configuration variables can be given to a pattern.  For
-example, this sets non-default expiry values only to remote tracking
+example, this sets non-default expiry values only to remote-tracking
 branches:
 
 ------------
@@ -128,8 +128,8 @@ Notes
 
 'git gc' tries very hard to be safe about the garbage it collects. In
 particular, it will keep not only objects referenced by your current set
-of branches and tags, but also objects referenced by the index, remote
-tracking branches, refs saved by 'git filter-branch' in
+of branches and tags, but also objects referenced by the index,
+remote-tracking branches, refs saved by 'git filter-branch' in
 refs/original/, or reflogs (which may reference commits in branches
 that were later amended or rewound).
 
diff --git a/Documentation/gittutorial.txt b/Documentation/gittutorial.txt
index f1f4086..0982f74 100644
--- a/Documentation/gittutorial.txt
+++ b/Documentation/gittutorial.txt
@@ -402,8 +402,8 @@ could merge the changes into her master branch:
 alice$ git merge bob/master
 -------------------------------------
 
-This `merge` can also be done by 'pulling from her own remote
-tracking branch', like this:
+This `merge` can also be done by 'pulling from her own remote-tracking
+branch', like this:
 
 -------------------------------------
 alice$ git pull . remotes/bob/master
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index 5bcf0b8..b0b2684 100755
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -129,7 +129,7 @@ test_expect_success 'denyNonFastforwards trumps --force' '
 	test "$victim_orig" = "$victim_head"
 '
 
-test_expect_success 'push --all excludes remote tracking hierarchy' '
+test_expect_success 'push --all excludes remote-tracking hierarchy' '
 	mkdir parent &&
 	(
 	    cd parent &&
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 25, 2010, 06:08 UTC · re: Matthieu Moy · lore
One more step towards consistancy in our documentation...
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/config.txt           |    4 ++--
 Documentation/git-fetch.txt        |    2 +-
 Documentation/git-pull.txt         |    6 +++---
 Documentation/git-remote.txt       |    2 +-
 Documentation/git-tag.txt          |    4 ++--
 Documentation/glossary-content.txt |    8 ++++----
 Documentation/user-manual.txt      |    2 +-
 7 files changed, 14 insertions(+), 14 deletions(-)
Show changes to 7 files +14 −14

Documentation/config.txt, Documentation/git-fetch.txt, Documentation/git-pull.txt, Documentation/git-remote.txt, Documentation/git-tag.txt, Documentation/glossary-content.txt, Documentation/user-manual.txt

diff --git a/Documentation/config.txt b/Documentation/config.txt
index e625d6a..e4f16d8 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -680,7 +680,7 @@ color.branch::
 color.branch.<slot>::
 	Use customized color for branch coloration. `<slot>` is one of
 	`current` (the current branch), `local` (a local branch),
-	`remote` (a tracking branch in refs/remotes/), `plain` (other
+	`remote` (a remote-tracking branch in refs/remotes/), `plain` (other
 	refs).
 +
 The value for these configuration variables is a list of colors (at most
@@ -1102,7 +1102,7 @@ gui.newbranchtemplate::
 	linkgit:git-gui[1].
 
 gui.pruneduringfetch::
-	"true" if linkgit:git-gui[1] should prune tracking branches when
+	"true" if linkgit:git-gui[1] should prune remote-tracking branches when
 	performing a fetch. The default value is "false".
 
 gui.trustmtime::
diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt
index d159e88..c76e313 100644
--- a/Documentation/git-fetch.txt
+++ b/Documentation/git-fetch.txt
@@ -26,7 +26,7 @@ The ref names and their object names of fetched refs are stored
 in `.git/FETCH_HEAD`.  This information is left for a later merge
 operation done by 'git merge'.
 
-When <refspec> stores the fetched result in tracking branches,
+When <refspec> stores the fetched result in remote-tracking branches,
 the tags that point at these branches are automatically
 followed.  This is done by first fetching from the remote using
 the given <refspec>s, and if the repository has objects that are
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index 33e8438..54e7013 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -134,7 +134,7 @@ and if there is not any such variable, the value on `URL: ` line
 in `$GIT_DIR/remotes/<origin>` file is used.
 
 In order to determine what remote branches to fetch (and
-optionally store in the tracking branches) when the command is
+optionally store in the remote-tracking branches) when the command is
 run without any refspec parameters on the command line, values
 of the configuration variable `remote.<origin>.fetch` are
 consulted, and if there aren't any, `$GIT_DIR/remotes/<origin>`
@@ -147,9 +147,9 @@ refs/heads/*:refs/remotes/origin/*
 ------------
 
 A globbing refspec must have a non-empty RHS (i.e. must store
-what were fetched in tracking branches), and its LHS and RHS
+what were fetched in remote-tracking branches), and its LHS and RHS
 must end with `/*`.  The above specifies that all remote
-branches are tracked using tracking branches in
+branches are tracked using remote-tracking branches in
 `refs/remotes/origin/` hierarchy under the same name.
 
 The rule to determine which remote branch to merge after
diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt
index 5e4989d..c258ea4 100644
--- a/Documentation/git-remote.txt
+++ b/Documentation/git-remote.txt
@@ -146,7 +146,7 @@ With `-n` option, the remote heads are not queried first with
 
 'prune'::
 
-Deletes all stale tracking branches under <name>.
+Deletes all stale remote-tracking branches under <name>.
 These stale branches have already been removed from the remote repository
 referenced by <name>, but are still locally available in
 "remotes/<name>".
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index 31c78a8..8b169e3 100644
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -177,7 +177,7 @@ On Automatic following
 ~~~~~~~~~~~~~~~~~~~~~~
 
 If you are following somebody else's tree, you are most likely
-using tracking branches (`refs/heads/origin` in traditional
+using remote-tracking branches (`refs/heads/origin` in traditional
 layout, or `refs/remotes/origin/master` in the separate-remote
 layout).  You usually want the tags from the other end.
 
@@ -232,7 +232,7 @@ this case.
 It may well be that among networking people, they may want to
 exchange the tags internal to their group, but in that workflow
 they are most likely tracking with each other's progress by
-having tracking branches.  Again, the heuristic to automatically
+having remote-tracking branches.  Again, the heuristic to automatically
 follow such tags is a good thing.
 
 
diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt
index 1f029f8..a76de62 100644
--- a/Documentation/glossary-content.txt
+++ b/Documentation/glossary-content.txt
@@ -131,7 +131,7 @@ to point at the new commit.
 	you have. In such these cases, you do not make a new <<def_merge,merge>>
 	<<def_commit,commit>> but instead just update to his
 	revision. This will happen frequently on a
-	<<def_tracking_branch,tracking branch>> of a remote
+	<<def_remote_tracking_branch,remote-tracking branch>> of a remote
 	<<def_repository,repository>>.
 
 [[def_fetch]]fetch::
@@ -260,7 +260,7 @@ This commit is referred to as a "merge commit", or sometimes just a
 	The default upstream <<def_repository,repository>>. Most projects have
 	at least one upstream project which they track. By default
 	'origin' is used for that purpose. New upstream updates
-	will be fetched into remote <<def_tracking_branch,tracking branches>> named
+	will be fetched into remote <<def_remote_tracking_branch,remote-tracking branches>> named
 	origin/name-of-upstream-branch, which you can see using
 	`git branch -r`.
 
@@ -418,11 +418,11 @@ This commit is referred to as a "merge commit", or sometimes just a
 	that each contain very well defined concepts or small incremental yet
 	related changes.
 
-[[def_tracking_branch]]tracking branch::
+[[def_remote_tracking_branch]]remote-tracking branch::
 	A regular git <<def_branch,branch>> that is used to follow changes from
 	another <<def_repository,repository>>. A tracking
 	branch should not contain direct modifications or have local commits
-	made to it. A tracking branch can usually be
+	made to it. A remote-tracking branch can usually be
 	identified as the right-hand-side <<def_ref,ref>> in a Pull:
 	<<def_refspec,refspec>>.
 
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index d5505e8..d7835ca 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -435,7 +435,7 @@ linux-nfs/master
 origin/master
 -------------------------------------------------
 
-If you run "git fetch <remote>" later, the tracking branches for the
+If you run "git fetch <remote>" later, the remote-tracking branches for the
 named <remote> will be updated.
 
 If you examine the file .git/config, you will see that git has added
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 25, 2010, 06:08 UTC · re: Matthieu Moy · lore

[PATCH 05/10] Change "tracking branch" to "remote-tracking branch" in C code

(Just like we did for documentation already)
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 builtin/checkout.c |    2 +-
 builtin/fetch.c    |    4 ++--
 remote.c           |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
Show changes to 3 files +4 −4

builtin/checkout.c, builtin/fetch.c, remote.c

diff --git a/builtin/checkout.c b/builtin/checkout.c
index 9a934af..1fa9ce4 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -784,7 +784,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
 	 *   between A and B, A...B names that merge base.
 	 *
 	 *   With no paths, if <something> is _not_ a commit, no -t nor -b
-	 *   was given, and there is a tracking branch whose name is
+	 *   was given, and there is a remote-tracking branch whose name is
 	 *   <something> in one and only one remote, then this is a short-hand
 	 *   to fork local <something> from that remote-tracking branch.
 	 *
diff --git a/builtin/fetch.c b/builtin/fetch.c
index d35f000..3b0b614 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -52,7 +52,7 @@ static struct option builtin_fetch_options[] = {
 	OPT_SET_INT('n', NULL, &tags,
 		    "do not fetch all tags (--no-tags)", TAGS_UNSET),
 	OPT_BOOLEAN('p', "prune", &prune,
-		    "prune tracking branches no longer on remote"),
+		    "prune remote-tracking branches no longer on remote"),
 	OPT_BOOLEAN(0, "dry-run", &dry_run,
 		    "dry run"),
 	OPT_BOOLEAN('k', "keep", &keep, "keep downloaded pack"),
@@ -98,7 +98,7 @@ static void add_merge_config(struct ref **head,
 			continue;
 
 		/*
-		 * Not fetched to a tracking branch?  We need to fetch
+		 * Not fetched to a remote-tracking branch?  We need to fetch
 		 * it anyway to allow this branch's "branch.$name.merge"
 		 * to be honored by 'git pull', but we do not have to
 		 * fail if branch.$name.merge is misconfigured to point
diff --git a/remote.c b/remote.c
index 9143ec7..ca42a12 100644
--- a/remote.c
+++ b/remote.c
@@ -493,7 +493,7 @@ static void read_config(void)
 }
 
 /*
- * We need to make sure the tracking branches are well formed, but a
+ * We need to make sure the remote-tracking branches are well formed, but a
  * wildcard refspec in "struct refspec" must have a trailing slash. We
  * temporarily drop the trailing '/' while calling check_ref_format(),
  * and put it back.  The caller knows that a CHECK_REF_FORMAT_ONELEVEL
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 25, 2010, 06:08 UTC · re: Matthieu Moy · lore

[PATCH 06/10] Change incorrect uses of "remote branch" meaning "remote-tracking"

"remote branch" is a branch hosted in a remote repository, while "remote-tracking branch" is a copy of such branch, hosted locally. The distinction is subtle when the copy is up-to-date, but rather fundamental to understand what "git fetch" and "git push" do.

This patch should fix all incorrect usages in Documentation/ directory.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/config.txt       |    7 ++++---
 Documentation/git-branch.txt   |   11 ++++++-----
 Documentation/git-checkout.txt |    2 +-
 Documentation/git-clone.txt    |    2 +-
 Documentation/git-describe.txt |    2 +-
 Documentation/user-manual.txt  |    9 +++++----
 6 files changed, 18 insertions(+), 15 deletions(-)
Show changes to 6 files +18 −14

Documentation/config.txt, Documentation/git-branch.txt, Documentation/git-checkout.txt, Documentation/git-clone.txt, Documentation/git-describe.txt, Documentation/user-manual.txt

diff --git a/Documentation/config.txt b/Documentation/config.txt
index e4f16d8..6a6c0b5 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -601,8 +601,9 @@ branch.autosetupmerge::
 	this behavior can be chosen per-branch using the `--track`
 	and `--no-track` options. The valid settings are: `false` -- no
 	automatic setup is done; `true` -- automatic setup is done when the
-	starting point is a remote branch; `always` -- automatic setup is
-	done when the starting point is either a local branch or remote
+	starting point is a remote-tracking branch; `always` --
+	automatic setup is done when the starting point is either a
+	local branch or remote-tracking
 	branch. This option defaults to true.
 
 branch.autosetuprebase::
@@ -613,7 +614,7 @@ branch.autosetuprebase::
 	When `local`, rebase is set to true for tracked branches of
 	other local branches.
 	When `remote`, rebase is set to true for tracked branches of
-	remote branches.
+	remote-tracking branches.
 	When `always`, rebase will be set to true for all tracking
 	branches.
 	See "branch.autosetupmerge" for details on how to set up a
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 1940256..7f23c56 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -37,9 +37,9 @@ Note that this will create the new branch, but it will not switch the
 working tree to it; use "git checkout <newbranch>" to switch to the
 new branch.
 
-When a local branch is started off a remote branch, git sets up the
+When a local branch is started off a remote-tracking branch, git sets up the
 branch so that 'git pull' will appropriately merge from
-the remote branch. This behavior may be changed via the global
+the remote-tracking branch. This behavior may be changed via the global
 `branch.autosetupmerge` configuration flag. That setting can be
 overridden by using the `--track` and `--no-track` options.
 
@@ -89,7 +89,8 @@ OPTIONS
 	Move/rename a branch even if the new branch name already exists.
 
 --color[=<when>]::
-	Color branches to highlight current, local, and remote branches.
+	Color branches to highlight current, local, and
+	remote-tracking branches.
 	The value must be always (the default), never, or auto.
 
 --no-color::
@@ -125,11 +126,11 @@ OPTIONS
 	it directs `git pull` without arguments to pull from the
 	upstream when the new branch is checked out.
 +
-This behavior is the default when the start point is a remote branch.
+This behavior is the default when the start point is a remote-tracking branch.
 Set the branch.autosetupmerge configuration variable to `false` if you
 want `git checkout` and `git branch` to always behave as if '--no-track'
 were given. Set it to `always` if you want this behavior when the
-start-point is either a local or remote branch.
+start-point is either a local or remote-tracking branch.
 
 --no-track::
 	Do not set up "upstream" configuration, even if the
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 22d3611..880763d 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -98,7 +98,7 @@ entries; instead, unmerged entries are ignored.
 	"--track" in linkgit:git-branch[1] for details.
 +
 If no '-b' option is given, the name of the new branch will be
-derived from the remote branch.  If "remotes/" or "refs/remotes/"
+derived from the remote-tracking branch.  If "remotes/" or "refs/remotes/"
 is prefixed it is stripped away, and then the part up to the
 next slash (which would be the nickname of the remote) is removed.
 This would tell us to use "hack" as the local branch when branching
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index ab72933..2320382 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -131,7 +131,7 @@ objects from the source repository into a pack in the cloned repository.
 	Set up a mirror of the source repository.  This implies `--bare`.
 	Compared to `--bare`, `--mirror` not only maps local branches of the
 	source to local branches of the target, it maps all refs (including
-	remote branches, notes etc.) and sets up a refspec configuration such
+	remote-tracking branches, notes etc.) and sets up a refspec configuration such
 	that all these refs are overwritten by a `git remote update` in the
 	target repository.
 
diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
index 7ef9d51..02e015a 100644
--- a/Documentation/git-describe.txt
+++ b/Documentation/git-describe.txt
@@ -37,7 +37,7 @@ OPTIONS
 --all::
 	Instead of using only the annotated tags, use any ref
 	found in `.git/refs/`.  This option enables matching
-	any known branch, remote branch, or lightweight tag.
+	any known branch, remote-tracking branch, or lightweight tag.
 
 --tags::
 	Instead of using only the annotated tags, use any tag
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index d7835ca..d70f3e0 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1724,7 +1724,8 @@ accomplish the above with just a simple
 $ git pull
 -------------------------------------------------
 
-More generally, a branch that is created from a remote branch will pull
+More generally, a branch that is created from a remote-tracking branch
+will pull
 by default from that branch.  See the descriptions of the
 branch.<name>.remote and branch.<name>.merge options in
 linkgit:git-config[1], and the discussion of the `--track` option in
@@ -2106,7 +2107,7 @@ $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
 $ cd work
 -------------------------------------------------
 
-Linus's tree will be stored in the remote branch named origin/master,
+Linus's tree will be stored in the remote-tracking branch named origin/master,
 and can be updated using linkgit:git-fetch[1]; you can track other
 public trees using linkgit:git-remote[1] to set up a "remote" and
 linkgit:git-fetch[1] to keep them up-to-date; see
@@ -2800,8 +2801,8 @@ Be aware that commits that the old version of example/master pointed at
 may be lost, as we saw in the previous section.
 
 [[remote-branch-configuration]]
-Configuring remote branches
----------------------------
+Configuring remote-tracking branches
+------------------------------------
 
 We saw above that "origin" is just a shortcut to refer to the
 repository that you originally cloned from.  This information is
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 25, 2010, 06:08 UTC · re: Matthieu Moy · lore

[PATCH 07/10] Change incorrect "remote branch" to "remote tracking branch" in C code

(Just like we did for documentation already)
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 branch.h                               |    2 +-
 builtin/fetch.c                        |    2 +-
 builtin/remote.c                       |    6 +++---
 contrib/examples/builtin-fetch--tool.c |    2 +-
 t/t5505-remote.sh                      |    8 +++++---
 t/t7608-merge-messages.sh              |    2 +-
 6 files changed, 12 insertions(+), 10 deletions(-)
Show changes to 6 files +12 −10

branch.h, builtin/fetch.c, builtin/remote.c, contrib/examples/builtin-fetch--tool.c, t/t5505-remote.sh, t/t7608-merge-messages.sh

diff --git a/branch.h b/branch.h
index eed817a..2004632 100644
--- a/branch.h
+++ b/branch.h
@@ -22,7 +22,7 @@ void create_branch(const char *head, const char *name, const char *start_name,
 void remove_branch_state(void);
 
 /*
- * Configure local branch "local" to merge remote branch "remote"
+ * Configure local branch "local" to merge remote-tracking branch "remote"
  * taken from origin "origin".
  */
 #define BRANCH_CONFIG_VERBOSE 01
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 3b0b614..4243ef0 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -359,7 +359,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
 			what = rm->name + 10;
 		}
 		else if (!prefixcmp(rm->name, "refs/remotes/")) {
-			kind = "remote branch";
+			kind = "remote-tracking branch";
 			what = rm->name + 13;
 		}
 		else {
diff --git a/builtin/remote.c b/builtin/remote.c
index e9a6e09..6a06282 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -507,7 +507,7 @@ static int add_branch_for_removal(const char *refname,
 			return 0;
 	}
 
-	/* don't delete non-remote refs */
+	/* don't delete non-remote-tracking refs */
 	if (prefixcmp(refname, "refs/remotes")) {
 		/* advise user how to delete local branches */
 		if (!prefixcmp(refname, "refs/heads/"))
@@ -791,9 +791,9 @@ static int rm(int argc, const char **argv)
 
 	if (skipped.nr) {
 		fprintf(stderr, skipped.nr == 1 ?
-			"Note: A non-remote branch was not removed; "
+			"Note: A branch outside the refs/remotes/ hierarchy was not removed;\n"
 			"to delete it, use:\n" :
-			"Note: Non-remote branches were not removed; "
+			"Note: Some branches outside the refs/remotes/ hierarchy were not removed;\n"
 			"to delete them, use:\n");
 		for (i = 0; i < skipped.nr; i++)
 			fprintf(stderr, "  git branch -d %s\n",
diff --git a/contrib/examples/builtin-fetch--tool.c b/contrib/examples/builtin-fetch--tool.c
index cd10dbc..3140e40 100644
--- a/contrib/examples/builtin-fetch--tool.c
+++ b/contrib/examples/builtin-fetch--tool.c
@@ -148,7 +148,7 @@ static int append_fetch_head(FILE *fp,
 		what = remote_name + 10;
 	}
 	else if (!strncmp(remote_name, "refs/remotes/", 13)) {
-		kind = "remote branch";
+		kind = "remote-tracking branch";
 		what = remote_name + 13;
 	}
 	else {
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index 5d1c66e..d189add 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -107,16 +107,18 @@ test_expect_success 'remove remote' '
 )
 '
 
-test_expect_success 'remove remote protects non-remote branches' '
+test_expect_success 'remove remote protects local branches' '
 (
 	cd test &&
 	{ cat >expect1 <<EOF
-Note: A non-remote branch was not removed; to delete it, use:
+Note: A branch outside the refs/remotes/ hierarchy was not removed;
+to delete it, use:
   git branch -d master
 EOF
 	} &&
 	{ cat >expect2 <<EOF
-Note: Non-remote branches were not removed; to delete them, use:
+Note: Some branches outside the refs/remotes/ hierarchy were not removed;
+to delete them, use:
   git branch -d foobranch
   git branch -d master
 EOF
diff --git a/t/t7608-merge-messages.sh b/t/t7608-merge-messages.sh
index 28d5679..1c71296 100755
--- a/t/t7608-merge-messages.sh
+++ b/t/t7608-merge-messages.sh
@@ -47,7 +47,7 @@ test_expect_success 'ambiguous tag' '
 	check_oneline "Merge commit QambiguousQ"
 '
 
-test_expect_success 'remote branch' '
+test_expect_success 'remote-tracking branch' '
 	git checkout -b remote master &&
 	test_commit remote-1 &&
 	git update-ref refs/remotes/origin/master remote &&
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 25, 2010, 06:08 UTC · re: Matthieu Moy · lore

[PATCH 08/10] Use 'remote-tracking branch' in generated merge messages

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 builtin/fmt-merge-msg.c           |    6 +++---
 builtin/merge.c                   |    2 +-
 t/t1507-rev-parse-upstream.sh     |    2 +-
 t/t3409-rebase-preserve-merges.sh |    2 +-
 t/t7608-merge-messages.sh         |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)
Show changes to 5 files +7 −7

builtin/fmt-merge-msg.c, builtin/merge.c, t/t1507-rev-parse-upstream.sh, t/t3409-rebase-preserve-merges.sh, t/t7608-merge-messages.sh

diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index 78c7774..5189b16 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -100,8 +100,8 @@ static int handle_line(char *line)
 		origin = line;
 		string_list_append(&src_data->tag, origin + 4);
 		src_data->head_status |= 2;
-	} else if (!prefixcmp(line, "remote branch ")) {
-		origin = line + 14;
+	} else if (!prefixcmp(line, "remote-tracking branch ")) {
+		origin = line + strlen("remote-tracking branch ");
 		string_list_append(&src_data->r_branch, origin);
 		src_data->head_status |= 2;
 	} else {
@@ -233,7 +233,7 @@ static void do_fmt_merge_msg_title(struct strbuf *out,
 		if (src_data->r_branch.nr) {
 			strbuf_addstr(out, subsep);
 			subsep = ", ";
-			print_joined("remote branch ", "remote branches ",
+			print_joined("remote-tracking branch ", "remote-tracking branches ",
 					&src_data->r_branch, out);
 		}
 		if (src_data->tag.nr) {
diff --git a/builtin/merge.c b/builtin/merge.c
index 10f091b..9ec13f1 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -403,7 +403,7 @@ static void merge_name(const char *remote, struct strbuf *msg)
 			goto cleanup;
 		}
 		if (!prefixcmp(found_ref, "refs/remotes/")) {
-			strbuf_addf(msg, "%s\t\tremote branch '%s' of .\n",
+			strbuf_addf(msg, "%s\t\tremote-tracking branch '%s' of .\n",
 				    sha1_to_hex(branch_head), remote);
 			goto cleanup;
 		}
diff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh
index 8c8dfda..a455551 100755
--- a/t/t1507-rev-parse-upstream.sh
+++ b/t/t1507-rev-parse-upstream.sh
@@ -85,7 +85,7 @@ test_expect_success 'merge my-side@{u} records the correct name' '
 	git branch -t new my-side@{u} &&
 	git merge -s ours new@{u} &&
 	git show -s --pretty=format:%s >actual &&
-	echo "Merge remote branch ${sq}origin/side${sq}" >expect &&
+	echo "Merge remote-tracking branch ${sq}origin/side${sq}" >expect &&
 	test_cmp expect actual
 )
 '
diff --git a/t/t3409-rebase-preserve-merges.sh b/t/t3409-rebase-preserve-merges.sh
index 74161a4..19341e5 100755
--- a/t/t3409-rebase-preserve-merges.sh
+++ b/t/t3409-rebase-preserve-merges.sh
@@ -72,7 +72,7 @@ test_expect_success 'rebase -p fakes interactive rebase' '
 	git fetch &&
 	git rebase -p origin/topic &&
 	test 1 = $(git rev-list --all --pretty=oneline | grep "Modify A" | wc -l) &&
-	test 1 = $(git rev-list --all --pretty=oneline | grep "Merge remote branch " | wc -l)
+	test 1 = $(git rev-list --all --pretty=oneline | grep "Merge remote-tracking branch " | wc -l)
 	)
 '
 
diff --git a/t/t7608-merge-messages.sh b/t/t7608-merge-messages.sh
index 1c71296..9225fa6 100755
--- a/t/t7608-merge-messages.sh
+++ b/t/t7608-merge-messages.sh
@@ -54,7 +54,7 @@ test_expect_success 'remote-tracking branch' '
 	git checkout master &&
 	test_commit master-5 &&
 	git merge origin/master &&
-	check_oneline "Merge remote branch Qorigin/masterQ"
+	check_oneline "Merge remote-tracking branch Qorigin/masterQ"
 '
 
 test_done
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 25, 2010, 06:08 UTC · re: Matthieu Moy · lore

[PATCH 09/10] user-manual.txt: explain better the remote(-tracking) branch terms

Now that the documentation is mostly consistant in the use of "remote branch" Vs "remote-tracking branch", let's make this distinction explicit early in the user-manual.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/user-manual.txt |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)
Show changes to Documentation/user-manual.txt +15 −2
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index d70f3e0..6684a78 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -359,6 +359,14 @@ $ git branch -r
   origin/todo
 ------------------------------------------------
 
+In this case, "origin" is called a remote repository, or "remote" for
+short. The branches of this repository are called "remote branches"
+from our point of view, and Git will keep a copy of these
+branches, called "remote-tracking branches" in the local repository.
+These remote-tracking branches are references that will be updated by
+"git fetch" (hence by "git pull"). See
+<<Updating-a-repository-With-git-fetch>> for details.
+
 You cannot check out these remote-tracking branches, but you can
 examine them on a branch of your own, just as you would a tag:
 
@@ -1716,14 +1724,19 @@ one step:
 $ git pull origin master
 -------------------------------------------------
 
-In fact, if you have "master" checked out, then by default "git pull"
-merges from the HEAD branch of the origin repository.  So often you can
+In fact, if you have "master" checked out, then this branch has been
+configured by "git clone" to get changes from the HEAD branch of the
+origin repository.  So often you can
 accomplish the above with just a simple
 
 -------------------------------------------------
 $ git pull
 -------------------------------------------------
 
+This command will fetch the changes from the remote branches to your
+remote-tracking branches `origin/*`, and merge default branch in the
+current branch.
+
 More generally, a branch that is created from a remote-tracking branch
 will pull
 by default from that branch.  See the descriptions of the
-- 
1.7.3.2.183.g2e7b0
Jay Soffian· Oct 26, 2010, 06:07 UTC · re: Matthieu Moy · lore

Re: [PATCH 09/10] user-manual.txt: explain better the remote(-tracking) branch terms

On Mon, Oct 25, 2010 at 2:08 AM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
>  You cannot check out these remote-tracking branches, but you can
>  examine them on a branch of your own, just as you would a tag:
Suggestion: "You do not commit directly to remote-tracking branches,
but you can examine them or create a branch from them, just as you
would a tag:"
j.
Matthieu Moy· Oct 26, 2010, 22:13 UTC · re: Jay Soffian · lore

Re: [PATCH 09/10] user-manual.txt: explain better the remote(-tracking) branch terms

Jay Soffian <jaysoffian@gmail.com> writes:
Show 7 quoted lines
> On Mon, Oct 25, 2010 at 2:08 AM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
>>  You cannot check out these remote-tracking branches, but you can
>>  examine them on a branch of your own, just as you would a tag:
>
> Suggestion: "You do not commit directly to remote-tracking branches,
> but you can examine them or create a branch from them, just as you
> would a tag:"

There was already a patch by Jonathan to fix that. I've integrated it in my patch serie, it will be in the next resend.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Jay Soffian· Oct 26, 2010, 06:20 UTC · re: Matthieu Moy · lore

Re: [PATCH 09/10] user-manual.txt: explain better the remote(-tracking) branch terms

On Mon, Oct 25, 2010 at 2:08 AM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
Show 7 quoted lines
> +In this case, "origin" is called a remote repository, or "remote" for
> +short. The branches of this repository are called "remote branches"
> +from our point of view, and Git will keep a copy of these
> +branches, called "remote-tracking branches" in the local repository.
> +These remote-tracking branches are references that will be updated by
> +"git fetch" (hence by "git pull"). See
> +<<Updating-a-repository-With-git-fetch>> for details.

"...and Git will initially clone these branches into so-called "remote-tracking branches" in the local repository. Thereafter, the remote-tracking branches are updated upon fetching from[1] or pushing to the remote. ([1] which also includes pulling.)

j.
Matthieu Moy· Oct 27, 2010, 00:01 UTC · re: Jay Soffian · lore

Re: [PATCH 09/10] user-manual.txt: explain better the remote(-tracking) branch terms

Jay Soffian <jaysoffian@gmail.com> writes:
Show 11 quoted lines
> On Mon, Oct 25, 2010 at 2:08 AM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
>> +In this case, "origin" is called a remote repository, or "remote" for
>> +short. The branches of this repository are called "remote branches"
>> +from our point of view, and Git will keep a copy of these
>> +branches, called "remote-tracking branches" in the local repository.
>> +These remote-tracking branches are references that will be updated by
>> +"git fetch" (hence by "git pull"). See
>> +<<Updating-a-repository-With-git-fetch>> for details.
>
> "...and Git will initially clone these branches into so-called
> "remote-tracking branches" in the local repository.

I don't thinks it's a good idea to use the word "clone" here. "clone" is used for repository cloning, and I find it confusing to overload the word for branches.

> Thereafter, the
> remote-tracking branches are updated upon fetching from[1] or pushing
> to the remote. ([1] which also includes pulling.)

I don't like the [1] kind of footnote within the text, but I forgot to mention that "git push" updates the remote-tracking in my text. That'll be fixed in next version.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Matthieu Moy· Oct 27, 2010, 00:06 UTC · re: Matthieu Moy · lore

[PATCH] user-manual.txt: explain better the remote(-tracking) branch terms

Now that the documentation is mostly consistant in the use of "remote branch" Vs "remote-tracking branch", let's make this distinction explicit early in the user-manual.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/user-manual.txt |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)
Show changes to Documentation/user-manual.txt +17 −3
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index d70f3e0..62b3788 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -344,7 +344,8 @@ Examining branches from a remote repository
 The "master" branch that was created at the time you cloned is a copy
 of the HEAD in the repository that you cloned from.  That repository
 may also have had other branches, though, and your local repository
-keeps branches which track each of those remote branches, which you
+keeps branches which track each of those remote branches, called
+remote-tracking branches, which you
 can view using the "-r" option to linkgit:git-branch[1]:
 
 ------------------------------------------------
@@ -359,6 +360,14 @@ $ git branch -r
   origin/todo
 ------------------------------------------------
 
+In this case, "origin" is called a remote repository, or "remote" for
+short. The branches of this repository are called "remote branches"
+from our point of view. The remote-tracking branches are created in
+the local repository at clone time, as a copy of the remote branches.
+They are references that will be updated by "git fetch" (hence by "git
+pull"), and by "git push". See
+<<Updating-a-repository-With-git-fetch>> for details.
+
 You cannot check out these remote-tracking branches, but you can
 examine them on a branch of your own, just as you would a tag:
 
@@ -1716,14 +1725,19 @@ one step:
 $ git pull origin master
 -------------------------------------------------
 
-In fact, if you have "master" checked out, then by default "git pull"
-merges from the HEAD branch of the origin repository.  So often you can
+In fact, if you have "master" checked out, then this branch has been
+configured by "git clone" to get changes from the HEAD branch of the
+origin repository.  So often you can
 accomplish the above with just a simple
 
 -------------------------------------------------
 $ git pull
 -------------------------------------------------
 
+This command will fetch the changes from the remote branches to your
+remote-tracking branches `origin/*`, and merge default branch in the
+current branch.
+
 More generally, a branch that is created from a remote-tracking branch
 will pull
 by default from that branch.  See the descriptions of the
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 25, 2010, 06:08 UTC · re: Matthieu Moy · lore

[PATCH 10/10] git-branch.txt: mention --set-upstream as a way to change upstream configuration

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/git-branch.txt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Show changes to Documentation/git-branch.txt +2 −1
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 7f23c56..9106d38 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -41,7 +41,8 @@ When a local branch is started off a remote-tracking branch, git sets up the
 branch so that 'git pull' will appropriately merge from
 the remote-tracking branch. This behavior may be changed via the global
 `branch.autosetupmerge` configuration flag. That setting can be
-overridden by using the `--track` and `--no-track` options.
+overridden by using the `--track` and `--no-track` options, and
+changed later using `git branch --set-upstream`.
 
 With a '-m' or '-M' option, <oldbranch> will be renamed to <newbranch>.
 If <oldbranch> had a corresponding reflog, it is renamed to match
-- 
1.7.3.2.183.g2e7b0
Drew Northup· Oct 25, 2010, 17:52 UTC · re: Matthieu Moy · lore

Re: [PATCH 00/11] More consistant terminology ("remote-tracking branch", "not updated")

On Sat, 2010-10-23 at 18:31 +0200, Matthieu Moy wrote:
Show 46 quoted lines
> Following the discussion in
> 
> http://thread.gmane.org/gmane.comp.version-control.git/159287/
> http://thread.gmane.org/gmane.comp.version-control.git/159287/focus=159288
> 
> this is an attempt to be more consistant in the terminology used in Git.
> 
> The first patch fixes git status's "changed but not updated", and the
> rest tries to use "remote-tracking branch" consistantly. This
> essentially changes the doc, and also does slight modifications to the
> code. This changes error message, and maybe more controversially the
> generated merge messages (in a separate patch in case this is too
> controversial).
> 
> I've tried splitting this into systematic changes to ease review, but
> patches should be applicable in any order (i.e. Junio: if you find
> some of the patches good and uncontroversial, you can pick them
> right away).
> 
> Patch "user-manual.txt: explain better the remote(-tracking) branch
> terms" comes last, and adds a few sentences to make the distinction
> between remote, remote branch, remote-tracking branches explicit.
> Hopefully, this should avoid future users to have the same
> difficulties as Thore ;-).
> 
> The last 2 patches are minor things I noticed while going through the
> docs, but are essentially unrelated.
> 
> I'll be busy next week, so if anyone else wants to pick this patch
> serie and update it according to list review, he's welcome. Otherwise,
> it may have to wait.
> 
> Matthieu Moy (11):
>   Better "Changed but not updated" message in git-status
>   Remplace "remote tracking" with "remote-tracking"
>   Change remote tracking to remote-tracking in non-trivial places
>   Change "tracking branch" to "remote-tracking branch"
>   Change "tracking branch" to "remote-tracking branch" in C code
>   Change incorrect uses of "remote branch" meaning "remote-tracking"
>   Change incorrect "remote branch" to "remote tracking branch" in C
>     code
>   Use 'remote-tracking branch' in generated merge messages
>   user-manual.txt: explain better the remote(-tracking) branch terms
>   git-branch.txt: mention --set-upstream as a way to change upstream
>     configuration
>   git-http-push.txt: fix typo (branch -> branches)

I'm going to apply these to a branch of mine to see how they read in context before I come to any definite conclusions. So far I like what I see for the most part.

-- 
-Drew Northup N1XIM
   AKA RvnPhnx on OPN
________________________________________________
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59
Matthieu Moy· Oct 28, 2010, 18:21 UTC · re: Matthieu Moy · lore

[PATCH 00/10 v3] More consistant terminology ("remote-tracking branch", "not updated")

So, here's a v3 for the patch serie. Nothing very new, just minor improvements (reword the user-manual change, keep the alphabetical order in gitglossary, ...)

I think it's ready to cook in pu.
Jonathan Nieder (1):
  user-manual: remote-tracking can be checked out, with detached HEAD
Matthieu Moy (9):
  Better "Changed but not updated" message in git-status
  Replace "remote tracking" with "remote-tracking"
  Change remote tracking to remote-tracking in non-trivial places
  Change "tracking branch" to "remote-tracking branch"
  Change incorrect uses of "remote branch" meaning "remote-tracking"
  Change incorrect "remote branch" to "remote tracking branch" in C
    code
  Use 'remote-tracking branch' in generated merge messages
  user-manual.txt: explain better the remote(-tracking) branch terms
  git-branch.txt: mention --set-upstream as a way to change upstream
    configuration
 Documentation/config.txt               |   13 +++++----
 Documentation/everyday.txt             |    6 ++--
 Documentation/fetch-options.txt        |    2 +-
 Documentation/git-branch.txt           |   14 ++++++----
 Documentation/git-checkout.txt         |    2 +-
 Documentation/git-clone.txt            |    2 +-
 Documentation/git-describe.txt         |    2 +-
 Documentation/git-fetch.txt            |    2 +-
 Documentation/git-gc.txt               |    6 ++--
 Documentation/git-log.txt              |    2 +-
 Documentation/git-pull.txt             |    8 +++---
 Documentation/git-remote.txt           |    6 ++--
 Documentation/git-tag.txt              |    4 +-
 Documentation/gittutorial-2.txt        |    2 +-
 Documentation/gittutorial.txt          |    6 ++--
 Documentation/glossary-content.txt     |   20 ++++++++--------
 Documentation/rev-list-options.txt     |    2 +-
 Documentation/user-manual.txt          |   40 +++++++++++++++++++++++--------
 branch.h                               |    2 +-
 builtin/checkout.c                     |    4 +-
 builtin/fetch.c                        |    6 ++--
 builtin/fmt-merge-msg.c                |    6 ++--
 builtin/merge.c                        |    2 +-
 builtin/remote.c                       |    6 ++--
 contrib/examples/builtin-fetch--tool.c |    2 +-
 remote.c                               |    2 +-
 t/t1507-rev-parse-upstream.sh          |    2 +-
 t/t3409-rebase-preserve-merges.sh      |    2 +-
 t/t5400-send-pack.sh                   |    2 +-
 t/t5505-remote.sh                      |    8 ++++--
 t/t5513-fetch-track.sh                 |    2 +-
 t/t7508-status.sh                      |   34 +++++++++++++-------------
 t/t7608-merge-messages.sh              |    4 +-
 wt-status.c                            |    2 +-
 34 files changed, 124 insertions(+), 101 deletions(-)
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 28, 2010, 18:21 UTC · re: Matthieu Moy · lore

[PATCH 01/10] Better "Changed but not updated" message in git-status

Older Gits talked about "updating" a file to add its content to the index, but this terminology is confusing for new users. "to stage" is far more intuitive and already used in e.g. the "git stage" command name.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/gittutorial-2.txt |    2 +-
 t/t7508-status.sh               |   34 +++++++++++++++++-----------------
 wt-status.c                     |    2 +-
 3 files changed, 19 insertions(+), 19 deletions(-)
Show changes to 3 files +19 −19

Documentation/gittutorial-2.txt, t/t7508-status.sh, wt-status.c

diff --git a/Documentation/gittutorial-2.txt b/Documentation/gittutorial-2.txt
index ecab0c0..7fe5848 100644
--- a/Documentation/gittutorial-2.txt
+++ b/Documentation/gittutorial-2.txt
@@ -373,7 +373,7 @@ $ git status
 #
 #       new file: closing.txt
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #
 #       modified: file.txt
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index c9300f3..4de3e27 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -44,7 +44,7 @@ cat >expect <<\EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -73,7 +73,7 @@ cat >expect <<\EOF
 # Changes to be committed:
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #	modified:   dir1/modified
 #
 # Untracked files:
@@ -140,7 +140,7 @@ cat >expect <<EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -167,7 +167,7 @@ cat >expect <<EOF
 # Changes to be committed:
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #	modified:   dir1/modified
 #
 # Untracked files not listed
@@ -202,7 +202,7 @@ cat >expect <<EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -260,7 +260,7 @@ cat >expect <<EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -320,7 +320,7 @@ cat >expect <<\EOF
 #
 #	new file:   ../dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -392,7 +392,7 @@ cat >expect <<\EOF
 #
 #	<GREEN>new file:   dir2/added<RESET>
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -521,7 +521,7 @@ cat >expect <<\EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -614,7 +614,7 @@ cat >expect <<EOF
 #	new file:   dir2/added
 #	new file:   sm
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -673,7 +673,7 @@ cat >expect <<EOF
 #	new file:   dir2/added
 #	new file:   sm
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -718,7 +718,7 @@ test_expect_success 'status -s submodule summary' '
 
 cat >expect <<EOF
 # On branch master
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -766,7 +766,7 @@ cat >expect <<EOF
 #	new file:   dir2/added
 #	new file:   sm
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -819,7 +819,7 @@ cat > expect << EOF
 #
 #	modified:   sm
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -931,7 +931,7 @@ cat > expect << EOF
 #
 #	modified:   sm
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #   (commit or discard the untracked or modified content in submodules)
@@ -989,7 +989,7 @@ cat > expect << EOF
 #
 #	modified:   sm
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -1067,7 +1067,7 @@ test_expect_success ".git/config ignore=dirty doesn't suppress submodule summary
 
 cat > expect << EOF
 # On branch master
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
diff --git a/wt-status.c b/wt-status.c
index fc2438f..d9f3d9f 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -88,7 +88,7 @@ static void wt_status_print_dirty_header(struct wt_status *s,
 {
 	const char *c = color(WT_STATUS_HEADER, s);
 
-	color_fprintf_ln(s->fp, c, "# Changed but not updated:");
+	color_fprintf_ln(s->fp, c, "# Changes not staged for commit:");
 	if (!advice_status_hints)
 		return;
 	if (!has_deleted)
-- 
1.7.3.2.183.g2e7b0
Jonathan Nieder· Oct 28, 2010, 18:35 UTC · re: Matthieu Moy · lore

Re: [PATCH 01/10] Better "Changed but not updated" message in git-status

Matthieu Moy wrote:
Show 9 quoted lines
> +++ b/wt-status.c
> @@ -88,7 +88,7 @@ static void wt_status_print_dirty_header(struct wt_status *s,
>  {
>  	const char *c = color(WT_STATUS_HEADER, s);
>  
> -	color_fprintf_ln(s->fp, c, "# Changed but not updated:");
> +	color_fprintf_ln(s->fp, c, "# Changes not staged for commit:");
>  	if (!advice_status_hints)
>  		return;
Result looks like:
 # Changes to be committed:
 #   (use "git reset HEAD <file>..." to unstage)
 #
 #       new file:   foo.c
 #
 # Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
 #       modified:   foo.c
 #
 # Untracked files:
 #   (use "git add <file>..." to include in what will be committed)
 #
 #       bar.c
which is both clearer and more consistent.  So for what it's worth,
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Junio C Hamano· Oct 28, 2010, 21:46 UTC · re: Jonathan Nieder · lore

Re: [PATCH 01/10] Better "Changed but not updated" message in git-status

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 20 quoted lines
> Result looks like:
>
>  # Changes to be committed:
>  #   (use "git reset HEAD <file>..." to unstage)
>  #
>  #       new file:   foo.c
>  #
>  # Changes not staged for commit:
>  #   (use "git add <file>..." to update what will be committed)
>  #   (use "git checkout -- <file>..." to discard changes in working directory)
>  #
>  #       modified:   foo.c
>  #
>  # Untracked files:
>  #   (use "git add <file>..." to include in what will be committed)
>  #
>  #       bar.c
>
> which is both clearer and more consistent.  So for what it's worth,
> Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Hmm, perhaps we'd want to restate the first one as well to read
    Changes staged for commit:
      (use "git reset HEAD <path>..." to unstage)
for consistency as well?

Listing by filename gives a false impression that we are talking about the whole file contents, and looks a bit confusing until it is explained to you why when the same file appears in both of the first two sections. I've been wondering ever since this thread started if we can phrase it better to make it even less confusing. E.g.

    Files with changes to be committed:
        new file: foo.c
    Files with changes that won't be committed:
        modified: foo.c
might help reduce the confusion.

"Untracked files" section is about the whole file contents, and it can stay as is.

Jonathan Nieder· Oct 28, 2010, 22:09 UTC · re: Junio C Hamano · lore

Re: [PATCH 01/10] Better "Changed but not updated" message in git-status

Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
Show 6 quoted lines
>>  # Changes to be committed:
>>  #   (use "git reset HEAD <file>..." to unstage)
>>  #
>>  #       new file:   foo.c
>>  #
>>  # Changes not staged for commit:
[...]
Show 6 quoted lines
> Hmm, perhaps we'd want to restate the first one as well to read
> 
>     Changes staged for commit:
>       (use "git reset HEAD <path>..." to unstage)
> 
> for consistency as well?

My first impression is no. Since the main purpose of this text is to be shown by "git commit", it might even make sense to say:

# Changes to be committed: # (use "git reset -- <path>..." to unstage) # # new file: foo.c # # Changes not to be committed: # (use "git add <path>..." to update what will be committed) # (use "git checkout -- <path>..." to discard changes in working # directory) # # typechange: bar.c

> Listing by filename gives a false impression that we are talking about the
> whole file contents, and looks a bit confusing until it is explained to
> you why when the same file appears in both of the first two sections.

Iould be nice if the "staged changes" section gave a hint that there were unstaged changes present. Maybe something like the "unsaved file" indicator used by some text editors:

	new file:    foo.c*
Show 9 quoted lines
> I've been wondering ever since this thread started if we can phrase it
> better to make it even less confusing.  E.g.
> 
>     Files with changes to be committed:
>         new file: foo.c
>     Files with changes that won't be committed:
>         modified: foo.c
> 
> might help reduce the confusion.

I fear that it can be misparsed as (Files with changes) to be committed. More importantly, I think Matthieu was right earlier: it is not the files but the changes that matter.

So when changing a file and marking it executable, I would even like to see:

	modified:    foo.c
	mode change: foo.c
even if that is not what git does today.
Matthieu Moy· Oct 28, 2010, 22:47 UTC · re: Jonathan Nieder · lore

Re: [PATCH 01/10] Better "Changed but not updated" message in git-status

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 31 quoted lines
> Junio C Hamano wrote:
>> Jonathan Nieder <jrnieder@gmail.com> writes:
>
>>>  # Changes to be committed:
>>>  #   (use "git reset HEAD <file>..." to unstage)
>>>  #
>>>  #       new file:   foo.c
>>>  #
>>>  # Changes not staged for commit:
> [...]
>> Hmm, perhaps we'd want to restate the first one as well to read
>> 
>>     Changes staged for commit:
>>       (use "git reset HEAD <path>..." to unstage)
>> 
>> for consistency as well?
>
> My first impression is no.  Since the main purpose of this text is to
> be shown by "git commit", it might even make sense to say:
>
> # Changes to be committed:
> #   (use "git reset -- <path>..." to unstage)
> #
> #	new file:    foo.c
> #
> # Changes not to be committed:
> #   (use "git add <path>..." to update what will be committed)
> #   (use "git checkout -- <path>..." to discard changes in working
> #   directory)
> #
> #	typechange:  bar.c

Actually, my formulation also has a subtle advantage: it somehow teaches the meaning of "staged". By reading "Changes not staged for commit" close to "Changes to be commited", it makes it rather clear what "staged for commit" means.

Perhaps changing the hint from "git add" to "git stage" right below would make that even clearer.

So, I tent to (very slightly) prefer my version.
Show 5 quoted lines
> It would be nice if the "staged changes" section gave a hint that there
> were unstaged changes present.  Maybe something like the
> "unsaved file" indicator used by some text editors:
>
> 	new file:    foo.c*

I'd argue against the syntax, since it kills cut-and-paste, but a visual indicator could be nice, yes.

Show 13 quoted lines
>> I've been wondering ever since this thread started if we can phrase it
>> better to make it even less confusing.  E.g.
>> 
>>     Files with changes to be committed:
>>         new file: foo.c
>>     Files with changes that won't be committed:
>>         modified: foo.c
>> 
>> might help reduce the confusion.
>
> I fear that it can be misparsed as (Files with changes) to be committed.
> More importantly, I think Matthieu was right earlier: it is not the
> files but the changes that matter.

I second that. Furthermore, keeping it short increase the changes that user will actually read the message.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Junio C Hamano· Oct 28, 2010, 23:20 UTC · re: Matthieu Moy · lore

Re: [PATCH 01/10] Better "Changed but not updated" message in git-status

Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
> Actually, my formulation also has a subtle advantage: it somehow
> teaches the meaning of "staged". By reading "Changes not staged for
> commit" close to "Changes to be commited", it makes it rather clear
> what "staged for commit" means.

That is exactly why I mentioned "Changes staged for commit" in the first part of my message.

> Perhaps changing the hint from "git add" to "git stage" right below
> would make that even clearer.

If we had "git reset HEAD -- <path>" as a synonym for "git unstage", perhaps. I always hesitate to suggest that, fearing if that synonym would always work, especially when you are not just dealing with your own changes (iow, doing something more than "I have clean checkout, and I edited some files, and I may have run 'git add' on some of them"). I do not think of a situation that the synonym wouldn't work offhand, but that of course does not mean it would always work.

Provided if such "git unstage" can be given as a counterpart of "git stage", it may be fine to advocate the verb "stage". But otherwise, I'd rather not to see the verb advocated in this way.

Notice that my rewording was crafted in such a way, rather carefully, so that we do not have to say "stage" anywhere.

Show 13 quoted lines
>>> I've been wondering ever since this thread started if we can phrase it
>>> better to make it even less confusing.  E.g.
>>> 
>>>     Files with changes to be committed:
>>>         new file: foo.c
>>>     Files with changes that won't be committed:
>>>         modified: foo.c
>>> 
>>> might help reduce the confusion.
>>
>> I fear that it can be misparsed as (Files with changes) to be committed.
>> More importantly, I think Matthieu was right earlier: it is not the
>> files but the changes that matter.

Well, I was aiming for the same. It is not the "files" but the changes that matter, but what we list are files. What we want to say here is that your changes are two kinds, and the ones to be committed appear in these paths, and the ones to be left behind appear in these paths (that can be overlapping with the former).

> I second that. Furthermore, keeping it short increase the changes that
> user will actually read the message.
You could do s/Files with/With/ to shorten them.  Or perhaps
    Changes to be committed are in:
        new file: foo.c
    Changes that will be left out are in:
        modified: foo.c
Matthieu Moy· Oct 28, 2010, 23:39 UTC · re: Junio C Hamano · lore

Re: [PATCH 01/10] Better "Changed but not updated" message in git-status

Junio C Hamano <gitster@pobox.com> writes:
> Well, I was aiming for the same.  It is not the "files" but the changes
> that matter, but what we list are files.

Not only. We also list "pairs of files" in the case of a rename, and list symlinks (which are technically files on unix, but not necessarily seen as such by all users).

Show 9 quoted lines
>> I second that. Furthermore, keeping it short increase the changes that
>> user will actually read the message.
>
> You could do s/Files with/With/ to shorten them.  Or perhaps
>
>     Changes to be committed are in:
>         new file: foo.c
>     Changes that will be left out are in:
>         modified: foo.c

I don't like the wording, and it would be worse in the case of renames :

Changes to be commited are in:
   renamed: foo -> bar

Anyway, I don't think we have a problem to solve here. While the "changed but not updated" was really confusing, I didn't see complains about the "Changes to be committed", and I really think this one is fine as it is.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Drew Northup· Oct 29, 2010, 21:06 UTC · re: Jonathan Nieder · lore

Re: [PATCH 01/10] Better "Changed but not updated" message in git-status

On Thu, 2010-10-28 at 17:09 -0500, Jonathan Nieder wrote:
Show 31 quoted lines
> Junio C Hamano wrote:
> > Jonathan Nieder <jrnieder@gmail.com> writes:
> 
> >>  # Changes to be committed:
> >>  #   (use "git reset HEAD <file>..." to unstage)
> >>  #
> >>  #       new file:   foo.c
> >>  #
> >>  # Changes not staged for commit:
> [...]
> > Hmm, perhaps we'd want to restate the first one as well to read
> > 
> >     Changes staged for commit:
> >       (use "git reset HEAD <path>..." to unstage)
> > 
> > for consistency as well?
> 
> My first impression is no.  Since the main purpose of this text is to
> be shown by "git commit", it might even make sense to say:
> 
> # Changes to be committed:
> #   (use "git reset -- <path>..." to unstage)
> #
> #	new file:    foo.c
> #
> # Changes not to be committed:
> #   (use "git add <path>..." to update what will be committed)
> #   (use "git checkout -- <path>..." to discard changes in working
> #   directory)
> #
> #	typechange:  bar.c

This one gets my vote out of the replacements I've seen. I appreciate leaving the "git add" idiom untouched.

Show 9 quoted lines
> > Listing by filename gives a false impression that we are talking about the
> > whole file contents, and looks a bit confusing until it is explained to
> > you why when the same file appears in both of the first two sections.
> 
> Iould be nice if the "staged changes" section gave a hint that there
> were unstaged changes present.  Maybe something like the
> "unsaved file" indicator used by some text editors:
> 
> 	new file:    foo.c*

Perhaps in the to be/ not to be sections we could indicate the mtime of staged changes in comparison with those not staged?

staged: # modified: foo.c 4:30 PM unstaged # modified: foo.c 4:50 PM

If we decide to do this I think it should be a separate patch from this set (functionality change as opposed to a terminology change). It would however make clear something that Thore initially complained about:

Show 5 quoted lines
> changed but not updated:
>
> I’m still not sure what “update” was ever supposed to mean in this
> sentence. I just edited the file, so it’s updated, for crying out
> loud!"
http://article.gmane.org/gmane.comp.version-control.git/159287 
-- 
---------------------------------+--------------------------------------
Drew Northup                     |          Technical Support Specialist
University of Maine System       |                Drew.Northup@Maine.edu
Computing Center                 |                 phone: (207) 561-3513
Orono, ME 04469                  |                   fax: (207) 561-3531
Matthieu Moy· Oct 30, 2010, 04:00 UTC · re: Drew Northup · lore

Re: [PATCH 01/10] Better "Changed but not updated" message in git-status

Drew Northup <drew.northup@maine.edu> writes:
Show 16 quoted lines
> On Thu, 2010-10-28 at 17:09 -0500, Jonathan Nieder wrote:
>> 
>> # Changes to be committed:
>> #   (use "git reset -- <path>..." to unstage)
>> #
>> #	new file:    foo.c
>> #
>> # Changes not to be committed:
>> #   (use "git add <path>..." to update what will be committed)
>> #   (use "git checkout -- <path>..." to discard changes in working
>> #   directory)
>> #
>> #	typechange:  bar.c
>
> This one gets my vote out of the replacements I've seen. I appreciate
> leaving the "git add" idiom untouched.

I still prefer my version. "Not staged for commit" makes it clearer that the files appear in this section because the user did not do some action (stage), while "not to be commited" remains a bit more misterious about the reason why the changes will not be commited, and mentionning the word "stage" here somehow teaches the user what staging means in the Git world.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Matthieu Moy· Oct 28, 2010, 18:21 UTC · re: Matthieu Moy · lore

[PATCH 02/10] Replace "remote tracking" with "remote-tracking"

"remote-tracking" branch makes it explicit that the branch is "tracking a remote", as opposed to "remote, and tracking something".

See discussion in e.g. http://mid.gmane.org/8835ADF9-45E5-4A26-9F7F-A72ECC065BB2@gmail.com for more details.

This patch is a straightforward application of
  perl -pi -e 's/remote tracking branch/remote-tracking branch/'
except in the RelNotes directory.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/config.txt           |    2 +-
 Documentation/fetch-options.txt    |    2 +-
 Documentation/git-log.txt          |    2 +-
 Documentation/git-pull.txt         |    2 +-
 Documentation/git-remote.txt       |    4 ++--
 Documentation/gittutorial.txt      |    2 +-
 Documentation/rev-list-options.txt |    2 +-
 Documentation/user-manual.txt      |    2 +-
 builtin/checkout.c                 |    2 +-
 t/t5513-fetch-track.sh             |    2 +-
 10 files changed, 11 insertions(+), 11 deletions(-)
Show changes to 10 files +11 −11

Documentation/config.txt, Documentation/fetch-options.txt, Documentation/git-log.txt, Documentation/git-pull.txt, Documentation/git-remote.txt, Documentation/gittutorial.txt, Documentation/rev-list-options.txt, Documentation/user-manual.txt, builtin/checkout.c, t/t5513-fetch-track.sh

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 538ebb5..e625d6a 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -708,7 +708,7 @@ color.diff.<slot>::
 color.decorate.<slot>::
 	Use customized color for 'git log --decorate' output.  `<slot>` is one
 	of `branch`, `remoteBranch`, `tag`, `stash` or `HEAD` for local
-	branches, remote tracking branches, tags, stash and HEAD, respectively.
+	branches, remote-tracking branches, tags, stash and HEAD, respectively.
 
 color.grep::
 	When set to `always`, always highlight matches.  When `false` (or
diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index 470ac31..a435c23 100644
--- a/Documentation/fetch-options.txt
+++ b/Documentation/fetch-options.txt
@@ -36,7 +36,7 @@ ifndef::git-pull[]
 
 -p::
 --prune::
-	After fetching, remove any remote tracking branches which
+	After fetching, remove any remote-tracking branches which
 	no longer exist	on the remote.
 endif::git-pull[]
 
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
index 6d40f00..ff41784 100644
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -116,7 +116,7 @@ git log --follow builtin-rev-list.c::
 git log --branches --not --remotes=origin::
 
 	Shows all commits that are in any of local branches but not in
-	any of remote tracking branches for 'origin' (what you have that
+	any of remote-tracking branches for 'origin' (what you have that
 	origin doesn't).
 
 git log master --not --remotes=*/master::
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index c50f7dc..33e8438 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -26,7 +26,7 @@ With `--rebase`, it runs 'git rebase' instead of 'git merge'.
 <repository> should be the name of a remote repository as
 passed to linkgit:git-fetch[1].  <refspec> can name an
 arbitrary remote ref (for example, the name of a tag) or even
-a collection of refs with corresponding remote tracking branches
+a collection of refs with corresponding remote-tracking branches
 (e.g., refs/heads/*:refs/remotes/origin/*), but usually it is
 the name of a branch in the remote repository.
 
diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt
index 0d28feb..5e4989d 100644
--- a/Documentation/git-remote.txt
+++ b/Documentation/git-remote.txt
@@ -75,7 +75,7 @@ was passed.
 
 'rename'::
 
-Rename the remote named <old> to <new>. All remote tracking branches and
+Rename the remote named <old> to <new>. All remote-tracking branches and
 configuration settings for the remote are updated.
 +
 In case <old> and <new> are the same, and <old> is a file under
@@ -84,7 +84,7 @@ the configuration file format.
 
 'rm'::
 
-Remove the remote named <name>. All remote tracking branches and
+Remove the remote named <name>. All remote-tracking branches and
 configuration settings for the remote are removed.
 
 'set-head'::
diff --git a/Documentation/gittutorial.txt b/Documentation/gittutorial.txt
index 1c16066..f1f4086 100644
--- a/Documentation/gittutorial.txt
+++ b/Documentation/gittutorial.txt
@@ -385,7 +385,7 @@ alice$ git fetch bob
 
 Unlike the longhand form, when Alice fetches from Bob using a
 remote repository shorthand set up with 'git remote', what was
-fetched is stored in a remote tracking branch, in this case
+fetched is stored in a remote-tracking branch, in this case
 `bob/master`.  So after this:
 
 -------------------------------------
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 7a42567..7a1b164 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -264,7 +264,7 @@ endif::git-rev-list[]
 
 	Pretend as if all the refs in `refs/remotes` are listed
 	on the command line as '<commit>'. If '<pattern>' is given, limit
-	remote tracking branches to ones matching given shell glob.
+	remote-tracking branches to ones matching given shell glob.
 	If pattern lacks '?', '*', or '[', '/*' at the end is implied.
 
 --glob=<glob-pattern>::
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index fc56da6..d5505e8 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1700,7 +1700,7 @@ may wish to check the original repository for updates and merge them
 into your own work.
 
 We have already seen <<Updating-a-repository-With-git-fetch,how to
-keep remote tracking branches up to date>> with linkgit:git-fetch[1],
+keep remote-tracking branches up to date>> with linkgit:git-fetch[1],
 and how to merge two branches.  So you can merge in changes from the
 original repository's master branch with:
 
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 9240faf..9a934af 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -786,7 +786,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
 	 *   With no paths, if <something> is _not_ a commit, no -t nor -b
 	 *   was given, and there is a tracking branch whose name is
 	 *   <something> in one and only one remote, then this is a short-hand
-	 *   to fork local <something> from that remote tracking branch.
+	 *   to fork local <something> from that remote-tracking branch.
 	 *
 	 *   Otherwise <something> shall not be ambiguous.
 	 *   - If it's *only* a reference, treat it like case (1).
diff --git a/t/t5513-fetch-track.sh b/t/t5513-fetch-track.sh
index 9e74862..65d1e05 100755
--- a/t/t5513-fetch-track.sh
+++ b/t/t5513-fetch-track.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_description='fetch follows remote tracking branches correctly'
+test_description='fetch follows remote-tracking branches correctly'
 
 . ./test-lib.sh
 
-- 
1.7.3.2.183.g2e7b0
Jonathan Nieder· Oct 28, 2010, 19:52 UTC · re: Matthieu Moy · lore

Re: [PATCH 02/10] Replace "remote tracking" with "remote-tracking"

Matthieu Moy wrote:
> "remote-tracking" branch makes it explicit that the branch is "tracking a
> remote", as opposed to "remote, and tracking something".
Yeah.
[...]
> This patch is a straightforward application of
> 
>   perl -pi -e 's/remote tracking branch/remote-tracking branch/'
Thanks, that makes it very easy to review.  The patch is obviously good.
Matthieu Moy· Oct 28, 2010, 18:21 UTC · re: Matthieu Moy · lore

[PATCH 03/10] Change remote tracking to remote-tracking in non-trivial places

To complement the straightforward perl application in previous patch, this adds a few manual changes.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/everyday.txt    |    6 +++---
 Documentation/git-gc.txt      |    6 +++---
 Documentation/gittutorial.txt |    4 ++--
 t/t5400-send-pack.sh          |    2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)
Show changes to 4 files +9 −9

Documentation/everyday.txt, Documentation/git-gc.txt, Documentation/gittutorial.txt, t/t5400-send-pack.sh

diff --git a/Documentation/everyday.txt b/Documentation/everyday.txt
index e0ba8cc..ae413e5 100644
--- a/Documentation/everyday.txt
+++ b/Documentation/everyday.txt
@@ -180,12 +180,12 @@ directory; clone from it to start a repository on the satellite
 machine.
 <2> clone sets these configuration variables by default.
 It arranges `git pull` to fetch and store the branches of mothership
-machine to local `remotes/origin/*` tracking branches.
+machine to local `remotes/origin/*` remote-tracking branches.
 <3> arrange `git push` to push local `master` branch to
 `remotes/satellite/master` branch of the mothership machine.
 <4> push will stash our work away on `remotes/satellite/master`
-tracking branch on the mothership machine.  You could use this as
-a back-up method.
+remote-tracking branch on the mothership machine.  You could use this
+as a back-up method.
 <5> on mothership machine, merge the work done on the satellite
 machine into the master branch.
 
diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt
index 315f07e..801aede 100644
--- a/Documentation/git-gc.txt
+++ b/Documentation/git-gc.txt
@@ -89,7 +89,7 @@ are not part of the current project most users will want to expire
 them sooner.  This option defaults to '30 days'.
 
 The above two configuration variables can be given to a pattern.  For
-example, this sets non-default expiry values only to remote tracking
+example, this sets non-default expiry values only to remote-tracking
 branches:
 
 ------------
@@ -128,8 +128,8 @@ Notes
 
 'git gc' tries very hard to be safe about the garbage it collects. In
 particular, it will keep not only objects referenced by your current set
-of branches and tags, but also objects referenced by the index, remote
-tracking branches, refs saved by 'git filter-branch' in
+of branches and tags, but also objects referenced by the index,
+remote-tracking branches, refs saved by 'git filter-branch' in
 refs/original/, or reflogs (which may reference commits in branches
 that were later amended or rewound).
 
diff --git a/Documentation/gittutorial.txt b/Documentation/gittutorial.txt
index f1f4086..0982f74 100644
--- a/Documentation/gittutorial.txt
+++ b/Documentation/gittutorial.txt
@@ -402,8 +402,8 @@ could merge the changes into her master branch:
 alice$ git merge bob/master
 -------------------------------------
 
-This `merge` can also be done by 'pulling from her own remote
-tracking branch', like this:
+This `merge` can also be done by 'pulling from her own remote-tracking
+branch', like this:
 
 -------------------------------------
 alice$ git pull . remotes/bob/master
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index 5bcf0b8..b0b2684 100755
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -129,7 +129,7 @@ test_expect_success 'denyNonFastforwards trumps --force' '
 	test "$victim_orig" = "$victim_head"
 '
 
-test_expect_success 'push --all excludes remote tracking hierarchy' '
+test_expect_success 'push --all excludes remote-tracking hierarchy' '
 	mkdir parent &&
 	(
 	    cd parent &&
-- 
1.7.3.2.183.g2e7b0
Jonathan Nieder· Oct 28, 2010, 18:39 UTC · re: Matthieu Moy · lore

Re: [PATCH 03/10] Change remote tracking to remote-tracking in non-trivial places

Matthieu Moy wrote:
Show 17 quoted lines
> --- a/Documentation/everyday.txt
> +++ b/Documentation/everyday.txt
> @@ -180,12 +180,12 @@ directory; clone from it to start a repository on the satellite
>  machine.
>  <2> clone sets these configuration variables by default.
>  It arranges `git pull` to fetch and store the branches of mothership
> -machine to local `remotes/origin/*` tracking branches.
> +machine to local `remotes/origin/*` remote-tracking branches.
>  <3> arrange `git push` to push local `master` branch to
>  `remotes/satellite/master` branch of the mothership machine.
>  <4> push will stash our work away on `remotes/satellite/master`
> -tracking branch on the mothership machine.  You could use this as
> -a back-up method.
> +remote-tracking branch on the mothership machine.  You could use this
> +as a back-up method.
>  <5> on mothership machine, merge the work done on the satellite
>  machine into the master branch.

Just for the record: I still don't think this hunk fits with the rest of the patch, and I think it just switches from one bad wording to another.

This is the "Everyday git" document, one of the first pages a new user might read. Using jargon that does not explain itself (whether it is "tracking branches" or "remote-tracking branches") is not really a good idea.

Wouldn't it be possible to split this into a separate patch, so it does not hold back the other "add hyphen" changes?

Matthieu Moy· Oct 28, 2010, 21:50 UTC · re: Jonathan Nieder · lore

Re: [PATCH 03/10] Change remote tracking to remote-tracking in non-trivial places

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 31 quoted lines
> Matthieu Moy wrote:
>
>> --- a/Documentation/everyday.txt
>> +++ b/Documentation/everyday.txt
>> @@ -180,12 +180,12 @@ directory; clone from it to start a repository on the satellite
>>  machine.
>>  <2> clone sets these configuration variables by default.
>>  It arranges `git pull` to fetch and store the branches of mothership
>> -machine to local `remotes/origin/*` tracking branches.
>> +machine to local `remotes/origin/*` remote-tracking branches.
>>  <3> arrange `git push` to push local `master` branch to
>>  `remotes/satellite/master` branch of the mothership machine.
>>  <4> push will stash our work away on `remotes/satellite/master`
>> -tracking branch on the mothership machine.  You could use this as
>> -a back-up method.
>> +remote-tracking branch on the mothership machine.  You could use this
>> +as a back-up method.
>>  <5> on mothership machine, merge the work done on the satellite
>>  machine into the master branch.
>
> Just for the record: I still don't think this hunk fits with the rest
> of the patch, and I think it just switches from one bad wording to
> another.
>
> This is the "Everyday git" document, one of the first pages a new user
> might read.  Using jargon that does not explain itself (whether it is
> "tracking branches" or "remote-tracking branches") is not really a
> good idea.
>
> Wouldn't it be possible to split this into a separate patch, so it
> does not hold back the other "add hyphen" changes?

I don't get the point. If you like neither "tracking branch" nor "remote-tracking branch", then my patch doesn't make the situation worse anyway, so it should not hold back anything. It doesn't prevent better wording of this document later, but this is not the point of my patch serie.

What I'm trying to do here is really to achieve consistancy. If something has a name, let's use the same name everywhere. I'd be really frustrated if some instances of any name other than "remote-tracking branch" remain purposedly after my patch serie to designate what we seem to agree should be called "remote-tracking branch".

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Jonathan Nieder· Oct 28, 2010, 22:13 UTC · re: Matthieu Moy · lore

Re: [PATCH 03/10] Change remote tracking to remote-tracking in non-trivial places

Matthieu Moy wrote:
> What I'm trying to do here is really to achieve consistancy. If
> something has a name, let's use the same name everywhere.

Okay, but can it at least not be part of a patch that does something simpler (only adding dashes)?

I'm not sure why you don't like the idea of rewording it, but that's fine --- I am just trying to make sure that the patches make sense...

Matthieu Moy· Oct 28, 2010, 22:40 UTC · re: Jonathan Nieder · lore

Re: [PATCH 03/10] Change remote tracking to remote-tracking in non-trivial places

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 7 quoted lines
> Matthieu Moy wrote:
>
>> What I'm trying to do here is really to achieve consistancy. If
>> something has a name, let's use the same name everywhere.
>
> Okay, but can it at least not be part of a patch that does something
> simpler (only adding dashes)?
OK, I'll do that.
> I'm not sure why you don't like the idea of rewording it, but
> that's fine ---

Not that I don't like the idea. I'm just saying that my patch makes the situation better that it used to. No objection if other people want to make it even better later (but I probably won't have time soon).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Drew Northup· Oct 29, 2010, 17:26 UTC · re: Matthieu Moy · lore

Re: [PATCH 03/10] Change remote tracking to remote-tracking in non-trivial places

On Fri, 2010-10-29 at 00:40 +0200, Matthieu Moy wrote:
Show 19 quoted lines
> Jonathan Nieder <jrnieder@gmail.com> writes:
> 
> > Matthieu Moy wrote:
> >
> >> What I'm trying to do here is really to achieve consistancy. If
> >> something has a name, let's use the same name everywhere.
> >
> > Okay, but can it at least not be part of a patch that does something
> > simpler (only adding dashes)?
> 
> OK, I'll do that.
> 
> > I'm not sure why you don't like the idea of rewording it, but
> > that's fine ---
> 
> Not that I don't like the idea. I'm just saying that my patch makes
> the situation better that it used to. No objection if other people
> want to make it even better later (but I probably won't have time
> soon).

I was contemplating taking some time to look more closely at this document myself. This patch does not get in the way of my doing so.

-- 
-Drew Northup N1XIM
   AKA RvnPhnx on OPN
________________________________________________
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59
Matthieu Moy· Oct 28, 2010, 18:21 UTC · re: Matthieu Moy · lore

One more step towards consistancy. We change the documentation and the C code in a single patch, since the only instances in the C code are in comment and usage strings.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/config.txt           |    4 ++--
 Documentation/git-fetch.txt        |    2 +-
 Documentation/git-pull.txt         |    6 +++---
 Documentation/git-remote.txt       |    2 +-
 Documentation/git-tag.txt          |    4 ++--
 Documentation/glossary-content.txt |   20 ++++++++++----------
 Documentation/user-manual.txt      |    2 +-
 builtin/checkout.c                 |    2 +-
 builtin/fetch.c                    |    4 ++--
 remote.c                           |    2 +-
 10 files changed, 24 insertions(+), 24 deletions(-)
Show changes to 10 files +24 −24

Documentation/config.txt, Documentation/git-fetch.txt, Documentation/git-pull.txt, Documentation/git-remote.txt, Documentation/git-tag.txt, Documentation/glossary-content.txt, Documentation/user-manual.txt, builtin/checkout.c, builtin/fetch.c, remote.c

diff --git a/Documentation/config.txt b/Documentation/config.txt
index e625d6a..e4f16d8 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -680,7 +680,7 @@ color.branch::
 color.branch.<slot>::
 	Use customized color for branch coloration. `<slot>` is one of
 	`current` (the current branch), `local` (a local branch),
-	`remote` (a tracking branch in refs/remotes/), `plain` (other
+	`remote` (a remote-tracking branch in refs/remotes/), `plain` (other
 	refs).
 +
 The value for these configuration variables is a list of colors (at most
@@ -1102,7 +1102,7 @@ gui.newbranchtemplate::
 	linkgit:git-gui[1].
 
 gui.pruneduringfetch::
-	"true" if linkgit:git-gui[1] should prune tracking branches when
+	"true" if linkgit:git-gui[1] should prune remote-tracking branches when
 	performing a fetch. The default value is "false".
 
 gui.trustmtime::
diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt
index d159e88..c76e313 100644
--- a/Documentation/git-fetch.txt
+++ b/Documentation/git-fetch.txt
@@ -26,7 +26,7 @@ The ref names and their object names of fetched refs are stored
 in `.git/FETCH_HEAD`.  This information is left for a later merge
 operation done by 'git merge'.
 
-When <refspec> stores the fetched result in tracking branches,
+When <refspec> stores the fetched result in remote-tracking branches,
 the tags that point at these branches are automatically
 followed.  This is done by first fetching from the remote using
 the given <refspec>s, and if the repository has objects that are
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index 33e8438..54e7013 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -134,7 +134,7 @@ and if there is not any such variable, the value on `URL: ` line
 in `$GIT_DIR/remotes/<origin>` file is used.
 
 In order to determine what remote branches to fetch (and
-optionally store in the tracking branches) when the command is
+optionally store in the remote-tracking branches) when the command is
 run without any refspec parameters on the command line, values
 of the configuration variable `remote.<origin>.fetch` are
 consulted, and if there aren't any, `$GIT_DIR/remotes/<origin>`
@@ -147,9 +147,9 @@ refs/heads/*:refs/remotes/origin/*
 ------------
 
 A globbing refspec must have a non-empty RHS (i.e. must store
-what were fetched in tracking branches), and its LHS and RHS
+what were fetched in remote-tracking branches), and its LHS and RHS
 must end with `/*`.  The above specifies that all remote
-branches are tracked using tracking branches in
+branches are tracked using remote-tracking branches in
 `refs/remotes/origin/` hierarchy under the same name.
 
 The rule to determine which remote branch to merge after
diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt
index 5e4989d..c258ea4 100644
--- a/Documentation/git-remote.txt
+++ b/Documentation/git-remote.txt
@@ -146,7 +146,7 @@ With `-n` option, the remote heads are not queried first with
 
 'prune'::
 
-Deletes all stale tracking branches under <name>.
+Deletes all stale remote-tracking branches under <name>.
 These stale branches have already been removed from the remote repository
 referenced by <name>, but are still locally available in
 "remotes/<name>".
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index 31c78a8..8b169e3 100644
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -177,7 +177,7 @@ On Automatic following
 ~~~~~~~~~~~~~~~~~~~~~~
 
 If you are following somebody else's tree, you are most likely
-using tracking branches (`refs/heads/origin` in traditional
+using remote-tracking branches (`refs/heads/origin` in traditional
 layout, or `refs/remotes/origin/master` in the separate-remote
 layout).  You usually want the tags from the other end.
 
@@ -232,7 +232,7 @@ this case.
 It may well be that among networking people, they may want to
 exchange the tags internal to their group, but in that workflow
 they are most likely tracking with each other's progress by
-having tracking branches.  Again, the heuristic to automatically
+having remote-tracking branches.  Again, the heuristic to automatically
 follow such tags is a good thing.
 
 
diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt
index 1f029f8..ba96b32 100644
--- a/Documentation/glossary-content.txt
+++ b/Documentation/glossary-content.txt
@@ -131,7 +131,7 @@ to point at the new commit.
 	you have. In such these cases, you do not make a new <<def_merge,merge>>
 	<<def_commit,commit>> but instead just update to his
 	revision. This will happen frequently on a
-	<<def_tracking_branch,tracking branch>> of a remote
+	<<def_remote_tracking_branch,remote-tracking branch>> of a remote
 	<<def_repository,repository>>.
 
 [[def_fetch]]fetch::
@@ -260,7 +260,7 @@ This commit is referred to as a "merge commit", or sometimes just a
 	The default upstream <<def_repository,repository>>. Most projects have
 	at least one upstream project which they track. By default
 	'origin' is used for that purpose. New upstream updates
-	will be fetched into remote <<def_tracking_branch,tracking branches>> named
+	will be fetched into remote <<def_remote_tracking_branch,remote-tracking branches>> named
 	origin/name-of-upstream-branch, which you can see using
 	`git branch -r`.
 
@@ -349,6 +349,14 @@ This commit is referred to as a "merge commit", or sometimes just a
 	master branch head as to-upstream branch at $URL". See also
 	linkgit:git-push[1].
 
+[[def_remote_tracking_branch]]remote-tracking branch::
+	A regular git <<def_branch,branch>> that is used to follow changes from
+	another <<def_repository,repository>>. A 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 <<def_ref,ref>> in a Pull:
+	<<def_refspec,refspec>>.
+
 [[def_repository]]repository::
 	A collection of <<def_ref,refs>> together with an
 	<<def_object_database,object database>> containing all objects
@@ -418,14 +426,6 @@ This commit is referred to as a "merge commit", or sometimes just a
 	that each contain very well defined concepts or small incremental yet
 	related changes.
 
-[[def_tracking_branch]]tracking branch::
-	A regular git <<def_branch,branch>> that is used to follow changes from
-	another <<def_repository,repository>>. A tracking
-	branch should not contain direct modifications or have local commits
-	made to it. A tracking branch can usually be
-	identified as the right-hand-side <<def_ref,ref>> in a Pull:
-	<<def_refspec,refspec>>.
-
 [[def_tree]]tree::
 	Either a <<def_working_tree,working tree>>, or a <<def_tree_object,tree
 	object>> together with the dependent <<def_blob_object,blob>> and tree objects
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index d5505e8..d7835ca 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -435,7 +435,7 @@ linux-nfs/master
 origin/master
 -------------------------------------------------
 
-If you run "git fetch <remote>" later, the tracking branches for the
+If you run "git fetch <remote>" later, the remote-tracking branches for the
 named <remote> will be updated.
 
 If you examine the file .git/config, you will see that git has added
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 9a934af..1fa9ce4 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -784,7 +784,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
 	 *   between A and B, A...B names that merge base.
 	 *
 	 *   With no paths, if <something> is _not_ a commit, no -t nor -b
-	 *   was given, and there is a tracking branch whose name is
+	 *   was given, and there is a remote-tracking branch whose name is
 	 *   <something> in one and only one remote, then this is a short-hand
 	 *   to fork local <something> from that remote-tracking branch.
 	 *
diff --git a/builtin/fetch.c b/builtin/fetch.c
index d35f000..3b0b614 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -52,7 +52,7 @@ static struct option builtin_fetch_options[] = {
 	OPT_SET_INT('n', NULL, &tags,
 		    "do not fetch all tags (--no-tags)", TAGS_UNSET),
 	OPT_BOOLEAN('p', "prune", &prune,
-		    "prune tracking branches no longer on remote"),
+		    "prune remote-tracking branches no longer on remote"),
 	OPT_BOOLEAN(0, "dry-run", &dry_run,
 		    "dry run"),
 	OPT_BOOLEAN('k', "keep", &keep, "keep downloaded pack"),
@@ -98,7 +98,7 @@ static void add_merge_config(struct ref **head,
 			continue;
 
 		/*
-		 * Not fetched to a tracking branch?  We need to fetch
+		 * Not fetched to a remote-tracking branch?  We need to fetch
 		 * it anyway to allow this branch's "branch.$name.merge"
 		 * to be honored by 'git pull', but we do not have to
 		 * fail if branch.$name.merge is misconfigured to point
diff --git a/remote.c b/remote.c
index 9143ec7..ca42a12 100644
--- a/remote.c
+++ b/remote.c
@@ -493,7 +493,7 @@ static void read_config(void)
 }
 
 /*
- * We need to make sure the tracking branches are well formed, but a
+ * We need to make sure the remote-tracking branches are well formed, but a
  * wildcard refspec in "struct refspec" must have a trailing slash. We
  * temporarily drop the trailing '/' while calling check_ref_format(),
  * and put it back.  The caller knows that a CHECK_REF_FORMAT_ONELEVEL
-- 
1.7.3.2.183.g2e7b0
Jonathan Nieder· Oct 28, 2010, 19:56 UTC · re: Matthieu Moy · lore

Re: [PATCH 04/10] Change "tracking branch" to "remote-tracking branch"

Matthieu Moy wrote:
> One more step towards consistancy. We change the documentation and the C
> code in a single patch, since the only instances in the C code are in
> comment and usage strings.
For what it's worth:
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Show 15 quoted lines
> --- a/Documentation/glossary-content.txt
> +++ b/Documentation/glossary-content.txt
> @@ -349,6 +349,14 @@ This commit is referred to as a "merge commit", or sometimes just a
>  	master branch head as to-upstream branch at $URL". See also
>  	linkgit:git-push[1].
>  
> +[[def_remote_tracking_branch]]remote-tracking branch::
> +	A regular git <<def_branch,branch>> that is used to follow changes from
> +	another <<def_repository,repository>>. A 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 <<def_ref,ref>> in a Pull:
> +	<<def_refspec,refspec>>.
> +
>  [[def_repository]]repository::

In particular, your explanation for this hunk makes sense. Any links out in the world to "gitglossary.html#def_tracking_branch" would go to the top of the page after this change. Once there, the reader can easily search for "tracking branch" to find the right entry.

Matthieu Moy· Oct 28, 2010, 18:21 UTC · re: Matthieu Moy · lore

[PATCH 05/10] Change incorrect uses of "remote branch" meaning "remote-tracking"

"remote branch" is a branch hosted in a remote repository, while "remote-tracking branch" is a copy of such branch, hosted locally. The distinction is subtle when the copy is up-to-date, but rather fundamental to understand what "git fetch" and "git push" do.

This patch should fix all incorrect usages in Documentation/ directory.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/config.txt       |    7 ++++---
 Documentation/git-branch.txt   |   11 ++++++-----
 Documentation/git-checkout.txt |    2 +-
 Documentation/git-clone.txt    |    2 +-
 Documentation/git-describe.txt |    2 +-
 Documentation/user-manual.txt  |    9 +++++----
 6 files changed, 18 insertions(+), 15 deletions(-)
Show changes to 6 files +18 −14

Documentation/config.txt, Documentation/git-branch.txt, Documentation/git-checkout.txt, Documentation/git-clone.txt, Documentation/git-describe.txt, Documentation/user-manual.txt

diff --git a/Documentation/config.txt b/Documentation/config.txt
index e4f16d8..6a6c0b5 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -601,8 +601,9 @@ branch.autosetupmerge::
 	this behavior can be chosen per-branch using the `--track`
 	and `--no-track` options. The valid settings are: `false` -- no
 	automatic setup is done; `true` -- automatic setup is done when the
-	starting point is a remote branch; `always` -- automatic setup is
-	done when the starting point is either a local branch or remote
+	starting point is a remote-tracking branch; `always` --
+	automatic setup is done when the starting point is either a
+	local branch or remote-tracking
 	branch. This option defaults to true.
 
 branch.autosetuprebase::
@@ -613,7 +614,7 @@ branch.autosetuprebase::
 	When `local`, rebase is set to true for tracked branches of
 	other local branches.
 	When `remote`, rebase is set to true for tracked branches of
-	remote branches.
+	remote-tracking branches.
 	When `always`, rebase will be set to true for all tracking
 	branches.
 	See "branch.autosetupmerge" for details on how to set up a
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 1940256..7f23c56 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -37,9 +37,9 @@ Note that this will create the new branch, but it will not switch the
 working tree to it; use "git checkout <newbranch>" to switch to the
 new branch.
 
-When a local branch is started off a remote branch, git sets up the
+When a local branch is started off a remote-tracking branch, git sets up the
 branch so that 'git pull' will appropriately merge from
-the remote branch. This behavior may be changed via the global
+the remote-tracking branch. This behavior may be changed via the global
 `branch.autosetupmerge` configuration flag. That setting can be
 overridden by using the `--track` and `--no-track` options.
 
@@ -89,7 +89,8 @@ OPTIONS
 	Move/rename a branch even if the new branch name already exists.
 
 --color[=<when>]::
-	Color branches to highlight current, local, and remote branches.
+	Color branches to highlight current, local, and
+	remote-tracking branches.
 	The value must be always (the default), never, or auto.
 
 --no-color::
@@ -125,11 +126,11 @@ OPTIONS
 	it directs `git pull` without arguments to pull from the
 	upstream when the new branch is checked out.
 +
-This behavior is the default when the start point is a remote branch.
+This behavior is the default when the start point is a remote-tracking branch.
 Set the branch.autosetupmerge configuration variable to `false` if you
 want `git checkout` and `git branch` to always behave as if '--no-track'
 were given. Set it to `always` if you want this behavior when the
-start-point is either a local or remote branch.
+start-point is either a local or remote-tracking branch.
 
 --no-track::
 	Do not set up "upstream" configuration, even if the
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 22d3611..880763d 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -98,7 +98,7 @@ entries; instead, unmerged entries are ignored.
 	"--track" in linkgit:git-branch[1] for details.
 +
 If no '-b' option is given, the name of the new branch will be
-derived from the remote branch.  If "remotes/" or "refs/remotes/"
+derived from the remote-tracking branch.  If "remotes/" or "refs/remotes/"
 is prefixed it is stripped away, and then the part up to the
 next slash (which would be the nickname of the remote) is removed.
 This would tell us to use "hack" as the local branch when branching
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index ab72933..2320382 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -131,7 +131,7 @@ objects from the source repository into a pack in the cloned repository.
 	Set up a mirror of the source repository.  This implies `--bare`.
 	Compared to `--bare`, `--mirror` not only maps local branches of the
 	source to local branches of the target, it maps all refs (including
-	remote branches, notes etc.) and sets up a refspec configuration such
+	remote-tracking branches, notes etc.) and sets up a refspec configuration such
 	that all these refs are overwritten by a `git remote update` in the
 	target repository.
 
diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
index 7ef9d51..02e015a 100644
--- a/Documentation/git-describe.txt
+++ b/Documentation/git-describe.txt
@@ -37,7 +37,7 @@ OPTIONS
 --all::
 	Instead of using only the annotated tags, use any ref
 	found in `.git/refs/`.  This option enables matching
-	any known branch, remote branch, or lightweight tag.
+	any known branch, remote-tracking branch, or lightweight tag.
 
 --tags::
 	Instead of using only the annotated tags, use any tag
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index d7835ca..d70f3e0 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1724,7 +1724,8 @@ accomplish the above with just a simple
 $ git pull
 -------------------------------------------------
 
-More generally, a branch that is created from a remote branch will pull
+More generally, a branch that is created from a remote-tracking branch
+will pull
 by default from that branch.  See the descriptions of the
 branch.<name>.remote and branch.<name>.merge options in
 linkgit:git-config[1], and the discussion of the `--track` option in
@@ -2106,7 +2107,7 @@ $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
 $ cd work
 -------------------------------------------------
 
-Linus's tree will be stored in the remote branch named origin/master,
+Linus's tree will be stored in the remote-tracking branch named origin/master,
 and can be updated using linkgit:git-fetch[1]; you can track other
 public trees using linkgit:git-remote[1] to set up a "remote" and
 linkgit:git-fetch[1] to keep them up-to-date; see
@@ -2800,8 +2801,8 @@ Be aware that commits that the old version of example/master pointed at
 may be lost, as we saw in the previous section.
 
 [[remote-branch-configuration]]
-Configuring remote branches
----------------------------
+Configuring remote-tracking branches
+------------------------------------
 
 We saw above that "origin" is just a shortcut to refer to the
 repository that you originally cloned from.  This information is
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 28, 2010, 18:21 UTC · re: Matthieu Moy · lore

[PATCH 06/10] Change incorrect "remote branch" to "remote tracking branch" in C code

(Just like we did for documentation already)
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 branch.h                               |    2 +-
 builtin/fetch.c                        |    2 +-
 builtin/remote.c                       |    6 +++---
 contrib/examples/builtin-fetch--tool.c |    2 +-
 t/t5505-remote.sh                      |    8 +++++---
 t/t7608-merge-messages.sh              |    2 +-
 6 files changed, 12 insertions(+), 10 deletions(-)
Show changes to 6 files +12 −10

branch.h, builtin/fetch.c, builtin/remote.c, contrib/examples/builtin-fetch--tool.c, t/t5505-remote.sh, t/t7608-merge-messages.sh

diff --git a/branch.h b/branch.h
index eed817a..2004632 100644
--- a/branch.h
+++ b/branch.h
@@ -22,7 +22,7 @@ void create_branch(const char *head, const char *name, const char *start_name,
 void remove_branch_state(void);
 
 /*
- * Configure local branch "local" to merge remote branch "remote"
+ * Configure local branch "local" to merge remote-tracking branch "remote"
  * taken from origin "origin".
  */
 #define BRANCH_CONFIG_VERBOSE 01
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 3b0b614..4243ef0 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -359,7 +359,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
 			what = rm->name + 10;
 		}
 		else if (!prefixcmp(rm->name, "refs/remotes/")) {
-			kind = "remote branch";
+			kind = "remote-tracking branch";
 			what = rm->name + 13;
 		}
 		else {
diff --git a/builtin/remote.c b/builtin/remote.c
index e9a6e09..6a06282 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -507,7 +507,7 @@ static int add_branch_for_removal(const char *refname,
 			return 0;
 	}
 
-	/* don't delete non-remote refs */
+	/* don't delete non-remote-tracking refs */
 	if (prefixcmp(refname, "refs/remotes")) {
 		/* advise user how to delete local branches */
 		if (!prefixcmp(refname, "refs/heads/"))
@@ -791,9 +791,9 @@ static int rm(int argc, const char **argv)
 
 	if (skipped.nr) {
 		fprintf(stderr, skipped.nr == 1 ?
-			"Note: A non-remote branch was not removed; "
+			"Note: A branch outside the refs/remotes/ hierarchy was not removed;\n"
 			"to delete it, use:\n" :
-			"Note: Non-remote branches were not removed; "
+			"Note: Some branches outside the refs/remotes/ hierarchy were not removed;\n"
 			"to delete them, use:\n");
 		for (i = 0; i < skipped.nr; i++)
 			fprintf(stderr, "  git branch -d %s\n",
diff --git a/contrib/examples/builtin-fetch--tool.c b/contrib/examples/builtin-fetch--tool.c
index cd10dbc..3140e40 100644
--- a/contrib/examples/builtin-fetch--tool.c
+++ b/contrib/examples/builtin-fetch--tool.c
@@ -148,7 +148,7 @@ static int append_fetch_head(FILE *fp,
 		what = remote_name + 10;
 	}
 	else if (!strncmp(remote_name, "refs/remotes/", 13)) {
-		kind = "remote branch";
+		kind = "remote-tracking branch";
 		what = remote_name + 13;
 	}
 	else {
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index 5d1c66e..d189add 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -107,16 +107,18 @@ test_expect_success 'remove remote' '
 )
 '
 
-test_expect_success 'remove remote protects non-remote branches' '
+test_expect_success 'remove remote protects local branches' '
 (
 	cd test &&
 	{ cat >expect1 <<EOF
-Note: A non-remote branch was not removed; to delete it, use:
+Note: A branch outside the refs/remotes/ hierarchy was not removed;
+to delete it, use:
   git branch -d master
 EOF
 	} &&
 	{ cat >expect2 <<EOF
-Note: Non-remote branches were not removed; to delete them, use:
+Note: Some branches outside the refs/remotes/ hierarchy were not removed;
+to delete them, use:
   git branch -d foobranch
   git branch -d master
 EOF
diff --git a/t/t7608-merge-messages.sh b/t/t7608-merge-messages.sh
index 28d5679..1c71296 100755
--- a/t/t7608-merge-messages.sh
+++ b/t/t7608-merge-messages.sh
@@ -47,7 +47,7 @@ test_expect_success 'ambiguous tag' '
 	check_oneline "Merge commit QambiguousQ"
 '
 
-test_expect_success 'remote branch' '
+test_expect_success 'remote-tracking branch' '
 	git checkout -b remote master &&
 	test_commit remote-1 &&
 	git update-ref refs/remotes/origin/master remote &&
-- 
1.7.3.2.183.g2e7b0
Jonathan Nieder· Oct 28, 2010, 19:13 UTC · re: Matthieu Moy · lore

Re: [PATCH 06/10] Change incorrect "remote branch" to "remote tracking branch" in C code

Matthieu Moy wrote:
Show 11 quoted lines
> --- a/branch.h
> +++ b/branch.h
> @@ -22,7 +22,7 @@ void create_branch(const char *head, const char *name, const char *start_name,
>  void remove_branch_state(void);
>  
>  /*
> - * Configure local branch "local" to merge remote branch "remote"
> + * Configure local branch "local" to merge remote-tracking branch "remote"
>   * taken from origin "origin".
>   */
>  #define BRANCH_CONFIG_VERBOSE 01
This still seems inaccurate (and even misleading).  Presumably you mean
	             ... to merge remote-tracking branch "origin/remote"
	based on origin "origin".
or
	             ... to merge remote branch "remote"
	taken from origin "origin"
or even better,
	Configure local branch "local" as downstream to branch "remote"
	from remote "origin".  Used by git branch --set-upstream.
More confusion could presumably be avoided by renaming the parameters.
Show 9 quoted lines
> --- a/builtin/fetch.c
> +++ b/builtin/fetch.c
> @@ -359,7 +359,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
>  			what = rm->name + 10;
>  		}
>  		else if (!prefixcmp(rm->name, "refs/remotes/")) {
> -			kind = "remote branch";
> +			kind = "remote-tracking branch";
>  			what = rm->name + 13;

I didn't follow before --- what concrete effect does this have? Are scripts affected? Is fmt-merge-msg affected?

Show 14 quoted lines
> --- a/builtin/remote.c
> +++ b/builtin/remote.c
> @@ -791,9 +791,9 @@ static int rm(int argc, const char **argv)
>  
>  	if (skipped.nr) {
>  		fprintf(stderr, skipped.nr == 1 ?
> -			"Note: A non-remote branch was not removed; "
> +			"Note: A branch outside the refs/remotes/ hierarchy was not removed;\n"
>  			"to delete it, use:\n" :
> -			"Note: Non-remote branches were not removed; "
> +			"Note: Some branches outside the refs/remotes/ hierarchy were not removed;\n"
>  			"to delete them, use:\n");
>  		for (i = 0; i < skipped.nr; i++)
>  			fprintf(stderr, "  git branch -d %s\n",
Nice.
Maybe the commit message should explain the reasoning, something like:
 The non-deleted branch is somehow remote-tracking since "fetch" feeds
 it, and the code detecting this case is:
	/* don't delete non-remote-tracking refs */
	if (prefixcmp(refname, "refs/remotes")) {
		/* advise user how to delete local branches */
		if (!prefixcmp(refname, "refs/heads/"))
			string_list_append(branches->skipped,
					   abbrev_branch(refname));
		/* silently skip over other non-remote refs */
		return 0;
	}
 
 hence, really "branches outside the refs/remotes/ hierarchy".
Thanks for your tireless work.  Everything not mentioned above looks good.
Matthieu Moy· Oct 28, 2010, 22:34 UTC · re: Jonathan Nieder · lore

Re: [PATCH 06/10] Change incorrect "remote branch" to "remote tracking branch" in C code

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 11 quoted lines
> Matthieu Moy wrote:
>
>> --- a/branch.h
>> +++ b/branch.h
>> @@ -22,7 +22,7 @@ void create_branch(const char *head, const char *name, const char *start_name,
>>  void remove_branch_state(void);
>>
>>  /*
>> - * Configure local branch "local" to merge remote branch "remote"
>> + * Configure local branch "local" to merge remote-tracking branch "remote"
>>   * taken from origin "origin".
> 	Configure local branch "local" as downstream to branch "remote"
> 	from remote "origin".  Used by git branch --set-upstream.
I buy this one.
Show 11 quoted lines
>> --- a/builtin/fetch.c
>> +++ b/builtin/fetch.c
>> @@ -359,7 +359,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
>>  			what = rm->name + 10;
>>  		}
>>  		else if (!prefixcmp(rm->name, "refs/remotes/")) {
>> -			kind = "remote branch";
>> +			kind = "remote-tracking branch";
>>  			what = rm->name + 13;
>
> I didn't follow before --- what concrete effect does this have?
Almost none ;-).
>From reading the code and testing, it affects

$ git fetch $ cat FETCH_HEAD ... 21d039[...] not-for-merge remote-tracking branch 'origin/branch' of /tmp/cloned ...

when ran in a repository obtained with "git clone --mirror" (i.e. when you fetch remote-tracking branches from the remote repository).

and
$ git fetch origin refs/remotes/origin/some-branch
From /tmp/cloned
 * remote-tracking branch origin/oaue -> FETCH_HEAD
> Are scripts affected?

I don't think any script would parse the last part of FETCH_HEAD, which seems really to be meant as a comment, nor the precise output of git-fetch-in-a-mirror-with-refspec-given-explicitely.

But anyway, that's in a place where bare mortals wouldn't go, so I don't mind much is anyone wants to revert this particular hunk. That's not going to affect the learning curve of newcommers.

> Is fmt-merge-msg affected?

No (that's why it's a separate patch. In case you missed my earlier message: yes, the testsuite passes between the two).

> Maybe the commit message should explain the reasoning, something like:
>
>  The non-deleted branch is somehow remote-tracking since "fetch" feeds
>  it, and the code detecting this case is:
I've tried a shorter version :
  In the process, we change "non-remote branch" to "branch outside
  the refs/remotes/ hierarchy" to avoid the ugly "non-remote-tracking
  branch". The new formulation actually corresponds to how the code
  detects this case (i.e. prefixcmp(refname, "refs/remotes")).

-- Matthieu Moy http://www-verimag.imag.fr/~moy/

Jonathan Nieder· Oct 28, 2010, 23:23 UTC · re: Matthieu Moy · lore

Re: [PATCH 06/10] Change incorrect "remote branch" to "remote tracking branch" in C code

Matthieu Moy wrote:
> I don't think any script would parse the last part of FETCH_HEAD,
> which seems really to be meant as a comment
Yes, believable.
> Jonathan Nieder <jrnieder@gmail.com> writes:
>> Is fmt-merge-msg affected?
>
> No (that's why it's a separate patch. In case you missed my earlier
> message: yes, the testsuite passes between the two).

I suspect the testsuite passing is only because the fmt-merge-msg tests don't try "git fetch . remotes/foo/bar".

In modern times, "git merge" bypasses fmt-merge-msg with its own code (as you probably noticed :)).

>   In the process, we change "non-remote branch" to "branch outside
>   the refs/remotes/ hierarchy" to avoid the ugly "non-remote-tracking
>   branch". The new formulation actually corresponds to how the code
>   detects this case (i.e. prefixcmp(refname, "refs/remotes")).
Sounds good.  Thanks.
Matthieu Moy· Oct 28, 2010, 18:21 UTC · re: Matthieu Moy · lore

[PATCH 07/10] Use 'remote-tracking branch' in generated merge messages

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 builtin/fmt-merge-msg.c           |    6 +++---
 builtin/merge.c                   |    2 +-
 t/t1507-rev-parse-upstream.sh     |    2 +-
 t/t3409-rebase-preserve-merges.sh |    2 +-
 t/t7608-merge-messages.sh         |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)
Show changes to 5 files +7 −7

builtin/fmt-merge-msg.c, builtin/merge.c, t/t1507-rev-parse-upstream.sh, t/t3409-rebase-preserve-merges.sh, t/t7608-merge-messages.sh

diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index 78c7774..5189b16 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -100,8 +100,8 @@ static int handle_line(char *line)
 		origin = line;
 		string_list_append(&src_data->tag, origin + 4);
 		src_data->head_status |= 2;
-	} else if (!prefixcmp(line, "remote branch ")) {
-		origin = line + 14;
+	} else if (!prefixcmp(line, "remote-tracking branch ")) {
+		origin = line + strlen("remote-tracking branch ");
 		string_list_append(&src_data->r_branch, origin);
 		src_data->head_status |= 2;
 	} else {
@@ -233,7 +233,7 @@ static void do_fmt_merge_msg_title(struct strbuf *out,
 		if (src_data->r_branch.nr) {
 			strbuf_addstr(out, subsep);
 			subsep = ", ";
-			print_joined("remote branch ", "remote branches ",
+			print_joined("remote-tracking branch ", "remote-tracking branches ",
 					&src_data->r_branch, out);
 		}
 		if (src_data->tag.nr) {
diff --git a/builtin/merge.c b/builtin/merge.c
index 10f091b..9ec13f1 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -403,7 +403,7 @@ static void merge_name(const char *remote, struct strbuf *msg)
 			goto cleanup;
 		}
 		if (!prefixcmp(found_ref, "refs/remotes/")) {
-			strbuf_addf(msg, "%s\t\tremote branch '%s' of .\n",
+			strbuf_addf(msg, "%s\t\tremote-tracking branch '%s' of .\n",
 				    sha1_to_hex(branch_head), remote);
 			goto cleanup;
 		}
diff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh
index 8c8dfda..a455551 100755
--- a/t/t1507-rev-parse-upstream.sh
+++ b/t/t1507-rev-parse-upstream.sh
@@ -85,7 +85,7 @@ test_expect_success 'merge my-side@{u} records the correct name' '
 	git branch -t new my-side@{u} &&
 	git merge -s ours new@{u} &&
 	git show -s --pretty=format:%s >actual &&
-	echo "Merge remote branch ${sq}origin/side${sq}" >expect &&
+	echo "Merge remote-tracking branch ${sq}origin/side${sq}" >expect &&
 	test_cmp expect actual
 )
 '
diff --git a/t/t3409-rebase-preserve-merges.sh b/t/t3409-rebase-preserve-merges.sh
index 74161a4..19341e5 100755
--- a/t/t3409-rebase-preserve-merges.sh
+++ b/t/t3409-rebase-preserve-merges.sh
@@ -72,7 +72,7 @@ test_expect_success 'rebase -p fakes interactive rebase' '
 	git fetch &&
 	git rebase -p origin/topic &&
 	test 1 = $(git rev-list --all --pretty=oneline | grep "Modify A" | wc -l) &&
-	test 1 = $(git rev-list --all --pretty=oneline | grep "Merge remote branch " | wc -l)
+	test 1 = $(git rev-list --all --pretty=oneline | grep "Merge remote-tracking branch " | wc -l)
 	)
 '
 
diff --git a/t/t7608-merge-messages.sh b/t/t7608-merge-messages.sh
index 1c71296..9225fa6 100755
--- a/t/t7608-merge-messages.sh
+++ b/t/t7608-merge-messages.sh
@@ -54,7 +54,7 @@ test_expect_success 'remote-tracking branch' '
 	git checkout master &&
 	test_commit master-5 &&
 	git merge origin/master &&
-	check_oneline "Merge remote branch Qorigin/masterQ"
+	check_oneline "Merge remote-tracking branch Qorigin/masterQ"
 '
 
 test_done
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 28, 2010, 18:21 UTC · re: Matthieu Moy · lore

[PATCH 08/10] user-manual.txt: explain better the remote(-tracking) branch terms

Now that the documentation is mostly consistant in the use of "remote branch" Vs "remote-tracking branch", let's make this distinction explicit early in the user-manual.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/user-manual.txt |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)
Show changes to Documentation/user-manual.txt +17 −3
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index d70f3e0..62b3788 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -344,7 +344,8 @@ Examining branches from a remote repository
 The "master" branch that was created at the time you cloned is a copy
 of the HEAD in the repository that you cloned from.  That repository
 may also have had other branches, though, and your local repository
-keeps branches which track each of those remote branches, which you
+keeps branches which track each of those remote branches, called
+remote-tracking branches, which you
 can view using the "-r" option to linkgit:git-branch[1]:
 
 ------------------------------------------------
@@ -359,6 +360,14 @@ $ git branch -r
   origin/todo
 ------------------------------------------------
 
+In this case, "origin" is called a remote repository, or "remote" for
+short. The branches of this repository are called "remote branches"
+from our point of view. The remote-tracking branches are created in
+the local repository at clone time, as a copy of the remote branches.
+They are references that will be updated by "git fetch" (hence by "git
+pull"), and by "git push". See
+<<Updating-a-repository-With-git-fetch>> for details.
+
 You cannot check out these remote-tracking branches, but you can
 examine them on a branch of your own, just as you would a tag:
 
@@ -1716,14 +1725,19 @@ one step:
 $ git pull origin master
 -------------------------------------------------
 
-In fact, if you have "master" checked out, then by default "git pull"
-merges from the HEAD branch of the origin repository.  So often you can
+In fact, if you have "master" checked out, then this branch has been
+configured by "git clone" to get changes from the HEAD branch of the
+origin repository.  So often you can
 accomplish the above with just a simple
 
 -------------------------------------------------
 $ git pull
 -------------------------------------------------
 
+This command will fetch the changes from the remote branches to your
+remote-tracking branches `origin/*`, and merge default branch in the
+current branch.
+
 More generally, a branch that is created from a remote-tracking branch
 will pull
 by default from that branch.  See the descriptions of the
-- 
1.7.3.2.183.g2e7b0
Jonathan Nieder· Oct 28, 2010, 19:42 UTC · re: Matthieu Moy · lore

Re: [PATCH 08/10] user-manual.txt: explain better the remote(-tracking) branch terms

Matthieu Moy wrote:
> Now that the documentation is mostly consistant in the use of "remote
> branch" Vs "remote-tracking branch"

In fact, I think this patch would be useful even before the documentation is perfectly consistent.

> , let's make this distinction explicit
> early in the user-manual.
Thanks.  It is good to maintain a clear vocabulary.
All that follows are nitpicks.
Show 26 quoted lines
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -341,30 +342,38 @@ $ git branch -r
>  Examining branches from a remote repository
>  -------------------------------------------
>
>  The "master" branch that was created at the time you cloned is a copy
>  of the HEAD in the repository that you cloned from.  That repository
>  may also have had other branches, though, and your local repository
>  keeps branches which track each of those remote branches, which you
>  can view using the "-r" option to linkgit:git-branch[1]:
>
>  ------------------------------------------------
>  $ git branch -r
>    origin/HEAD
>    origin/html
>    origin/maint
>    origin/man
>    origin/master
>    origin/next
>    origin/pu
>    origin/todo
>  ------------------------------------------------
>
> +In this case, "origin" is called a remote repository, or "remote" for
> +short.

"In this case" seems redundant (since we did not explain what other case it is being opposed to). "origin" has not been explained yet. Maybe something along these lines (sorry for my poor wording)

 The repository of origin is called a remote repository, or a "remote" for
 short.
would improve it?
>         The branches of this repository are called "remote branches"
> +from our point of view. The remote-tracking branches are created in
> +the local repository at clone time, as a copy of the remote branches.
Sentence structure.  Maybe
          The branches of this repository are called "remote branches"
  from our point of view. The remote-tracking branches listed above
  were created based on the remote branches at clone time and will be
  updated by "git fetch" and "git push".
  See <<Updating -a-repository-With-git-fetch>> for details.
Show 14 quoted lines
> +They are references that will be updated by "git fetch" (hence by "git
> +pull"), and by "git push". See
> +<<Updating-a-repository-With-git-fetch>> for details.
> +
>  You cannot check out these remote-tracking branches, but you can
>  examine them on a branch of your own, just as you would a tag:
>
>  ------------------------------------------------
>  $ git checkout -b my-todo-copy origin/todo
>  ------------------------------------------------
>
>  Note that the name "origin" is just the name that git uses by default
>  to refer to the repository that you cloned from.
> @@ -1716,14 +1725,19 @@ one step:
[...]
Show 8 quoted lines
>  -------------------------------------------------
>  $ git pull
>  -------------------------------------------------
>  
> +This command will fetch the changes from the remote branches to your
> +remote-tracking branches `origin/*`, and merge default branch in the
> +current branch.
> +
Article use.  Probably something like
	s/the changes/changes/
	s/merge default branch in/merge the default branch into/
would do.
Matthieu Moy· Oct 28, 2010, 23:40 UTC · re: Jonathan Nieder · lore

Re: [PATCH 08/10] user-manual.txt: explain better the remote(-tracking) branch terms

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 16 quoted lines
>>  $ git branch -r
>>    origin/HEAD
>>    origin/html
>>    origin/maint
>>    origin/man
>>    origin/master
>>    origin/next
>>    origin/pu
>>    origin/todo
>>  ------------------------------------------------
>>
>> +In this case, "origin" is called a remote repository, or "remote" for
>> +short.
>
> "In this case" seems redundant (since we did not explain what other
> case it is being opposed to).

The wording was unfortunate, but what I meant was to explain the example right above while defining the vocabulary.

I've changed it to "In this example".
>  The repository of origin is called a remote repository, or a "remote" for
>  short.
>
> would improve it?

It removes the link between the explanation and the example right above. I prefer the quotes around "origin" to really show that it's the string that appear in `git branch -r`.

Show 11 quoted lines
>>         The branches of this repository are called "remote branches"
>> +from our point of view. The remote-tracking branches are created in
>> +the local repository at clone time, as a copy of the remote branches.
>
> Sentence structure.  Maybe
>
>           The branches of this repository are called "remote branches"
>   from our point of view. The remote-tracking branches listed above
>   were created based on the remote branches at clone time and will be
>   updated by "git fetch" and "git push".
>   See <<Updating -a-repository-With-git-fetch>> for details.

I've taken this (I like the "listed above" in particular), except I'm keeping the (hence "git pull"), since "git pull" is probably more likely to be used than "git fetch" by beginners.

Show 11 quoted lines
>> +This command will fetch the changes from the remote branches to your
>> +remote-tracking branches `origin/*`, and merge default branch in the
>> +current branch.
>> +
>
> Article use.  Probably something like
>
> 	s/the changes/changes/
> 	s/merge default branch in/merge the default branch into/
>
> would do.
Taken, thanks.
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Matthieu Moy· Oct 28, 2010, 18:21 UTC · re: Matthieu Moy · lore

[PATCH 09/10] user-manual: remote-tracking can be checked out, with detached HEAD

From: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/user-manual.txt |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
Show changes to Documentation/user-manual.txt +5 −2
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 62b3788..2b04e84 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -368,13 +368,16 @@ They are references that will be updated by "git fetch" (hence by "git
 pull"), and by "git push". See
 <<Updating-a-repository-With-git-fetch>> for details.
 
-You cannot check out these remote-tracking branches, but you can
-examine them on a branch of your own, just as you would a tag:
+You might want to build on one of these remote-tracking branches
+on a branch of your own, just as you would for a tag:
 
 ------------------------------------------------
 $ git checkout -b my-todo-copy origin/todo
 ------------------------------------------------
 
+You can also check out "origin/todo" directly to examine it or
+write a one-off patch.  See <<detached-head,detached head>>.
+
 Note that the name "origin" is just the name that git uses by default
 to refer to the repository that you cloned from.
 
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 28, 2010, 18:21 UTC · re: Matthieu Moy · lore

[PATCH 10/10] git-branch.txt: mention --set-upstream as a way to change upstream configuration

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/git-branch.txt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Show changes to Documentation/git-branch.txt +2 −1
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 7f23c56..9106d38 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -41,7 +41,8 @@ When a local branch is started off a remote-tracking branch, git sets up the
 branch so that 'git pull' will appropriately merge from
 the remote-tracking branch. This behavior may be changed via the global
 `branch.autosetupmerge` configuration flag. That setting can be
-overridden by using the `--track` and `--no-track` options.
+overridden by using the `--track` and `--no-track` options, and
+changed later using `git branch --set-upstream`.
 
 With a '-m' or '-M' option, <oldbranch> will be renamed to <newbranch>.
 If <oldbranch> had a corresponding reflog, it is renamed to match
-- 
1.7.3.2.183.g2e7b0
Jonathan Nieder· Oct 28, 2010, 20:08 UTC · re: Matthieu Moy · lore

Re: [PATCH 10/10] git-branch.txt: mention --set-upstream as a way to change upstream configuration

Matthieu Moy wrote:
> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Patches 5, 9, and 10 look good, too.

Thanks again. Jonathan who is wishing his inbox were not so full.

Matthieu Moy· Oct 30, 2010, 04:10 UTC · re: Matthieu Moy · lore

[PATCH 00/11 v4] More consistant terminology

One more version, after Jonathan''s remarks.

I've splitted the everyday.txt hunk in a separate patch, reworded one comment and fixed some grammar in user-manual.txt (see corresponding discussions in thread for v3).

Jonathan Nieder (1):
  user-manual: remote-tracking can be checked out, with detached HEAD
Matthieu Moy (10):
  Better "Changed but not updated" message in git-status
  Replace "remote tracking" with "remote-tracking"
  Change remote tracking to remote-tracking in non-trivial places
  everyday.txt: change "tracking branch" to "remote-tracking branch"
  Change "tracking branch" to "remote-tracking branch"
  Change incorrect uses of "remote branch" meaning "remote-tracking"
  Change incorrect "remote branch" to "remote tracking branch" in C
    code
  Use 'remote-tracking branch' in generated merge messages
  user-manual.txt: explain better the remote(-tracking) branch terms
  git-branch.txt: mention --set-upstream as a way to change upstream
    configuration
 Documentation/config.txt               |   13 +++++-----
 Documentation/everyday.txt             |    6 ++--
 Documentation/fetch-options.txt        |    2 +-
 Documentation/git-branch.txt           |   14 ++++++-----
 Documentation/git-checkout.txt         |    2 +-
 Documentation/git-clone.txt            |    2 +-
 Documentation/git-describe.txt         |    2 +-
 Documentation/git-fetch.txt            |    2 +-
 Documentation/git-gc.txt               |    6 ++--
 Documentation/git-log.txt              |    2 +-
 Documentation/git-pull.txt             |    8 +++---
 Documentation/git-remote.txt           |    6 ++--
 Documentation/git-tag.txt              |    4 +-
 Documentation/gittutorial-2.txt        |    2 +-
 Documentation/gittutorial.txt          |    6 ++--
 Documentation/glossary-content.txt     |   20 ++++++++--------
 Documentation/rev-list-options.txt     |    2 +-
 Documentation/user-manual.txt          |   39 +++++++++++++++++++++++---------
 branch.h                               |    4 +-
 builtin/checkout.c                     |    4 +-
 builtin/fetch.c                        |    6 ++--
 builtin/fmt-merge-msg.c                |    6 ++--
 builtin/merge.c                        |    2 +-
 builtin/remote.c                       |    6 ++--
 contrib/examples/builtin-fetch--tool.c |    2 +-
 remote.c                               |    2 +-
 t/t1507-rev-parse-upstream.sh          |    2 +-
 t/t3409-rebase-preserve-merges.sh      |    2 +-
 t/t5400-send-pack.sh                   |    2 +-
 t/t5505-remote.sh                      |    8 ++++--
 t/t5513-fetch-track.sh                 |    2 +-
 t/t7508-status.sh                      |   34 ++++++++++++++--------------
 t/t7608-merge-messages.sh              |    4 +-
 wt-status.c                            |    2 +-
 34 files changed, 124 insertions(+), 102 deletions(-)
-- 
1.7.3.2.183.g2e7b0
Jonathan Nieder· Oct 30, 2010, 06:58 UTC · re: Matthieu Moy · lore

Re: [PATCH 00/11 v4] More consistant terminology

Matthieu Moy wrote:
Show 16 quoted lines
> Jonathan Nieder (1):
>   user-manual: remote-tracking can be checked out, with detached HEAD
> 
> Matthieu Moy (10):
>   Better "Changed but not updated" message in git-status
>   Replace "remote tracking" with "remote-tracking"
>   Change remote tracking to remote-tracking in non-trivial places
>   everyday.txt: change "tracking branch" to "remote-tracking branch"
>   Change "tracking branch" to "remote-tracking branch"
>   Change incorrect uses of "remote branch" meaning "remote-tracking"
>   Change incorrect "remote branch" to "remote tracking branch" in C
>     code
>   Use 'remote-tracking branch' in generated merge messages
>   user-manual.txt: explain better the remote(-tracking) branch terms
>   git-branch.txt: mention --set-upstream as a way to change upstream
>     configuration
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Sorry to draw this out so (and thanks for your work!).

IMHO patches 7 and 8 should be squashed to avoid breaking the fetch/fmt-merge-msg interface, but there is no need to resend again to make that happen.

Matthieu Moy· Oct 30, 2010, 04:10 UTC · re: Matthieu Moy · lore

[PATCH 01/11] Better "Changed but not updated" message in git-status

Older Gits talked about "updating" a file to add its content to the index, but this terminology is confusing for new users. "to stage" is far more intuitive and already used in e.g. the "git stage" command name.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/gittutorial-2.txt |    2 +-
 t/t7508-status.sh               |   34 +++++++++++++++++-----------------
 wt-status.c                     |    2 +-
 3 files changed, 19 insertions(+), 19 deletions(-)
Show changes to 3 files +19 −19

Documentation/gittutorial-2.txt, t/t7508-status.sh, wt-status.c

diff --git a/Documentation/gittutorial-2.txt b/Documentation/gittutorial-2.txt
index ecab0c0..7fe5848 100644
--- a/Documentation/gittutorial-2.txt
+++ b/Documentation/gittutorial-2.txt
@@ -373,7 +373,7 @@ $ git status
 #
 #       new file: closing.txt
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #
 #       modified: file.txt
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index c9300f3..4de3e27 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -44,7 +44,7 @@ cat >expect <<\EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -73,7 +73,7 @@ cat >expect <<\EOF
 # Changes to be committed:
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #	modified:   dir1/modified
 #
 # Untracked files:
@@ -140,7 +140,7 @@ cat >expect <<EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -167,7 +167,7 @@ cat >expect <<EOF
 # Changes to be committed:
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #	modified:   dir1/modified
 #
 # Untracked files not listed
@@ -202,7 +202,7 @@ cat >expect <<EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -260,7 +260,7 @@ cat >expect <<EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -320,7 +320,7 @@ cat >expect <<\EOF
 #
 #	new file:   ../dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -392,7 +392,7 @@ cat >expect <<\EOF
 #
 #	<GREEN>new file:   dir2/added<RESET>
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -521,7 +521,7 @@ cat >expect <<\EOF
 #
 #	new file:   dir2/added
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -614,7 +614,7 @@ cat >expect <<EOF
 #	new file:   dir2/added
 #	new file:   sm
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -673,7 +673,7 @@ cat >expect <<EOF
 #	new file:   dir2/added
 #	new file:   sm
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -718,7 +718,7 @@ test_expect_success 'status -s submodule summary' '
 
 cat >expect <<EOF
 # On branch master
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -766,7 +766,7 @@ cat >expect <<EOF
 #	new file:   dir2/added
 #	new file:   sm
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -819,7 +819,7 @@ cat > expect << EOF
 #
 #	modified:   sm
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -931,7 +931,7 @@ cat > expect << EOF
 #
 #	modified:   sm
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #   (commit or discard the untracked or modified content in submodules)
@@ -989,7 +989,7 @@ cat > expect << EOF
 #
 #	modified:   sm
 #
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
@@ -1067,7 +1067,7 @@ test_expect_success ".git/config ignore=dirty doesn't suppress submodule summary
 
 cat > expect << EOF
 # On branch master
-# Changed but not updated:
+# Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
diff --git a/wt-status.c b/wt-status.c
index fc2438f..d9f3d9f 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -88,7 +88,7 @@ static void wt_status_print_dirty_header(struct wt_status *s,
 {
 	const char *c = color(WT_STATUS_HEADER, s);
 
-	color_fprintf_ln(s->fp, c, "# Changed but not updated:");
+	color_fprintf_ln(s->fp, c, "# Changes not staged for commit:");
 	if (!advice_status_hints)
 		return;
 	if (!has_deleted)
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 30, 2010, 04:10 UTC · re: Matthieu Moy · lore

[PATCH 02/11] Replace "remote tracking" with "remote-tracking"

"remote-tracking" branch makes it explicit that the branch is "tracking a remote", as opposed to "remote, and tracking something".

See discussion in e.g. http://mid.gmane.org/8835ADF9-45E5-4A26-9F7F-A72ECC065BB2@gmail.com for more details.

This patch is a straightforward application of
  perl -pi -e 's/remote tracking branch/remote-tracking branch/'
except in the RelNotes directory.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/config.txt           |    2 +-
 Documentation/fetch-options.txt    |    2 +-
 Documentation/git-log.txt          |    2 +-
 Documentation/git-pull.txt         |    2 +-
 Documentation/git-remote.txt       |    4 ++--
 Documentation/gittutorial.txt      |    2 +-
 Documentation/rev-list-options.txt |    2 +-
 Documentation/user-manual.txt      |    2 +-
 builtin/checkout.c                 |    2 +-
 t/t5513-fetch-track.sh             |    2 +-
 10 files changed, 11 insertions(+), 11 deletions(-)
Show changes to 10 files +11 −11

Documentation/config.txt, Documentation/fetch-options.txt, Documentation/git-log.txt, Documentation/git-pull.txt, Documentation/git-remote.txt, Documentation/gittutorial.txt, Documentation/rev-list-options.txt, Documentation/user-manual.txt, builtin/checkout.c, t/t5513-fetch-track.sh

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 538ebb5..e625d6a 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -708,7 +708,7 @@ color.diff.<slot>::
 color.decorate.<slot>::
 	Use customized color for 'git log --decorate' output.  `<slot>` is one
 	of `branch`, `remoteBranch`, `tag`, `stash` or `HEAD` for local
-	branches, remote tracking branches, tags, stash and HEAD, respectively.
+	branches, remote-tracking branches, tags, stash and HEAD, respectively.
 
 color.grep::
 	When set to `always`, always highlight matches.  When `false` (or
diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index 470ac31..a435c23 100644
--- a/Documentation/fetch-options.txt
+++ b/Documentation/fetch-options.txt
@@ -36,7 +36,7 @@ ifndef::git-pull[]
 
 -p::
 --prune::
-	After fetching, remove any remote tracking branches which
+	After fetching, remove any remote-tracking branches which
 	no longer exist	on the remote.
 endif::git-pull[]
 
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
index 6d40f00..ff41784 100644
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -116,7 +116,7 @@ git log --follow builtin-rev-list.c::
 git log --branches --not --remotes=origin::
 
 	Shows all commits that are in any of local branches but not in
-	any of remote tracking branches for 'origin' (what you have that
+	any of remote-tracking branches for 'origin' (what you have that
 	origin doesn't).
 
 git log master --not --remotes=*/master::
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index c50f7dc..33e8438 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -26,7 +26,7 @@ With `--rebase`, it runs 'git rebase' instead of 'git merge'.
 <repository> should be the name of a remote repository as
 passed to linkgit:git-fetch[1].  <refspec> can name an
 arbitrary remote ref (for example, the name of a tag) or even
-a collection of refs with corresponding remote tracking branches
+a collection of refs with corresponding remote-tracking branches
 (e.g., refs/heads/*:refs/remotes/origin/*), but usually it is
 the name of a branch in the remote repository.
 
diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt
index 0d28feb..5e4989d 100644
--- a/Documentation/git-remote.txt
+++ b/Documentation/git-remote.txt
@@ -75,7 +75,7 @@ was passed.
 
 'rename'::
 
-Rename the remote named <old> to <new>. All remote tracking branches and
+Rename the remote named <old> to <new>. All remote-tracking branches and
 configuration settings for the remote are updated.
 +
 In case <old> and <new> are the same, and <old> is a file under
@@ -84,7 +84,7 @@ the configuration file format.
 
 'rm'::
 
-Remove the remote named <name>. All remote tracking branches and
+Remove the remote named <name>. All remote-tracking branches and
 configuration settings for the remote are removed.
 
 'set-head'::
diff --git a/Documentation/gittutorial.txt b/Documentation/gittutorial.txt
index 1c16066..f1f4086 100644
--- a/Documentation/gittutorial.txt
+++ b/Documentation/gittutorial.txt
@@ -385,7 +385,7 @@ alice$ git fetch bob
 
 Unlike the longhand form, when Alice fetches from Bob using a
 remote repository shorthand set up with 'git remote', what was
-fetched is stored in a remote tracking branch, in this case
+fetched is stored in a remote-tracking branch, in this case
 `bob/master`.  So after this:
 
 -------------------------------------
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 7a42567..7a1b164 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -264,7 +264,7 @@ endif::git-rev-list[]
 
 	Pretend as if all the refs in `refs/remotes` are listed
 	on the command line as '<commit>'. If '<pattern>' is given, limit
-	remote tracking branches to ones matching given shell glob.
+	remote-tracking branches to ones matching given shell glob.
 	If pattern lacks '?', '*', or '[', '/*' at the end is implied.
 
 --glob=<glob-pattern>::
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index fc56da6..d5505e8 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1700,7 +1700,7 @@ may wish to check the original repository for updates and merge them
 into your own work.
 
 We have already seen <<Updating-a-repository-With-git-fetch,how to
-keep remote tracking branches up to date>> with linkgit:git-fetch[1],
+keep remote-tracking branches up to date>> with linkgit:git-fetch[1],
 and how to merge two branches.  So you can merge in changes from the
 original repository's master branch with:
 
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 9240faf..9a934af 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -786,7 +786,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
 	 *   With no paths, if <something> is _not_ a commit, no -t nor -b
 	 *   was given, and there is a tracking branch whose name is
 	 *   <something> in one and only one remote, then this is a short-hand
-	 *   to fork local <something> from that remote tracking branch.
+	 *   to fork local <something> from that remote-tracking branch.
 	 *
 	 *   Otherwise <something> shall not be ambiguous.
 	 *   - If it's *only* a reference, treat it like case (1).
diff --git a/t/t5513-fetch-track.sh b/t/t5513-fetch-track.sh
index 9e74862..65d1e05 100755
--- a/t/t5513-fetch-track.sh
+++ b/t/t5513-fetch-track.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_description='fetch follows remote tracking branches correctly'
+test_description='fetch follows remote-tracking branches correctly'
 
 . ./test-lib.sh
 
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 30, 2010, 04:10 UTC · re: Matthieu Moy · lore

[PATCH 03/11] Change remote tracking to remote-tracking in non-trivial places

To complement the straightforward perl application in previous patch, this adds a few manual changes.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/git-gc.txt      |    6 +++---
 Documentation/gittutorial.txt |    4 ++--
 t/t5400-send-pack.sh          |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
Show changes to 3 files +6 −6

Documentation/git-gc.txt, Documentation/gittutorial.txt, t/t5400-send-pack.sh

diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt
index 315f07e..801aede 100644
--- a/Documentation/git-gc.txt
+++ b/Documentation/git-gc.txt
@@ -89,7 +89,7 @@ are not part of the current project most users will want to expire
 them sooner.  This option defaults to '30 days'.
 
 The above two configuration variables can be given to a pattern.  For
-example, this sets non-default expiry values only to remote tracking
+example, this sets non-default expiry values only to remote-tracking
 branches:
 
 ------------
@@ -128,8 +128,8 @@ Notes
 
 'git gc' tries very hard to be safe about the garbage it collects. In
 particular, it will keep not only objects referenced by your current set
-of branches and tags, but also objects referenced by the index, remote
-tracking branches, refs saved by 'git filter-branch' in
+of branches and tags, but also objects referenced by the index,
+remote-tracking branches, refs saved by 'git filter-branch' in
 refs/original/, or reflogs (which may reference commits in branches
 that were later amended or rewound).
 
diff --git a/Documentation/gittutorial.txt b/Documentation/gittutorial.txt
index f1f4086..0982f74 100644
--- a/Documentation/gittutorial.txt
+++ b/Documentation/gittutorial.txt
@@ -402,8 +402,8 @@ could merge the changes into her master branch:
 alice$ git merge bob/master
 -------------------------------------
 
-This `merge` can also be done by 'pulling from her own remote
-tracking branch', like this:
+This `merge` can also be done by 'pulling from her own remote-tracking
+branch', like this:
 
 -------------------------------------
 alice$ git pull . remotes/bob/master
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index 5bcf0b8..b0b2684 100755
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -129,7 +129,7 @@ test_expect_success 'denyNonFastforwards trumps --force' '
 	test "$victim_orig" = "$victim_head"
 '
 
-test_expect_success 'push --all excludes remote tracking hierarchy' '
+test_expect_success 'push --all excludes remote-tracking hierarchy' '
 	mkdir parent &&
 	(
 	    cd parent &&
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 30, 2010, 04:10 UTC · re: Matthieu Moy · lore

[PATCH 04/11] everyday.txt: change "tracking branch" to "remote-tracking branch"

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/everyday.txt |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Show changes to Documentation/everyday.txt +3 −3
diff --git a/Documentation/everyday.txt b/Documentation/everyday.txt
index e0ba8cc..ae413e5 100644
--- a/Documentation/everyday.txt
+++ b/Documentation/everyday.txt
@@ -180,12 +180,12 @@ directory; clone from it to start a repository on the satellite
 machine.
 <2> clone sets these configuration variables by default.
 It arranges `git pull` to fetch and store the branches of mothership
-machine to local `remotes/origin/*` tracking branches.
+machine to local `remotes/origin/*` remote-tracking branches.
 <3> arrange `git push` to push local `master` branch to
 `remotes/satellite/master` branch of the mothership machine.
 <4> push will stash our work away on `remotes/satellite/master`
-tracking branch on the mothership machine.  You could use this as
-a back-up method.
+remote-tracking branch on the mothership machine.  You could use this
+as a back-up method.
 <5> on mothership machine, merge the work done on the satellite
 machine into the master branch.
 
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 30, 2010, 04:10 UTC · re: Matthieu Moy · lore

[PATCH 05/11] Change "tracking branch" to "remote-tracking branch"

One more step towards consistancy. We change the documentation and the C code in a single patch, since the only instances in the C code are in comment and usage strings.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/config.txt           |    4 ++--
 Documentation/git-fetch.txt        |    2 +-
 Documentation/git-pull.txt         |    6 +++---
 Documentation/git-remote.txt       |    2 +-
 Documentation/git-tag.txt          |    4 ++--
 Documentation/glossary-content.txt |   20 ++++++++++----------
 Documentation/user-manual.txt      |    2 +-
 builtin/checkout.c                 |    2 +-
 builtin/fetch.c                    |    4 ++--
 remote.c                           |    2 +-
 10 files changed, 24 insertions(+), 24 deletions(-)
Show changes to 10 files +24 −24

Documentation/config.txt, Documentation/git-fetch.txt, Documentation/git-pull.txt, Documentation/git-remote.txt, Documentation/git-tag.txt, Documentation/glossary-content.txt, Documentation/user-manual.txt, builtin/checkout.c, builtin/fetch.c, remote.c

diff --git a/Documentation/config.txt b/Documentation/config.txt
index e625d6a..e4f16d8 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -680,7 +680,7 @@ color.branch::
 color.branch.<slot>::
 	Use customized color for branch coloration. `<slot>` is one of
 	`current` (the current branch), `local` (a local branch),
-	`remote` (a tracking branch in refs/remotes/), `plain` (other
+	`remote` (a remote-tracking branch in refs/remotes/), `plain` (other
 	refs).
 +
 The value for these configuration variables is a list of colors (at most
@@ -1102,7 +1102,7 @@ gui.newbranchtemplate::
 	linkgit:git-gui[1].
 
 gui.pruneduringfetch::
-	"true" if linkgit:git-gui[1] should prune tracking branches when
+	"true" if linkgit:git-gui[1] should prune remote-tracking branches when
 	performing a fetch. The default value is "false".
 
 gui.trustmtime::
diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt
index d159e88..c76e313 100644
--- a/Documentation/git-fetch.txt
+++ b/Documentation/git-fetch.txt
@@ -26,7 +26,7 @@ The ref names and their object names of fetched refs are stored
 in `.git/FETCH_HEAD`.  This information is left for a later merge
 operation done by 'git merge'.
 
-When <refspec> stores the fetched result in tracking branches,
+When <refspec> stores the fetched result in remote-tracking branches,
 the tags that point at these branches are automatically
 followed.  This is done by first fetching from the remote using
 the given <refspec>s, and if the repository has objects that are
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index 33e8438..54e7013 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -134,7 +134,7 @@ and if there is not any such variable, the value on `URL: ` line
 in `$GIT_DIR/remotes/<origin>` file is used.
 
 In order to determine what remote branches to fetch (and
-optionally store in the tracking branches) when the command is
+optionally store in the remote-tracking branches) when the command is
 run without any refspec parameters on the command line, values
 of the configuration variable `remote.<origin>.fetch` are
 consulted, and if there aren't any, `$GIT_DIR/remotes/<origin>`
@@ -147,9 +147,9 @@ refs/heads/*:refs/remotes/origin/*
 ------------
 
 A globbing refspec must have a non-empty RHS (i.e. must store
-what were fetched in tracking branches), and its LHS and RHS
+what were fetched in remote-tracking branches), and its LHS and RHS
 must end with `/*`.  The above specifies that all remote
-branches are tracked using tracking branches in
+branches are tracked using remote-tracking branches in
 `refs/remotes/origin/` hierarchy under the same name.
 
 The rule to determine which remote branch to merge after
diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt
index 5e4989d..c258ea4 100644
--- a/Documentation/git-remote.txt
+++ b/Documentation/git-remote.txt
@@ -146,7 +146,7 @@ With `-n` option, the remote heads are not queried first with
 
 'prune'::
 
-Deletes all stale tracking branches under <name>.
+Deletes all stale remote-tracking branches under <name>.
 These stale branches have already been removed from the remote repository
 referenced by <name>, but are still locally available in
 "remotes/<name>".
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index 31c78a8..8b169e3 100644
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -177,7 +177,7 @@ On Automatic following
 ~~~~~~~~~~~~~~~~~~~~~~
 
 If you are following somebody else's tree, you are most likely
-using tracking branches (`refs/heads/origin` in traditional
+using remote-tracking branches (`refs/heads/origin` in traditional
 layout, or `refs/remotes/origin/master` in the separate-remote
 layout).  You usually want the tags from the other end.
 
@@ -232,7 +232,7 @@ this case.
 It may well be that among networking people, they may want to
 exchange the tags internal to their group, but in that workflow
 they are most likely tracking with each other's progress by
-having tracking branches.  Again, the heuristic to automatically
+having remote-tracking branches.  Again, the heuristic to automatically
 follow such tags is a good thing.
 
 
diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt
index 1f029f8..ba96b32 100644
--- a/Documentation/glossary-content.txt
+++ b/Documentation/glossary-content.txt
@@ -131,7 +131,7 @@ to point at the new commit.
 	you have. In such these cases, you do not make a new <<def_merge,merge>>
 	<<def_commit,commit>> but instead just update to his
 	revision. This will happen frequently on a
-	<<def_tracking_branch,tracking branch>> of a remote
+	<<def_remote_tracking_branch,remote-tracking branch>> of a remote
 	<<def_repository,repository>>.
 
 [[def_fetch]]fetch::
@@ -260,7 +260,7 @@ This commit is referred to as a "merge commit", or sometimes just a
 	The default upstream <<def_repository,repository>>. Most projects have
 	at least one upstream project which they track. By default
 	'origin' is used for that purpose. New upstream updates
-	will be fetched into remote <<def_tracking_branch,tracking branches>> named
+	will be fetched into remote <<def_remote_tracking_branch,remote-tracking branches>> named
 	origin/name-of-upstream-branch, which you can see using
 	`git branch -r`.
 
@@ -349,6 +349,14 @@ This commit is referred to as a "merge commit", or sometimes just a
 	master branch head as to-upstream branch at $URL". See also
 	linkgit:git-push[1].
 
+[[def_remote_tracking_branch]]remote-tracking branch::
+	A regular git <<def_branch,branch>> that is used to follow changes from
+	another <<def_repository,repository>>. A 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 <<def_ref,ref>> in a Pull:
+	<<def_refspec,refspec>>.
+
 [[def_repository]]repository::
 	A collection of <<def_ref,refs>> together with an
 	<<def_object_database,object database>> containing all objects
@@ -418,14 +426,6 @@ This commit is referred to as a "merge commit", or sometimes just a
 	that each contain very well defined concepts or small incremental yet
 	related changes.
 
-[[def_tracking_branch]]tracking branch::
-	A regular git <<def_branch,branch>> that is used to follow changes from
-	another <<def_repository,repository>>. A tracking
-	branch should not contain direct modifications or have local commits
-	made to it. A tracking branch can usually be
-	identified as the right-hand-side <<def_ref,ref>> in a Pull:
-	<<def_refspec,refspec>>.
-
 [[def_tree]]tree::
 	Either a <<def_working_tree,working tree>>, or a <<def_tree_object,tree
 	object>> together with the dependent <<def_blob_object,blob>> and tree objects
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index d5505e8..d7835ca 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -435,7 +435,7 @@ linux-nfs/master
 origin/master
 -------------------------------------------------
 
-If you run "git fetch <remote>" later, the tracking branches for the
+If you run "git fetch <remote>" later, the remote-tracking branches for the
 named <remote> will be updated.
 
 If you examine the file .git/config, you will see that git has added
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 9a934af..1fa9ce4 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -784,7 +784,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
 	 *   between A and B, A...B names that merge base.
 	 *
 	 *   With no paths, if <something> is _not_ a commit, no -t nor -b
-	 *   was given, and there is a tracking branch whose name is
+	 *   was given, and there is a remote-tracking branch whose name is
 	 *   <something> in one and only one remote, then this is a short-hand
 	 *   to fork local <something> from that remote-tracking branch.
 	 *
diff --git a/builtin/fetch.c b/builtin/fetch.c
index d35f000..3b0b614 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -52,7 +52,7 @@ static struct option builtin_fetch_options[] = {
 	OPT_SET_INT('n', NULL, &tags,
 		    "do not fetch all tags (--no-tags)", TAGS_UNSET),
 	OPT_BOOLEAN('p', "prune", &prune,
-		    "prune tracking branches no longer on remote"),
+		    "prune remote-tracking branches no longer on remote"),
 	OPT_BOOLEAN(0, "dry-run", &dry_run,
 		    "dry run"),
 	OPT_BOOLEAN('k', "keep", &keep, "keep downloaded pack"),
@@ -98,7 +98,7 @@ static void add_merge_config(struct ref **head,
 			continue;
 
 		/*
-		 * Not fetched to a tracking branch?  We need to fetch
+		 * Not fetched to a remote-tracking branch?  We need to fetch
 		 * it anyway to allow this branch's "branch.$name.merge"
 		 * to be honored by 'git pull', but we do not have to
 		 * fail if branch.$name.merge is misconfigured to point
diff --git a/remote.c b/remote.c
index 9143ec7..ca42a12 100644
--- a/remote.c
+++ b/remote.c
@@ -493,7 +493,7 @@ static void read_config(void)
 }
 
 /*
- * We need to make sure the tracking branches are well formed, but a
+ * We need to make sure the remote-tracking branches are well formed, but a
  * wildcard refspec in "struct refspec" must have a trailing slash. We
  * temporarily drop the trailing '/' while calling check_ref_format(),
  * and put it back.  The caller knows that a CHECK_REF_FORMAT_ONELEVEL
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 30, 2010, 04:10 UTC · re: Matthieu Moy · lore

[PATCH 06/11] Change incorrect uses of "remote branch" meaning "remote-tracking"

"remote branch" is a branch hosted in a remote repository, while "remote-tracking branch" is a copy of such branch, hosted locally. The distinction is subtle when the copy is up-to-date, but rather fundamental to understand what "git fetch" and "git push" do.

This patch should fix all incorrect usages in Documentation/ directory.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/config.txt       |    7 ++++---
 Documentation/git-branch.txt   |   11 ++++++-----
 Documentation/git-checkout.txt |    2 +-
 Documentation/git-clone.txt    |    2 +-
 Documentation/git-describe.txt |    2 +-
 Documentation/user-manual.txt  |    9 +++++----
 6 files changed, 18 insertions(+), 15 deletions(-)
Show changes to 6 files +18 −14

Documentation/config.txt, Documentation/git-branch.txt, Documentation/git-checkout.txt, Documentation/git-clone.txt, Documentation/git-describe.txt, Documentation/user-manual.txt

diff --git a/Documentation/config.txt b/Documentation/config.txt
index e4f16d8..6a6c0b5 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -601,8 +601,9 @@ branch.autosetupmerge::
 	this behavior can be chosen per-branch using the `--track`
 	and `--no-track` options. The valid settings are: `false` -- no
 	automatic setup is done; `true` -- automatic setup is done when the
-	starting point is a remote branch; `always` -- automatic setup is
-	done when the starting point is either a local branch or remote
+	starting point is a remote-tracking branch; `always` --
+	automatic setup is done when the starting point is either a
+	local branch or remote-tracking
 	branch. This option defaults to true.
 
 branch.autosetuprebase::
@@ -613,7 +614,7 @@ branch.autosetuprebase::
 	When `local`, rebase is set to true for tracked branches of
 	other local branches.
 	When `remote`, rebase is set to true for tracked branches of
-	remote branches.
+	remote-tracking branches.
 	When `always`, rebase will be set to true for all tracking
 	branches.
 	See "branch.autosetupmerge" for details on how to set up a
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 1940256..7f23c56 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -37,9 +37,9 @@ Note that this will create the new branch, but it will not switch the
 working tree to it; use "git checkout <newbranch>" to switch to the
 new branch.
 
-When a local branch is started off a remote branch, git sets up the
+When a local branch is started off a remote-tracking branch, git sets up the
 branch so that 'git pull' will appropriately merge from
-the remote branch. This behavior may be changed via the global
+the remote-tracking branch. This behavior may be changed via the global
 `branch.autosetupmerge` configuration flag. That setting can be
 overridden by using the `--track` and `--no-track` options.
 
@@ -89,7 +89,8 @@ OPTIONS
 	Move/rename a branch even if the new branch name already exists.
 
 --color[=<when>]::
-	Color branches to highlight current, local, and remote branches.
+	Color branches to highlight current, local, and
+	remote-tracking branches.
 	The value must be always (the default), never, or auto.
 
 --no-color::
@@ -125,11 +126,11 @@ OPTIONS
 	it directs `git pull` without arguments to pull from the
 	upstream when the new branch is checked out.
 +
-This behavior is the default when the start point is a remote branch.
+This behavior is the default when the start point is a remote-tracking branch.
 Set the branch.autosetupmerge configuration variable to `false` if you
 want `git checkout` and `git branch` to always behave as if '--no-track'
 were given. Set it to `always` if you want this behavior when the
-start-point is either a local or remote branch.
+start-point is either a local or remote-tracking branch.
 
 --no-track::
 	Do not set up "upstream" configuration, even if the
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 22d3611..880763d 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -98,7 +98,7 @@ entries; instead, unmerged entries are ignored.
 	"--track" in linkgit:git-branch[1] for details.
 +
 If no '-b' option is given, the name of the new branch will be
-derived from the remote branch.  If "remotes/" or "refs/remotes/"
+derived from the remote-tracking branch.  If "remotes/" or "refs/remotes/"
 is prefixed it is stripped away, and then the part up to the
 next slash (which would be the nickname of the remote) is removed.
 This would tell us to use "hack" as the local branch when branching
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index ab72933..2320382 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -131,7 +131,7 @@ objects from the source repository into a pack in the cloned repository.
 	Set up a mirror of the source repository.  This implies `--bare`.
 	Compared to `--bare`, `--mirror` not only maps local branches of the
 	source to local branches of the target, it maps all refs (including
-	remote branches, notes etc.) and sets up a refspec configuration such
+	remote-tracking branches, notes etc.) and sets up a refspec configuration such
 	that all these refs are overwritten by a `git remote update` in the
 	target repository.
 
diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
index 7ef9d51..02e015a 100644
--- a/Documentation/git-describe.txt
+++ b/Documentation/git-describe.txt
@@ -37,7 +37,7 @@ OPTIONS
 --all::
 	Instead of using only the annotated tags, use any ref
 	found in `.git/refs/`.  This option enables matching
-	any known branch, remote branch, or lightweight tag.
+	any known branch, remote-tracking branch, or lightweight tag.
 
 --tags::
 	Instead of using only the annotated tags, use any tag
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index d7835ca..d70f3e0 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1724,7 +1724,8 @@ accomplish the above with just a simple
 $ git pull
 -------------------------------------------------
 
-More generally, a branch that is created from a remote branch will pull
+More generally, a branch that is created from a remote-tracking branch
+will pull
 by default from that branch.  See the descriptions of the
 branch.<name>.remote and branch.<name>.merge options in
 linkgit:git-config[1], and the discussion of the `--track` option in
@@ -2106,7 +2107,7 @@ $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
 $ cd work
 -------------------------------------------------
 
-Linus's tree will be stored in the remote branch named origin/master,
+Linus's tree will be stored in the remote-tracking branch named origin/master,
 and can be updated using linkgit:git-fetch[1]; you can track other
 public trees using linkgit:git-remote[1] to set up a "remote" and
 linkgit:git-fetch[1] to keep them up-to-date; see
@@ -2800,8 +2801,8 @@ Be aware that commits that the old version of example/master pointed at
 may be lost, as we saw in the previous section.
 
 [[remote-branch-configuration]]
-Configuring remote branches
----------------------------
+Configuring remote-tracking branches
+------------------------------------
 
 We saw above that "origin" is just a shortcut to refer to the
 repository that you originally cloned from.  This information is
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 30, 2010, 04:10 UTC · re: Matthieu Moy · lore

[PATCH 07/11] Change incorrect "remote branch" to "remote tracking branch" in C code

(Just like we did for documentation already)

In the process, we change "non-remote branch" to "branch outside the refs/remotes/ hierarchy" to avoid the ugly "non-remote-tracking branch". The new formulation actually corresponds to how the code detects this case (i.e. prefixcmp(refname, "refs/remotes")).

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 branch.h                               |    4 ++--
 builtin/fetch.c                        |    2 +-
 builtin/remote.c                       |    6 +++---
 contrib/examples/builtin-fetch--tool.c |    2 +-
 t/t5505-remote.sh                      |    8 +++++---
 t/t7608-merge-messages.sh              |    2 +-
 6 files changed, 13 insertions(+), 11 deletions(-)
Show changes to 6 files +13 −11

branch.h, builtin/fetch.c, builtin/remote.c, contrib/examples/builtin-fetch--tool.c, t/t5505-remote.sh, t/t7608-merge-messages.sh

diff --git a/branch.h b/branch.h
index eed817a..4026e38 100644
--- a/branch.h
+++ b/branch.h
@@ -22,8 +22,8 @@ void create_branch(const char *head, const char *name, const char *start_name,
 void remove_branch_state(void);
 
 /*
- * Configure local branch "local" to merge remote branch "remote"
- * taken from origin "origin".
+ * Configure local branch "local" as downstream to branch "remote"
+ * from remote "origin".  Used by git branch --set-upstream.
  */
 #define BRANCH_CONFIG_VERBOSE 01
 extern void install_branch_config(int flag, const char *local, const char *origin, const char *remote);
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 3b0b614..4243ef0 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -359,7 +359,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
 			what = rm->name + 10;
 		}
 		else if (!prefixcmp(rm->name, "refs/remotes/")) {
-			kind = "remote branch";
+			kind = "remote-tracking branch";
 			what = rm->name + 13;
 		}
 		else {
diff --git a/builtin/remote.c b/builtin/remote.c
index e9a6e09..6a06282 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -507,7 +507,7 @@ static int add_branch_for_removal(const char *refname,
 			return 0;
 	}
 
-	/* don't delete non-remote refs */
+	/* don't delete non-remote-tracking refs */
 	if (prefixcmp(refname, "refs/remotes")) {
 		/* advise user how to delete local branches */
 		if (!prefixcmp(refname, "refs/heads/"))
@@ -791,9 +791,9 @@ static int rm(int argc, const char **argv)
 
 	if (skipped.nr) {
 		fprintf(stderr, skipped.nr == 1 ?
-			"Note: A non-remote branch was not removed; "
+			"Note: A branch outside the refs/remotes/ hierarchy was not removed;\n"
 			"to delete it, use:\n" :
-			"Note: Non-remote branches were not removed; "
+			"Note: Some branches outside the refs/remotes/ hierarchy were not removed;\n"
 			"to delete them, use:\n");
 		for (i = 0; i < skipped.nr; i++)
 			fprintf(stderr, "  git branch -d %s\n",
diff --git a/contrib/examples/builtin-fetch--tool.c b/contrib/examples/builtin-fetch--tool.c
index cd10dbc..3140e40 100644
--- a/contrib/examples/builtin-fetch--tool.c
+++ b/contrib/examples/builtin-fetch--tool.c
@@ -148,7 +148,7 @@ static int append_fetch_head(FILE *fp,
 		what = remote_name + 10;
 	}
 	else if (!strncmp(remote_name, "refs/remotes/", 13)) {
-		kind = "remote branch";
+		kind = "remote-tracking branch";
 		what = remote_name + 13;
 	}
 	else {
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index 5d1c66e..d189add 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -107,16 +107,18 @@ test_expect_success 'remove remote' '
 )
 '
 
-test_expect_success 'remove remote protects non-remote branches' '
+test_expect_success 'remove remote protects local branches' '
 (
 	cd test &&
 	{ cat >expect1 <<EOF
-Note: A non-remote branch was not removed; to delete it, use:
+Note: A branch outside the refs/remotes/ hierarchy was not removed;
+to delete it, use:
   git branch -d master
 EOF
 	} &&
 	{ cat >expect2 <<EOF
-Note: Non-remote branches were not removed; to delete them, use:
+Note: Some branches outside the refs/remotes/ hierarchy were not removed;
+to delete them, use:
   git branch -d foobranch
   git branch -d master
 EOF
diff --git a/t/t7608-merge-messages.sh b/t/t7608-merge-messages.sh
index 28d5679..1c71296 100755
--- a/t/t7608-merge-messages.sh
+++ b/t/t7608-merge-messages.sh
@@ -47,7 +47,7 @@ test_expect_success 'ambiguous tag' '
 	check_oneline "Merge commit QambiguousQ"
 '
 
-test_expect_success 'remote branch' '
+test_expect_success 'remote-tracking branch' '
 	git checkout -b remote master &&
 	test_commit remote-1 &&
 	git update-ref refs/remotes/origin/master remote &&
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 30, 2010, 04:10 UTC · re: Matthieu Moy · lore

[PATCH 08/11] Use 'remote-tracking branch' in generated merge messages

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 builtin/fmt-merge-msg.c           |    6 +++---
 builtin/merge.c                   |    2 +-
 t/t1507-rev-parse-upstream.sh     |    2 +-
 t/t3409-rebase-preserve-merges.sh |    2 +-
 t/t7608-merge-messages.sh         |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)
Show changes to 5 files +7 −7

builtin/fmt-merge-msg.c, builtin/merge.c, t/t1507-rev-parse-upstream.sh, t/t3409-rebase-preserve-merges.sh, t/t7608-merge-messages.sh

diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index 78c7774..5189b16 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -100,8 +100,8 @@ static int handle_line(char *line)
 		origin = line;
 		string_list_append(&src_data->tag, origin + 4);
 		src_data->head_status |= 2;
-	} else if (!prefixcmp(line, "remote branch ")) {
-		origin = line + 14;
+	} else if (!prefixcmp(line, "remote-tracking branch ")) {
+		origin = line + strlen("remote-tracking branch ");
 		string_list_append(&src_data->r_branch, origin);
 		src_data->head_status |= 2;
 	} else {
@@ -233,7 +233,7 @@ static void do_fmt_merge_msg_title(struct strbuf *out,
 		if (src_data->r_branch.nr) {
 			strbuf_addstr(out, subsep);
 			subsep = ", ";
-			print_joined("remote branch ", "remote branches ",
+			print_joined("remote-tracking branch ", "remote-tracking branches ",
 					&src_data->r_branch, out);
 		}
 		if (src_data->tag.nr) {
diff --git a/builtin/merge.c b/builtin/merge.c
index 10f091b..9ec13f1 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -403,7 +403,7 @@ static void merge_name(const char *remote, struct strbuf *msg)
 			goto cleanup;
 		}
 		if (!prefixcmp(found_ref, "refs/remotes/")) {
-			strbuf_addf(msg, "%s\t\tremote branch '%s' of .\n",
+			strbuf_addf(msg, "%s\t\tremote-tracking branch '%s' of .\n",
 				    sha1_to_hex(branch_head), remote);
 			goto cleanup;
 		}
diff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh
index 8c8dfda..a455551 100755
--- a/t/t1507-rev-parse-upstream.sh
+++ b/t/t1507-rev-parse-upstream.sh
@@ -85,7 +85,7 @@ test_expect_success 'merge my-side@{u} records the correct name' '
 	git branch -t new my-side@{u} &&
 	git merge -s ours new@{u} &&
 	git show -s --pretty=format:%s >actual &&
-	echo "Merge remote branch ${sq}origin/side${sq}" >expect &&
+	echo "Merge remote-tracking branch ${sq}origin/side${sq}" >expect &&
 	test_cmp expect actual
 )
 '
diff --git a/t/t3409-rebase-preserve-merges.sh b/t/t3409-rebase-preserve-merges.sh
index 74161a4..19341e5 100755
--- a/t/t3409-rebase-preserve-merges.sh
+++ b/t/t3409-rebase-preserve-merges.sh
@@ -72,7 +72,7 @@ test_expect_success 'rebase -p fakes interactive rebase' '
 	git fetch &&
 	git rebase -p origin/topic &&
 	test 1 = $(git rev-list --all --pretty=oneline | grep "Modify A" | wc -l) &&
-	test 1 = $(git rev-list --all --pretty=oneline | grep "Merge remote branch " | wc -l)
+	test 1 = $(git rev-list --all --pretty=oneline | grep "Merge remote-tracking branch " | wc -l)
 	)
 '
 
diff --git a/t/t7608-merge-messages.sh b/t/t7608-merge-messages.sh
index 1c71296..9225fa6 100755
--- a/t/t7608-merge-messages.sh
+++ b/t/t7608-merge-messages.sh
@@ -54,7 +54,7 @@ test_expect_success 'remote-tracking branch' '
 	git checkout master &&
 	test_commit master-5 &&
 	git merge origin/master &&
-	check_oneline "Merge remote branch Qorigin/masterQ"
+	check_oneline "Merge remote-tracking branch Qorigin/masterQ"
 '
 
 test_done
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 30, 2010, 04:10 UTC · re: Matthieu Moy · lore

[PATCH 09/11] user-manual.txt: explain better the remote(-tracking) branch terms

Now that the documentation is mostly consistant in the use of "remote branch" Vs "remote-tracking branch", let's make this distinction explicit early in the user-manual.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/user-manual.txt |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)
Show changes to Documentation/user-manual.txt +17 −3
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index d70f3e0..62b3788 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -344,7 +344,8 @@ Examining branches from a remote repository
 The "master" branch that was created at the time you cloned is a copy
 of the HEAD in the repository that you cloned from.  That repository
 may also have had other branches, though, and your local repository
-keeps branches which track each of those remote branches, which you
+keeps branches which track each of those remote branches, called
+remote-tracking branches, which you
 can view using the "-r" option to linkgit:git-branch[1]:
 
 ------------------------------------------------
@@ -359,6 +360,14 @@ $ git branch -r
   origin/todo
 ------------------------------------------------
 
+In this case, "origin" is called a remote repository, or "remote" for
+short. The branches of this repository are called "remote branches"
+from our point of view. The remote-tracking branches are created in
+the local repository at clone time, as a copy of the remote branches.
+They are references that will be updated by "git fetch" (hence by "git
+pull"), and by "git push". See
+<<Updating-a-repository-With-git-fetch>> for details.
+
 You cannot check out these remote-tracking branches, but you can
 examine them on a branch of your own, just as you would a tag:
 
@@ -1716,14 +1725,19 @@ one step:
 $ git pull origin master
 -------------------------------------------------
 
-In fact, if you have "master" checked out, then by default "git pull"
-merges from the HEAD branch of the origin repository.  So often you can
+In fact, if you have "master" checked out, then this branch has been
+configured by "git clone" to get changes from the HEAD branch of the
+origin repository.  So often you can
 accomplish the above with just a simple
 
 -------------------------------------------------
 $ git pull
 -------------------------------------------------
 
+This command will fetch the changes from the remote branches to your
+remote-tracking branches `origin/*`, and merge default branch in the
+current branch.
+
 More generally, a branch that is created from a remote-tracking branch
 will pull
 by default from that branch.  See the descriptions of the
-- 
1.7.3.2.183.g2e7b0
Jonathan Nieder· Oct 30, 2010, 07:18 UTC · re: Matthieu Moy · lore

Re: [PATCH 09/11] user-manual.txt: explain better the remote(-tracking) branch terms

Matthieu Moy wrote:
Show 7 quoted lines
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -359,6 +360,14 @@ $ git branch -r
>    origin/todo
>  ------------------------------------------------
>  
> +In this case, "origin" is called a remote repository, or "remote" for
[...]
Did you send the wrong patch?  This looks the same as last time.

(comparing to <http://thread.gmane.org/gmane.comp.version-control.git/159798/focus=160252>)

Matthieu Moy· Oct 31, 2010, 14:57 UTC · re: Jonathan Nieder · lore

Re: [PATCH 09/11] user-manual.txt: explain better the remote(-tracking) branch terms

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 12 quoted lines
> Matthieu Moy wrote:
>
>> --- a/Documentation/user-manual.txt
>> +++ b/Documentation/user-manual.txt
>> @@ -359,6 +360,14 @@ $ git branch -r
>>    origin/todo
>>  ------------------------------------------------
>>  
>> +In this case, "origin" is called a remote repository, or "remote" for
> [...]
>
> Did you send the wrong patch?  This looks the same as last time.

Nice catch. I had squashed my changes into the wrong patch (if you look closely, it ended up in patch 10/11).

Also, after looking more closely, you're right about squashing the changes in fetch and fmt-merge-msg, I do introduce a (transcient, untested) bug.

I've fixed all that locally. I'll resend the serie tomorrow or the day after (better wait for comments, I've already bothered the list too much with resends of the serie, and I'll be offline travelling).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Matthieu Moy· Oct 30, 2010, 04:10 UTC · re: Matthieu Moy · lore

[PATCH 10/11] user-manual: remote-tracking can be checked out, with detached HEAD

From: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/user-manual.txt |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)
Show changes to Documentation/user-manual.txt +14 −12
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 62b3788..3108b38 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -360,21 +360,23 @@ $ git branch -r
   origin/todo
 ------------------------------------------------
 
-In this case, "origin" is called a remote repository, or "remote" for
-short. The branches of this repository are called "remote branches"
-from our point of view. The remote-tracking branches are created in
-the local repository at clone time, as a copy of the remote branches.
-They are references that will be updated by "git fetch" (hence by "git
-pull"), and by "git push". See
-<<Updating-a-repository-With-git-fetch>> for details.
+In this example, "origin" is called a remote repository, or "remote"
+for short. The branches of this repository are called "remote
+branches" from our point of view. The remote-tracking branches listed
+above were created based on the remote branches at clone time and will
+be updated by "git fetch" (hence "git pull) and "git push". See
+<<Updating -a-repository-With-git-fetch>> for details.
 
-You cannot check out these remote-tracking branches, but you can
-examine them on a branch of your own, just as you would a tag:
+You might want to build on one of these remote-tracking branches
+on a branch of your own, just as you would for a tag:
 
 ------------------------------------------------
 $ git checkout -b my-todo-copy origin/todo
 ------------------------------------------------
 
+You can also check out "origin/todo" directly to examine it or
+write a one-off patch.  See <<detached-head,detached head>>.
+
 Note that the name "origin" is just the name that git uses by default
 to refer to the repository that you cloned from.
 
@@ -1734,9 +1736,9 @@ accomplish the above with just a simple
 $ git pull
 -------------------------------------------------
 
-This command will fetch the changes from the remote branches to your
-remote-tracking branches `origin/*`, and merge default branch in the
-current branch.
+This command will fetch changes from the remote branches to your
+remote-tracking branches `origin/*`, and merge the default branch into
+the current branch.
 
 More generally, a branch that is created from a remote-tracking branch
 will pull
-- 
1.7.3.2.183.g2e7b0
Matthieu Moy· Oct 30, 2010, 04:10 UTC · re: Matthieu Moy · lore

[PATCH 11/11] git-branch.txt: mention --set-upstream as a way to change upstream configuration

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/git-branch.txt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Show changes to Documentation/git-branch.txt +2 −1
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 7f23c56..9106d38 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -41,7 +41,8 @@ When a local branch is started off a remote-tracking branch, git sets up the
 branch so that 'git pull' will appropriately merge from
 the remote-tracking branch. This behavior may be changed via the global
 `branch.autosetupmerge` configuration flag. That setting can be
-overridden by using the `--track` and `--no-track` options.
+overridden by using the `--track` and `--no-track` options, and
+changed later using `git branch --set-upstream`.
 
 With a '-m' or '-M' option, <oldbranch> will be renamed to <newbranch>.
 If <oldbranch> had a corresponding reflog, it is renamed to match
-- 
1.7.3.2.183.g2e7b0

← back to recent threads