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

Re: [PATCH v16 6/7] bisect: add tests for the --no-checkout option.

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 4, 2011, 00:43 UTC
Message-ID
<7voc066m66.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1312408626-8600-7-git-send-email-jon.seymour@gmail.com>
Jon Seymour <jon.seymour@gmail.com> writes:
Show 10 quoted lines
> @@ -616,6 +628,14 @@ cat > expected.missing-tree.default <<EOF
>  fatal: unable to read tree 39f7e61a724187ab767d2e08442d9b6b9dab587d
>  EOF
>  
> +check_same()
> +{
> +    echo "Checking $1 is the same as $2" &&
> +    git rev-parse "$1" > expected.same &&
> +    git rev-parse "$2" > expected.actual &&
> +    test_cmp expected.same expected.actual

Please indent with tabs; I know some existing lines in this file needs fixing in a separate patch, but we do not have to make it worse.

Show 6 quoted lines
> +test_expect_success 'bisect: demonstrate identification of damage boundary' "
> +	git bisect reset &&
> +	git checkout broken &&
> +	git bisect start broken master --no-checkout &&
> +	git bisect run sh -c '
> +		GOOD=$(git for-each-ref "--format=%(objectname)" refs/bisect/good-*) &&

I have a suspicion that the dq around the format=%(...) here does not do what you seem to think; doesn't it just step outside of the dq context of the second parameter of the outermost test_expect_success? Wouldn't your shell see

	git for-each-ref --format=%(objectname)
without dq and barf on () as a consequence?
Previous: Jon SeymourNext: Jon Seymour
Message 9 of 10 in “bisect: Add support for --no-checkout option”
  1. 0/7 bisect: Add support for --no-checkout optionJon Seymour, Aug 3, 2011
  2. 1/7 bisect: move argument parsing before state modification.Jon Seymour, Aug 3, 2011
  3. 2/7 bisect: use && to connect statements that are deferred with eval.Jon Seymour, Aug 3, 2011
  4. 3/7 bisect: add tests to document expected behaviour in presence of broken trees.Jon Seymour, Aug 3, 2011
  5. 4/7 bisect: introduce support for --no-checkout option.Jon Seymour, Aug 3, 2011
  6. 5/7 bisect: introduce --no-checkout support into porcelain.Jon Seymour, Aug 3, 2011
  7. Junio C HamanoAug 4, 2011
  8. 6/7 bisect: add tests for the --no-checkout option.Jon Seymour, Aug 3, 2011
  9. Junio C HamanoAug 4, 2011
  10. 7/7 bisect: add documentation for --no-checkout option.Jon Seymour, Aug 3, 2011

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.