mirror of
https://github.com/git/git
synced 2024-09-12 21:04:12 +00:00
Merge branch 'pv/maint-add-p-no-exclude' into maint
* pv/maint-add-p-no-exclude: git-add--interactive: never skip files included in index
This commit is contained in:
commit
70ed433c2b
|
@ -259,7 +259,7 @@ sub list_modified {
|
||||||
@tracked = map {
|
@tracked = map {
|
||||||
chomp $_;
|
chomp $_;
|
||||||
unquote_path($_);
|
unquote_path($_);
|
||||||
} run_cmd_pipe(qw(git ls-files --exclude-standard --), @ARGV);
|
} run_cmd_pipe(qw(git ls-files --), @ARGV);
|
||||||
return if (!@tracked);
|
return if (!@tracked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,20 @@ test_expect_success 'real edit works' '
|
||||||
test_cmp expected output
|
test_cmp expected output
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'skip files similarly as commit -a' '
|
||||||
|
git reset &&
|
||||||
|
echo file >.gitignore &&
|
||||||
|
echo changed >file &&
|
||||||
|
echo y | git add -p file &&
|
||||||
|
git diff >output &&
|
||||||
|
git reset &&
|
||||||
|
git commit -am commit &&
|
||||||
|
git diff >expected &&
|
||||||
|
test_cmp expected output &&
|
||||||
|
git reset --hard HEAD^
|
||||||
|
'
|
||||||
|
rm -f .gitignore
|
||||||
|
|
||||||
if test "$(git config --bool core.filemode)" = false
|
if test "$(git config --bool core.filemode)" = false
|
||||||
then
|
then
|
||||||
say 'skipping filemode tests (filesystem does not properly support modes)'
|
say 'skipping filemode tests (filesystem does not properly support modes)'
|
||||||
|
|
Loading…
Reference in a new issue