Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2018-11-13 23:39:09 +0300
committerJunio C Hamano <gitster@pobox.com>2018-11-14 11:17:09 +0300
commit8247166717fc5a3f26e4db1067891da12644808b (patch)
tree4e2731adb6ba41e56999d3cfe69b459cfcab114a /builtin/push.c
parentd166e6afe5f257217836ef24a73764eba390c58d (diff)
push: change needlessly ambiguous example in error
Change an example push added in b55e677522 ("push: introduce new push.default mode "simple"", 2012-04-24) to always mean the same thing whether the current setting happens to be "simple" or not. This error is only emitted under "simple", but message is explaining to the user that they can get two sorts of different behaviors by these two invocations. Let's use "git push <remote> HEAD" which always means push the current branch name to that remote, instead of "git push <remote> <current-branch-name>" which will do that under "simple", but is not guaranteed to do under "upstream". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/push.c')
-rw-r--r--builtin/push.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/push.c b/builtin/push.c
index d09a42062c..8bb8a0849b 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -173,10 +173,10 @@ static NORETURN int die_push_simple(struct branch *branch, struct remote *remote
"\n"
"To push to the branch of the same name on the remote, use\n"
"\n"
- " git push %s %s\n"
+ " git push %s HEAD\n"
"%s"),
remote->name, short_upstream,
- remote->name, branch->name, advice_maybe);
+ remote->name, advice_maybe);
}
static const char message_detached_head_die[] =