git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3] t7012: Implement test for git-checkout

From
Chhatoi Pritam Baral <chhatoipritam@gmail.com>
Date
Mar 30, 2016, 13:29 UTC
Message-ID
<56FBD4C9.7080904@gmail.com>
In-Reply-To
<56F6BADF.4000005@gmail.com>

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:
Show 33 quoted lines
> 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
Previous: Chhatoi Pritam BaralNext: Eric Sunshine
Message 2 of 3 in “t7012: Implement test for git-checkout”
  1. t7012: Implement test for git-checkoutChhatoi Pritam Baral, Mar 26, 2016
  2. Chhatoi Pritam BaralMar 30, 2016
  3. Eric SunshineMar 30, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.