From 0e615b252f35006ea824fae1a95dc6af55326b9a Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Tue, 2 Nov 2010 16:31:20 +0100 Subject: 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 Signed-off-by: Junio C Hamano --- builtin/checkout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin') diff --git a/builtin/checkout.c b/builtin/checkout.c index 9240fafb2a..9a934af74b 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 is _not_ a commit, no -t nor -b * was given, and there is a tracking branch whose name is * in one and only one remote, then this is a short-hand - * to fork local from that remote tracking branch. + * to fork local from that remote-tracking branch. * * Otherwise shall not be ambiguous. * - If it's *only* a reference, treat it like case (1). -- cgit v1.2.3 From 8b3f3f84b27e6bbac1b1558166b44431a8e78bb1 Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Tue, 2 Nov 2010 16:31:23 +0100 Subject: 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 Signed-off-by: Junio C Hamano --- builtin/checkout.c | 2 +- builtin/fetch.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'builtin') diff --git a/builtin/checkout.c b/builtin/checkout.c index 9a934af74b..1fa9ce43f5 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 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 * in one and only one remote, then this is a short-hand * to fork local from that remote-tracking branch. * diff --git a/builtin/fetch.c b/builtin/fetch.c index d35f000c03..3b0b614375 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 -- cgit v1.2.3 From 13931236b9ee2895a98ffdbdacbd0f895956d8a8 Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Tue, 2 Nov 2010 16:31:25 +0100 Subject: 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")). Also, we use 'remote-tracking branch' in generated merge messages (by merge an fmt-merge-msg). Signed-off-by: Matthieu Moy Signed-off-by: Junio C Hamano --- builtin/fetch.c | 2 +- builtin/fmt-merge-msg.c | 6 +++--- builtin/merge.c | 2 +- builtin/remote.c | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'builtin') diff --git a/builtin/fetch.c b/builtin/fetch.c index 3b0b614375..4243ef0223 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/fmt-merge-msg.c b/builtin/fmt-merge-msg.c index 78c77742b6..5189b16c9e 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 10f091b519..9ec13f14bd 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/builtin/remote.c b/builtin/remote.c index e9a6e09257..6a06282196 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", -- cgit v1.2.3