summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-10-24 17:42:20 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-10-24 10:47:51 -0700
commitb42b45191950a4ac39f6f5ae042c15ad114da79b (patch)
treed79debd6827d00ec3f5d4b9595bc2680c0d490b8 /t
parentdiff-lib: allow ita entries treated as "not yet exist in index" (diff)
downloadtgif-b42b45191950a4ac39f6f5ae042c15ad114da79b.tar.xz
diff: add --ita-[in]visible-in-index
The option --ita-invisible-in-index exposes the "ita_invisible_in_index" diff flag to outside to allow easier experimentation with this new mode. The "plan" is to make --ita-invisible-in-index default to keep consistent behavior with 'status' and 'commit', but a bunch other commands like 'apply', 'merge', 'reset'.... need to be taken into consideration as well. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t2203-add-intent.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/t2203-add-intent.sh b/t/t2203-add-intent.sh
index 2276e4e6b6..0e54f63cf7 100755
--- a/t/t2203-add-intent.sh
+++ b/t/t2203-add-intent.sh
@@ -57,7 +57,9 @@ test_expect_success 'i-t-a entry is simply ignored' '
git add -N nitfol &&
git commit -m second &&
test $(git ls-tree HEAD -- nitfol | wc -l) = 0 &&
- test $(git diff --name-only HEAD -- nitfol | wc -l) = 1
+ test $(git diff --name-only HEAD -- nitfol | wc -l) = 1 &&
+ test $(git diff --name-only --ita-invisible-in-index HEAD -- nitfol | wc -l) = 0 &&
+ test $(git diff --name-only --ita-invisible-in-index -- nitfol | wc -l) = 1
'
test_expect_success 'can commit with an unrelated i-t-a entry in index' '