{"thread":{"id":"41834","subject":"[PATCH v3] t7012: Implement test for git-checkout","startedAt":"2016-03-26T16:37:51Z","lastAt":"2016-03-30T15:21:31Z","messageCount":3,"participants":["Chhatoi Pritam Baral","Eric Sunshine"],"isPatch":true,"patchVersion":3,"patchTotal":null},"messages":[{"id":"281909","messageId":"56F6BADF.4000005@gmail.com","threadId":"41834","inReplyTo":null,"subject":"[PATCH v3] t7012: Implement test for git-checkout","fromName":"Chhatoi Pritam Baral","fromEmail":"chhatoipritam@gmail.com","sentAt":"2016-03-26T16:37:51Z","receivedAt":"2016-03-26T16:37:51Z","isPatch":true,"sender":{"key":"chhatoipritam@gmail.com","avatar":"https://gravatar.com/avatar/2c5ac133640a20922f83e09e7b146a5cd5ad2472ee325969573401c048e78cbd?d=mp&s=160"},"body":"Previously a TODO; add a test for git-checkout skipping a\nfile with the skip-worktree bit set.\n\nSigned-off-by: Chhatoi Pritam Baral <chhatoipritam@gmail.com>\n---\n\nReplaced test_must_fail around grep with '!', as suggested by Eric.\n\n t/t7012-skip-worktree-writing.sh | 12 +++++++++++-\n 1 file changed, 11 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t7012-skip-worktree-writing.sh\nb/t/t7012-skip-worktree-writing.sh\nindex 9ceaa40..276f076 100755\n--- a/t/t7012-skip-worktree-writing.sh\n+++ b/t/t7012-skip-worktree-writing.sh\n@@ -141,6 +141,16 @@ test_expect_success 'git-clean, dirty case' '\n #TODO test_expect_failure 'git-apply removes file' false\n #TODO test_expect_failure 'git-mv to skip-worktree' false\n #TODO test_expect_failure 'git-mv from skip-worktree' false\n-#TODO test_expect_failure 'git-checkout' false\n+\n+test_expect_success 'git-checkout ignores skip-worktree file' '\n+\techo >1 &&\n+\tgit commit -m \"Add files\" &&\n+\techo dirty >1 &&\n+\techo dirty >2 &&\n+\tgit update-index --skip-worktree 1 &&\n+\tgit checkout -- . &&\n+\tgrep -q dirty 1 &&\n+\t! grep -q dirty 2\n+'\n  test_done\n-- \n2.7.4\n"},{"id":"282228","messageId":"56FBD4C9.7080904@gmail.com","threadId":"41834","inReplyTo":"56F6BADF.4000005@gmail.com","subject":"Re: [PATCH v3] t7012: Implement test for git-checkout","fromName":"Chhatoi Pritam Baral","fromEmail":"chhatoipritam@gmail.com","sentAt":"2016-03-30T13:29:45Z","receivedAt":"2016-03-30T13:29:45Z","isPatch":true,"sender":{"key":"chhatoipritam@gmail.com","avatar":"https://gravatar.com/avatar/2c5ac133640a20922f83e09e7b146a5cd5ad2472ee325969573401c048e78cbd?d=mp&s=160"},"body":"Forgot to mention in the previous message, this is a microproject\nfor my GSoC '16 application.\n\n(Is that redundant to mention after v1 and v2? )\n\nOn 03/26/2016 10:07 PM, Chhatoi Pritam Baral wrote:\n> Previously a TODO; add a test for git-checkout skipping a\n> file with the skip-worktree bit set.\n>\n> Signed-off-by: Chhatoi Pritam Baral <chhatoipritam@gmail.com>\n> ---\n>\n> Replaced test_must_fail around grep with '!', as suggested by Eric.\n>\n>  t/t7012-skip-worktree-writing.sh | 12 +++++++++++-\n>  1 file changed, 11 insertions(+), 1 deletion(-)\n>\n> diff --git a/t/t7012-skip-worktree-writing.sh\n> b/t/t7012-skip-worktree-writing.sh\n> index 9ceaa40..276f076 100755\n> --- a/t/t7012-skip-worktree-writing.sh\n> +++ b/t/t7012-skip-worktree-writing.sh\n> @@ -141,6 +141,16 @@ test_expect_success 'git-clean, dirty case' '\n>  #TODO test_expect_failure 'git-apply removes file' false\n>  #TODO test_expect_failure 'git-mv to skip-worktree' false\n>  #TODO test_expect_failure 'git-mv from skip-worktree' false\n> -#TODO test_expect_failure 'git-checkout' false\n> +\n> +test_expect_success 'git-checkout ignores skip-worktree file' '\n> +\techo >1 &&\n> +\tgit commit -m \"Add files\" &&\n> +\techo dirty >1 &&\n> +\techo dirty >2 &&\n> +\tgit update-index --skip-worktree 1 &&\n> +\tgit checkout -- . &&\n> +\tgrep -q dirty 1 &&\n> +\t! grep -q dirty 2\n> +'\n>   test_done\n"},{"id":"282231","messageId":"CAPig+cSF-8pV08PeVVtRcmoZvV-013MJPmzJ6+hsci5vYsi86Q@mail.gmail.com","threadId":"41834","inReplyTo":"56FBD4C9.7080904@gmail.com","subject":"Re: [PATCH v3] t7012: Implement test for git-checkout","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2016-03-30T15:21:31Z","receivedAt":"2016-03-30T15:21:31Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Mar 30, 2016 at 9:29 AM, Chhatoi Pritam Baral\n<chhatoipritam@gmail.com> wrote:\n> Forgot to mention in the previous message, this is a microproject\n> for my GSoC '16 application.\n>\n> (Is that redundant to mention after v1 and v2? )\n\nReaders of v1 knew this since you mentioned with that version, at least.\n"}]}