summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <Johannes.Schindelin@gmx.de>2007-07-23 12:58:27 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-07-26 22:51:44 -0700
commitf653aee5a37b909e772d612eb7e226f09fd2f3d3 (patch)
tree0f4c571b9599721150db43ffcb87b085b83c2c30 /t
parentMake verify-tag a builtin. (diff)
downloadtgif-f653aee5a37b909e772d612eb7e226f09fd2f3d3.tar.xz
Teach "git stripspace" the --strip-comments option
With --strip-comments (or short -s), git stripspace now removes lines beginning with a '#', too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t0030-stripspace.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t0030-stripspace.sh b/t/t0030-stripspace.sh
index b1c900379b..cad95f35ad 100755
--- a/t/t0030-stripspace.sh
+++ b/t/t0030-stripspace.sh
@@ -392,4 +392,9 @@ test_expect_success \
git diff expect actual
'
+test_expect_success 'strip comments, too' '
+ test ! -z "$(echo "# comment" | git stripspace)" &&
+ test -z "$(echo "# comment" | git stripspace -s)"
+'
+
test_done