summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-10-24 05:29:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-10-24 05:29:19 (GMT)
commit70ed433c2b66d192b84d4a1ef7fb193ea35e0a28 (patch)
treea1dfa980c1a8ba2269789a439c84468666f0db8e
parent024ab976fffdc1d78b6d0b15e261b52f3a5d594b (diff)
parentb145b211baa4129a827cc1b1b1a7984523b8f903 (diff)
downloadgit-70ed433c2b66d192b84d4a1ef7fb193ea35e0a28.zip
git-70ed433c2b66d192b84d4a1ef7fb193ea35e0a28.tar.gz
git-70ed433c2b66d192b84d4a1ef7fb193ea35e0a28.tar.bz2
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
-rwxr-xr-xgit-add--interactive.perl2
-rwxr-xr-xt/t3701-add-interactive.sh14
2 files changed, 15 insertions, 1 deletions
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 392efb9..69aeaf0 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -259,7 +259,7 @@ sub list_modified {
@tracked = map {
chomp $_;
unquote_path($_);
- } run_cmd_pipe(qw(git ls-files --exclude-standard --), @ARGV);
+ } run_cmd_pipe(qw(git ls-files --), @ARGV);
return if (!@tracked);
}
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index 62fd65e..687bd7a 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -138,6 +138,20 @@ test_expect_success 'real edit works' '
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
then
say 'skipping filemode tests (filesystem does not properly support modes)'