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:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-07-23 15:58:27 +0400
committerJunio C Hamano <gitster@pobox.com>2007-07-27 09:51:44 +0400
commitf653aee5a37b909e772d612eb7e226f09fd2f3d3 (patch)
tree0f4c571b9599721150db43ffcb87b085b83c2c30 /t/t0030-stripspace.sh
parent2ae68fcb785a617793813abcea19893e13e436b0 (diff)
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