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

Re: [PATCH] t4038: add tests for "diff --cc --raw <trees>"

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 5, 2013, 20:48 UTC
Message-ID
<7v8v72sczp.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20130205202558.GX1342@serenity.lan>
John Keeping <john@keeping.me.uk> writes:
Show 19 quoted lines
> Signed-off-by: John Keeping <john@keeping.me.uk>
> ---
> ...
> diff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh
> index 40277c7..a0701bc 100755
> --- a/t/t4038-diff-combined.sh
> +++ b/t/t4038-diff-combined.sh
> @@ -89,4 +89,33 @@ test_expect_success 'diagnose truncated file' '
>  	grep "diff --cc file" out
>  '
>  
> +test_expect_success 'setup for --cc --raw' '
> +	blob=$(echo file |git hash-object --stdin -w) &&
> +	base_tree=$(echo "100644 blob $blob	file" | git mktree) &&
> +	trees= &&
> +	for i in `test_seq 1 40`
> +	do
> +		blob=$(echo file$i |git hash-object --stdin -w) &&
> +		trees="$trees $(echo "100644 blob $blob	file" |git mktree)"
Please have a SP after each of these '|' pipes.
If you collect trees this way:
	trees="$trees$(echo ... | git mktree)$LF"
then ...
Show 10 quoted lines
> +	done
> +'
> +
> +test_expect_success 'check --cc --raw with four trees' '
> +	four_trees=$(echo "$trees" |awk -e "{
> +		print \$1
> +		print \$2
> +		print \$3
> +		print \$4
> +	}") &&
(What's "awk -e"?)
... you can do
	echo "$trees" | sed -e 4q
which is less repetitive.
Thanks.
Previous: John KeepingNext: John Keeping
Message 13 of 20 in “Make Git compile warning-free with Clang”
  1. 0/3 Make Git compile warning-free with ClangJohn Keeping, Feb 3, 2013
  2. 1/3 fix clang -Wtautological-compare with unsigned enumJohn Keeping, Feb 3, 2013
  3. Jonathan NiederFeb 3, 2013
  4. 2/3 combine-diff: suppress a clang warningJohn Keeping, Feb 3, 2013
  5. Tay Ray ChuanFeb 3, 2013
  6. John KeepingFeb 3, 2013
  7. Junio C HamanoFeb 3, 2013
  8. John KeepingFeb 3, 2013
  9. Junio C HamanoFeb 3, 2013
  10. John KeepingFeb 3, 2013
  11. Junio C HamanoFeb 4, 2013
  12. t4038: add tests for "diff --cc --raw <trees>"John Keeping, Feb 5, 2013
  13. Junio C HamanoFeb 5, 2013
  14. t4038: add tests for "diff --cc --raw <trees>"John Keeping, Feb 5, 2013
  15. Junio C HamanoFeb 5, 2013
  16. Miles BaderFeb 7, 2013
  17. John KeepingFeb 7, 2013
  18. 3/3 builtin/apply: tighten (dis)similarity index parsingJohn Keeping, Feb 3, 2013
  19. Junio C HamanoFeb 3, 2013
  20. Antoine PelisseFeb 3, 2013

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.