Thread (72 messages) flat view 72 messages, 6 authors, 2016-06-15

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

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:51

Matthieu Moy wrote:
quoted hunk ↗ jump to hunk
--- 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.
quoted hunk ↗ jump to hunk
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.
quoted hunk ↗ jump to hunk
--- 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:
quoted hunk ↗ jump to hunk
--- 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help