summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-08-02 22:26:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-02 22:45:21 (GMT)
commit0159ba3226f75fbd6d3dc0e92c325cb11f2f0699 (patch)
tree0aade2ac8ee74994b1c4b3087d0eadda5fc9f7cd /t
parent7ba826290aa448bb9d0d45c3bb4b34905b741013 (diff)
downloadgit-0159ba3226f75fbd6d3dc0e92c325cb11f2f0699.zip
git-0159ba3226f75fbd6d3dc0e92c325cb11f2f0699.tar.gz
git-0159ba3226f75fbd6d3dc0e92c325cb11f2f0699.tar.bz2
rev-list: don't show usage when we see empty ref patterns
If the user gives us no starting point for a traversal, we want to complain with our normal usage message. But if they tried to do so with "--all" or "--glob", but that happened not to match any refs, the usage message isn't helpful. We should just give them the empty output they asked for instead. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t6018-rev-list-glob.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t6018-rev-list-glob.sh b/t/t6018-rev-list-glob.sh
index f8367b8..d3453c5 100755
--- a/t/t6018-rev-list-glob.sh
+++ b/t/t6018-rev-list-glob.sh
@@ -261,13 +261,13 @@ test_expect_failure 'rev-list should succeed with empty output on empty stdin' '
test_cmp expect actual
'
-test_expect_failure 'rev-list should succeed with empty output with all refs excluded' '
+test_expect_success 'rev-list should succeed with empty output with all refs excluded' '
>expect &&
git rev-list --exclude=* --all >actual &&
test_cmp expect actual
'
-test_expect_failure 'rev-list should succeed with empty output with empty --all' '
+test_expect_success 'rev-list should succeed with empty output with empty --all' '
(
test_create_repo empty &&
cd empty &&
@@ -277,7 +277,7 @@ test_expect_failure 'rev-list should succeed with empty output with empty --all'
)
'
-test_expect_failure 'rev-list should succeed with empty output with empty glob' '
+test_expect_success 'rev-list should succeed with empty output with empty glob' '
>expect &&
git rev-list --glob=does-not-match-anything >actual &&
test_cmp expect actual