diff options
author | Matthieu Moy <Matthieu.Moy@imag.fr> | 2010-11-02 16:31:25 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-11-03 09:20:47 -0700 |
commit | 13931236b9ee2895a98ffdbdacbd0f895956d8a8 (patch) | |
tree | 88613be74b32ddbc8c42f4b0eec10d616ff846e2 /builtin | |
parent | 29b9a66f285f602ad67362ccbe2c6bfaac769f54 (diff) | |
download | git-13931236b9ee2895a98ffdbdacbd0f895956d8a8.tar.gz git-13931236b9ee2895a98ffdbdacbd0f895956d8a8.tar.xz |
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 <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/fetch.c | 2 | ||||
-rw-r--r-- | builtin/fmt-merge-msg.c | 6 | ||||
-rw-r--r-- | builtin/merge.c | 2 | ||||
-rw-r--r-- | builtin/remote.c | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index 3b0b61437..4243ef022 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 78c77742b..5189b16c9 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 10f091b51..9ec13f14b 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 e9a6e0925..6a0628219 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", |