summaryrefslogtreecommitdiffstats
path: root/t/t0030-stripspace.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-07-23 13:58:27 +0200
committerJunio C Hamano <gitster@pobox.com>2007-07-27 07:51:44 +0200
commitf653aee5a37b909e772d612eb7e226f09fd2f3d3 (patch)
tree0f4c571b9599721150db43ffcb87b085b83c2c30 /t/t0030-stripspace.sh
parentMake verify-tag a builtin. (diff)
downloadgit-f653aee5a37b909e772d612eb7e226f09fd2f3d3.tar.xz
git-f653aee5a37b909e772d612eb7e226f09fd2f3d3.zip
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 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