summaryrefslogtreecommitdiff
path: root/t/t0030-stripspace.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-07-23 11:58:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-07-27 05:51:44 (GMT)
commitf653aee5a37b909e772d612eb7e226f09fd2f3d3 (patch)
tree0f4c571b9599721150db43ffcb87b085b83c2c30 /t/t0030-stripspace.sh
parent2ae68fcb785a617793813abcea19893e13e436b0 (diff)
downloadgit-f653aee5a37b909e772d612eb7e226f09fd2f3d3.zip
git-f653aee5a37b909e772d612eb7e226f09fd2f3d3.tar.gz
git-f653aee5a37b909e772d612eb7e226f09fd2f3d3.tar.bz2
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/t0030-stripspace.sh')
-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 b1c9003..cad95f3 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