diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2018-11-13 19:52:44 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-14 15:27:55 +0900 |
commit | bf70636fd7b9014e7320260b0221c84061447917 (patch) | |
tree | dd4f57ea366bd18e877b9dcbc2d775d5fdfd7f38 /line-log.h | |
parent | push: add an advice on unqualified <dst> push (diff) | |
download | tgif-bf70636fd7b9014e7320260b0221c84061447917.tar.xz |
push: test that <src> doesn't DWYM if <dst> is unqualified
Add a test asserting that "git push origin <src>:<dst>" where <src> is
a branch, tag, tree or blob in refs/remotes/* doesn't DWYM when <dst>
is unqualified. This has never been the case, but there haven't been
any tests for this behavior.
See f88395ac23 ("Renaming push.", 2005-08-03), bb9fca80ce ("git-push:
Update description of refspecs and add examples", 2007-06-09) and
f8aae12034 ("push: allow unqualified dest refspecs to DWIM",
2008-04-23) which are most relevant commits that have changed or
documented the behavior of the DWYM feature in the past.
These tests were originally meant to lead up to a patch that made
refs/remotes/* on the LHS imply refs/heads/* on the RHS, see [1]. That
patch proved controversial and may not ever land in git.git, but we
should have the tests that remind us what the current behavior is in
case it's ever changed.
1. https://public-inbox.org/git/20181026230741.23321-8-avarab@gmail.com/
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'line-log.h')
0 files changed, 0 insertions, 0 deletions