зеркало из https://github.com/microsoft/git.git
reset --stdin: trim carriage return from the paths
While using the reset --stdin feature on windows path added may have a \r at the end of the path that wasn't getting removed so didn't match the path in the index and wasn't reset. Signed-off-by: Kevin Willford <kewillf@microsoft.com>
This commit is contained in:
Родитель
1d90ca2906
Коммит
25eadf2389
|
@ -29,4 +29,13 @@ test_expect_success '--stdin requires --mixed' '
|
|||
git reset --mixed --stdin <list
|
||||
'
|
||||
|
||||
|
||||
test_expect_success '--stdin trims carriage returns' '
|
||||
test_commit endline &&
|
||||
git rm endline.t &&
|
||||
printf "endline.t\r\n" >list &&
|
||||
git reset --stdin <list &&
|
||||
test endline.t = "$(git ls-files endline.t)"
|
||||
'
|
||||
|
||||
test_done
|
||||
|
|
Загрузка…
Ссылка в новой задаче