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>
This commit is contained in:

committed by
Junio C Hamano

parent
2ae68fcb78
commit
f653aee5a3
@ -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
|
||||
|
Reference in New Issue
Block a user