diff options
author | Elijah Newren <newren@gmail.com> | 2018-08-08 18:31:03 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-08 19:52:55 +0200 |
commit | 0df90bdd12f57b03ac3ff7d16926c56a8f3d4682 (patch) | |
tree | e57a2bd9fc9c4f5bed1b655cdfb82a032332952b /t/t7406-submodule-update.sh | |
parent | Fifth batch for 2.19 cycle (diff) | |
download | git-0df90bdd12f57b03ac3ff7d16926c56a8f3d4682.tar.xz git-0df90bdd12f57b03ac3ff7d16926c56a8f3d4682.zip |
t7406: fix call that was failing for the wrong reason
A test making use of test_must_fail was failing like this:
fatal: ambiguous argument '|': unknown revision or path not in the working tree.
when the intent was to verify that a specific string was not found
in the output of the git diff command, i.e. that grep returned
non-zero. Fix the test to do that.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7406-submodule-update.sh')
-rwxr-xr-x | t/t7406-submodule-update.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh index f604ef7a72..ccdc2f9039 100755 --- a/t/t7406-submodule-update.sh +++ b/t/t7406-submodule-update.sh @@ -599,7 +599,8 @@ test_expect_success 'submodule update - update=none in .git/config but --checkou ) && git diff --raw | grep " submodule" && git submodule update --checkout && - test_must_fail git diff --raw \| grep " submodule" && + git diff --raw >out && + ! grep " submodule" out && (cd submodule && test_must_fail compare_head ) && |