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

Re: [PATCH v10 4/5] dir_iterator: rewrite state machine model

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 20, 2017, 03:30 UTC
Message-ID
<xmqqfuh3ah71.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1492607652-36341-5-git-send-email-bnmvco@gmail.com>
Daniel Ferreira <bnmvco@gmail.com> writes:
Show 43 quoted lines
> diff --git a/t/t0065-dir-iterator.sh b/t/t0065-dir-iterator.sh
> index 46e5ce5..4c6632f 100755
> --- a/t/t0065-dir-iterator.sh
> +++ b/t/t0065-dir-iterator.sh
> @@ -15,31 +15,41 @@ test_expect_success 'setup' '
>  	>dir/d/e/d/a &&
>  
>  	mkdir -p dir2/a/b/c/ &&
> -	>dir2/a/b/c/d
> +	>dir2/a/b/c/d &&
> +
> +	>file
>  '
>  
> -test_expect_success 'dir-iterator should iterate through all files' '
> -	cat >expect-sorted-output <<-\EOF &&
> -	[d] (a) [a] ./dir/a
> -	[d] (a/b) [b] ./dir/a/b
> -	[d] (a/b/c) [c] ./dir/a/b/c
> -	[d] (d) [d] ./dir/d
> -	[d] (d/e) [e] ./dir/d/e
> -	[d] (d/e/d) [d] ./dir/d/e/d
> -	[f] (a/b/c/d) [d] ./dir/a/b/c/d
> -	[f] (a/e) [e] ./dir/a/e
> -	[f] (b) [b] ./dir/b
> -	[f] (c) [c] ./dir/c
> -	[f] (d/e/d/a) [a] ./dir/d/e/d/a
> -	EOF
> +cat >expect-sorted-output <<-\EOF &&
> +[d] (a) [a] ./dir/a
> +[d] (a/b) [b] ./dir/a/b
> +[d] (a/b/c) [c] ./dir/a/b/c
> +[d] (d) [d] ./dir/d
> +[d] (d/e) [e] ./dir/d/e
> +[d] (d/e/d) [d] ./dir/d/e/d
> +[f] (a/b/c/d) [d] ./dir/a/b/c/d
> +[f] (a/e) [e] ./dir/a/e
> +[f] (b) [b] ./dir/b
> +[f] (c) [c] ./dir/c
> +[f] (d/e/d/a) [a] ./dir/d/e/d/a
> +EOF
>  
> -	test-dir-iterator ./dir >out &&

There is something fishy going on around here in this patch, pushing the code to prepare test vector out of test_expect_success block. A mistake in rebasing or something?

If you need to reroll the series to update this part, please rename the test to t0066 and do remember to update the logmessage of a few commits that refer to t0065.

Thanks.
Previous: Daniel FerreiraNext: Michael Haggerty
Message 6 of 9 in “[GSoC] remove_subtree(): reimplement using iterators”
  1. 0/5 [GSoC] remove_subtree(): reimplement using iteratorsDaniel Ferreira, Apr 19, 2017
  2. 1/5 dir_iterator: add tests for dir_iterator APIDaniel Ferreira, Apr 19, 2017
  3. 2/5 remove_subtree(): test removing nested directoriesDaniel Ferreira, Apr 19, 2017
  4. 3/5 dir_iterator: refactor dir_iterator_advanceDaniel Ferreira, Apr 19, 2017
  5. 4/5 dir_iterator: rewrite state machine modelDaniel Ferreira, Apr 19, 2017
  6. Junio C HamanoApr 20, 2017
  7. Michael HaggertyApr 20, 2017
  8. 5/5 remove_subtree(): reimplement using iteratorsDaniel Ferreira, Apr 19, 2017
  9. Junio C HamanoApr 20, 2017

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.