Merge branch 'tr/maint-1.6.3-add-p-modeonly-fix' into maint-1.6.3
* tr/maint-1.6.3-add-p-modeonly-fix: add -p: do not attempt to coalesce mode changes git add -p: demonstrate failure when staging both mode and hunk
This commit is contained in:
@ -163,6 +163,17 @@ test_expect_success FILEMODE 'stage mode but not hunk' '
|
||||
git diff file | grep "+content"
|
||||
'
|
||||
|
||||
|
||||
test_expect_success FILEMODE 'stage mode and hunk' '
|
||||
git reset --hard &&
|
||||
echo content >>file &&
|
||||
chmod +x file &&
|
||||
printf "y\\ny\\n" | git add -p &&
|
||||
git diff --cached file | grep "new mode" &&
|
||||
git diff --cached file | grep "+content" &&
|
||||
test -z "$(git diff file)"
|
||||
'
|
||||
|
||||
# end of tests disabled when filemode is not usable
|
||||
|
||||
test_expect_success 'setup again' '
|
||||
|
Reference in New Issue
Block a user