Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@datawire.io>2021-04-28 00:17:28 +0300
committerJunio C Hamano <gitster@pobox.com>2021-04-28 10:47:17 +0300
commitb2699769792cfd56f77dfd6819d6654628176634 (patch)
tree47f95867bbcad1c29a489646989e86000011fc5c /contrib/subtree
parentdb6952b2b28627d43da5e0fdaefcea6c040ab581 (diff)
subtree: t7900: add a test for the -h flag
It's a dumb test, but it's surprisingly easy to break. Signed-off-by: Luke Shumaker <lukeshu@datawire.io> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/subtree')
-rwxr-xr-xcontrib/subtree/t/t7900-subtree.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh
index 5c2510f1f5..9afba2f282 100755
--- a/contrib/subtree/t/t7900-subtree.sh
+++ b/contrib/subtree/t/t7900-subtree.sh
@@ -37,6 +37,13 @@ last_commit_subject () {
git log --pretty=format:%s -1
}
+test_expect_success 'shows short help text for -h' '
+ test_expect_code 129 git subtree -h >out 2>err &&
+ test_must_be_empty err &&
+ grep -e "^ *or: git subtree pull" out &&
+ grep -e --annotate out
+'
+
#
# Tests for 'git subtree add'
#