author | Matthieu Moy <Matthieu.Moy@imag.fr> | |
Wed, 2 Mar 2011 20:12:10 +0000 (21:12 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 2 Mar 2011 23:34:23 +0000 (15:34 -0800) | ||
commit | ec8460bd91007f0bd7851cd07494d1019a39937f | |
tree | 94314b0a24baccec8da26cc39a0f5a75b5a85600 | tree | snapshot |
parent | 8978166e531e0941811099d4117574ebbbcf35d8 | commit | diff |
push: better error messages when push.default = tracking
A common scenario is to create a new branch and push it (checkout -b &&
push [--set-upstream]). In this case, the user was getting "The current
branch %s has no upstream branch.", which doesn't help much.
Provide the user a command to push the current branch. To avoid the
situation in the future, suggest --set-upstream.
While we're there, also improve the error message in the "detached HEAD"
case. We mention explicitly "detached HEAD" since this is the keyword to
look for in documentations.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
A common scenario is to create a new branch and push it (checkout -b &&
push [--set-upstream]). In this case, the user was getting "The current
branch %s has no upstream branch.", which doesn't help much.
Provide the user a command to push the current branch. To avoid the
situation in the future, suggest --set-upstream.
While we're there, also improve the error message in the "detached HEAD"
case. We mention explicitly "detached HEAD" since this is the keyword to
look for in documentations.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/push.c | diff | blob | history |