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:

committed by
Junio C Hamano

parent
621f1b4bcf
commit
f3670a5749
@ -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
|
||||
|
Reference in New Issue
Block a user