* [PATCH v3] t7012: Implement test for git-checkout
@ 2016-03-26 16:37 Chhatoi Pritam Baral
2016-03-30 13:29 ` Chhatoi Pritam Baral
0 siblings, 1 reply; 3+ messages in thread
From: Chhatoi Pritam Baral @ 2016-03-26 16:37 UTC (permalink / raw
To: git
Previously a TODO; add a test for git-checkout skipping a
file with the skip-worktree bit set.
Signed-off-by: Chhatoi Pritam Baral <chhatoipritam@gmail.com>
---
Replaced test_must_fail around grep with '!', as suggested by Eric.
t/t7012-skip-worktree-writing.sh | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/t/t7012-skip-worktree-writing.sh
b/t/t7012-skip-worktree-writing.sh
index 9ceaa40..276f076 100755
--- a/t/t7012-skip-worktree-writing.sh
+++ b/t/t7012-skip-worktree-writing.sh
@@ -141,6 +141,16 @@ test_expect_success 'git-clean, dirty case' '
#TODO test_expect_failure 'git-apply removes file' false
#TODO test_expect_failure 'git-mv to skip-worktree' false
#TODO test_expect_failure 'git-mv from skip-worktree' false
-#TODO test_expect_failure 'git-checkout' false
+
+test_expect_success 'git-checkout ignores skip-worktree file' '
+ echo >1 &&
+ git commit -m "Add files" &&
+ echo dirty >1 &&
+ echo dirty >2 &&
+ git update-index --skip-worktree 1 &&
+ git checkout -- . &&
+ grep -q dirty 1 &&
+ ! grep -q dirty 2
+'
test_done
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] t7012: Implement test for git-checkout
2016-03-26 16:37 [PATCH v3] t7012: Implement test for git-checkout Chhatoi Pritam Baral
@ 2016-03-30 13:29 ` Chhatoi Pritam Baral
2016-03-30 15:21 ` Eric Sunshine
0 siblings, 1 reply; 3+ messages in thread
From: Chhatoi Pritam Baral @ 2016-03-30 13:29 UTC (permalink / raw
To: git
Forgot to mention in the previous message, this is a microproject
for my GSoC '16 application.
(Is that redundant to mention after v1 and v2? )
On 03/26/2016 10:07 PM, Chhatoi Pritam Baral wrote:
> Previously a TODO; add a test for git-checkout skipping a
> file with the skip-worktree bit set.
>
> Signed-off-by: Chhatoi Pritam Baral <chhatoipritam@gmail.com>
> ---
>
> Replaced test_must_fail around grep with '!', as suggested by Eric.
>
> t/t7012-skip-worktree-writing.sh | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/t/t7012-skip-worktree-writing.sh
> b/t/t7012-skip-worktree-writing.sh
> index 9ceaa40..276f076 100755
> --- a/t/t7012-skip-worktree-writing.sh
> +++ b/t/t7012-skip-worktree-writing.sh
> @@ -141,6 +141,16 @@ test_expect_success 'git-clean, dirty case' '
> #TODO test_expect_failure 'git-apply removes file' false
> #TODO test_expect_failure 'git-mv to skip-worktree' false
> #TODO test_expect_failure 'git-mv from skip-worktree' false
> -#TODO test_expect_failure 'git-checkout' false
> +
> +test_expect_success 'git-checkout ignores skip-worktree file' '
> + echo >1 &&
> + git commit -m "Add files" &&
> + echo dirty >1 &&
> + echo dirty >2 &&
> + git update-index --skip-worktree 1 &&
> + git checkout -- . &&
> + grep -q dirty 1 &&
> + ! grep -q dirty 2
> +'
> test_done
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] t7012: Implement test for git-checkout
2016-03-30 13:29 ` Chhatoi Pritam Baral
@ 2016-03-30 15:21 ` Eric Sunshine
0 siblings, 0 replies; 3+ messages in thread
From: Eric Sunshine @ 2016-03-30 15:21 UTC (permalink / raw
To: Chhatoi Pritam Baral; +Cc: Git List
On Wed, Mar 30, 2016 at 9:29 AM, Chhatoi Pritam Baral
<chhatoipritam@gmail.com> wrote:
> Forgot to mention in the previous message, this is a microproject
> for my GSoC '16 application.
>
> (Is that redundant to mention after v1 and v2? )
Readers of v1 knew this since you mentioned with that version, at least.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-30 15:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-26 16:37 [PATCH v3] t7012: Implement test for git-checkout Chhatoi Pritam Baral
2016-03-30 13:29 ` Chhatoi Pritam Baral
2016-03-30 15:21 ` Eric Sunshine
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.