AndyAO:
从下面的测试可以看到,即使已经提前设置了git config status.renames true
,输出信息中仍然没有包含 ORIG_PATH
相关信息,根据文档,信息格式应该是XY ORIG_PATH -> PATH
才对。
Describe rename {
BeforeAll {
function check {
'abc'>'README.md'
git add 'README.md'
git commit -m 'README'
Rename-Item -Path 'README.md' -NewName 'new.md'
git status new.md -s | Should -Be '?? new.md'
git add .
git status new.md -s | Should -Be 'A new.md'
}
}
BeforeEach {
ClearGitRepo
InitGitRepo
}
it 'default' {
check
}
it 'change configuration file' {
git config status.renames true
git config diff.renames true
check
}
}
- 本文固定链接: https://niul.net/244.html
- 转载请注明: 分享菌 于 牛叻网(NiuL.Net) 发表