summaryrefslogtreecommitdiff
path: root/builtin/push.c
diff options
context:
space:
mode:
authorJohan Herland <johan@herland.net>2011-02-16 01:54:24 +0100
committerJunio C Hamano <gitster@pobox.com>2011-02-16 10:21:52 -0800
commit53c403116a947c538132fc721f83196036f7a299 (patch)
treee2c89a7ebdc7f121676c49475f78da442bc0dc1b /builtin/push.c
parent7ed863a85a6ce2c4ac4476848310b8f917ab41f9 (diff)
downloadgit-53c403116a947c538132fc721f83196036f7a299.tar.gz
push.default: Rename 'tracking' to 'upstream'
Users are sometimes confused with two different types of "tracking" behavior in Git: "remote-tracking" branches (e.g. refs/remotes/*/*) versus the merge/rebase relationship between a local branch and its @{upstream} (controlled by branch.foo.remote and branch.foo.merge config settings). When the push.default is set to 'tracking', it specifies that a branch should be pushed to its @{upstream} branch. In other words, setting push.default to 'tracking' applies only to the latter of the above two types of "tracking" behavior. In order to make this more understandable to the user, we rename the push.default == 'tracking' option to push.default == 'upstream'. push.default == 'tracking' is left as a deprecated synonym for 'upstream'. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/push.c')
-rw-r--r--builtin/push.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/builtin/push.c b/builtin/push.c
index e655eb7695..31da418cf4 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -64,17 +64,17 @@ static void set_refspecs(const char **refs, int nr)
}
}
-static void setup_push_tracking(void)
+static void setup_push_upstream(void)
{
struct strbuf refspec = STRBUF_INIT;
struct branch *branch = branch_get(NULL);
if (!branch)
die("You are not currently on a branch.");
if (!branch->merge_nr || !branch->merge)
- die("The current branch %s is not tracking anything.",
+ die("The current branch %s has no upstream branch.",
branch->name);
if (branch->merge_nr != 1)
- die("The current branch %s is tracking multiple branches, "
+ die("The current branch %s has multiple upstream branches, "
"refusing to push.", branch->name);
strbuf_addf(&refspec, "%s:%s", branch->name, branch->merge[0]->src);
add_refspec(refspec.buf);
@@ -88,8 +88,8 @@ static void setup_default_push_refspecs(void)
add_refspec(":");
break;
- case PUSH_DEFAULT_TRACKING:
- setup_push_tracking();
+ case PUSH_DEFAULT_UPSTREAM:
+ setup_push_upstream();
break;
case PUSH_DEFAULT_CURRENT: