Let ls-files strip trailing slashes in submodules' paths

Tab completion makes it easy to add a trailing slash to a submodule path.
As it is completely clear what the user actually wanted to say, be nice
and strip that slash at the end.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Schindelin
2009-02-07 14:43:03 +01:00
committed by Junio C Hamano
parent 621f1b4bcf
commit f3670a5749
2 changed files with 26 additions and 1 deletions

View File

@ -234,4 +234,10 @@ test_expect_success 'gracefully add submodule with a trailing slash' '
'
test_expect_success 'ls-files gracefully handles trailing slash' '
test "init" = "$(git ls-files init/)"
'
test_done