diff options
author | Matthieu Moy <Matthieu.Moy@imag.fr> | 2012-06-18 20:18:20 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-06-18 15:13:16 -0700 |
commit | d7236c4395a0c8742871a72d920f789b5bd4abf6 (patch) | |
tree | 19a28a50e4e05a607409603b4cab19b3e40e8e9a /t/t3412-rebase-root.sh | |
parent | Git 1.7.9 (diff) | |
download | tgif-d7236c4395a0c8742871a72d920f789b5bd4abf6.tar.xz |
sha1_name: do not trigger detailed diagnosis for file arguments
diagnose_invalid_sha1_path() is meant to be called to diagnose a
misspelt <treeish>:<pathname> when <pathname> does not exist in
<treeish>. However, the code may call it if <treeish>:<pathname> is
invalid (which triggers another call with only_to_die == 1), but for
another reason. This happens when calling e.g.
git log existing-file HEAD:existing-file
because existing-file is a path and not a revision, the code
verifies that the arguments that follow to be paths. This leads to
an incorrect message like "existing-file does not exist in HEAD",
even though the path exists in HEAD.
Check that the search for <pathname> in <treeish> fails before
triggering the diagnosis.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3412-rebase-root.sh')
0 files changed, 0 insertions, 0 deletions