diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-10-28 12:25:30 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-10-28 23:30:30 -0700 |
commit | eef2bdaa4a979994a22dbc5c2e7c5b8a9d2a2043 (patch) | |
tree | ad1046accea45420eb173cc2d80c954bc5b918e2 /builtin/update-index.c | |
parent | Git 2.8.4 (diff) | |
download | tgif-eef2bdaa4a979994a22dbc5c2e7c5b8a9d2a2043.tar.xz |
push: do not use potentially ambiguous default refspec
When the user does the lazy "git push" with no parameters with
push.default set to either "upstream", "simple" or "current",
we internally generated a refspec that has the current branch name
on the source side and used it to push.
However, the branch name (say "test") may be an ambiguous refname in
the context of the source repository---there may be a tag with the
same name, for example. This would trigger an unnecessary error
without any fault on the end-user's side.
Be explicit and give a full refname as the source side to avoid the
ambiguity. The destination side when pushing with the "current"
sent only the name of the branch and forcing the receiving end to
guess, which is the same issue. Be explicit there as well.
Reported-by: Kannan Goundan <kannan@cakoose.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/update-index.c')
0 files changed, 0 insertions, 0 deletions