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

Re: [PATCH 2/2] git p4: add support for 'p4 move' in P4Submit

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 6, 2012, 06:28 UTC
Message-ID
<7v7guhpfmn.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1341409220-27954-3-git-send-email-pw@padd.com>
Pete Wyckoff <pw@padd.com> writes:
Show 12 quoted lines
> diff --git a/t/t9814-git-p4-rename.sh b/t/t9814-git-p4-rename.sh
> index 84fffb3..8be74b6 100755
> --- a/t/t9814-git-p4-rename.sh
> +++ b/t/t9814-git-p4-rename.sh
> @@ -77,16 +77,16 @@ test_expect_success 'detect renames' '
>  		git commit -a -m "Rename file1 to file4" &&
>  		git diff-tree -r -M HEAD &&
>  		git p4 submit &&
> -		p4 filelog //depot/file4 &&
> -		p4 filelog //depot/file4 | test_must_fail grep -q "branch from" &&
> +		p4 filelog //depot/file4 | tee filelog &&
> +		! grep -q " from //depot" filelog &&

I am not a huge fan of using "tee" in our test scripts, especially as it means piping output of another command whose output (and presumably the behaviour) we care about, hiding its exit status.

Fixing the incorrect use of piping to "test_must_fail grep" is a good change, but is there anything wrong to do the above like this?

	p4 filelog //depot/file4 >filelog &&
	! grep -q " from //depot" filelog &&
Previous: Pete WyckoffNext: Pete Wyckoff
Message 4 of 5 in “git p4: use "move" command for renames”
  1. 0/2 git p4: use "move" command for renamesPete Wyckoff, Jul 4, 2012
  2. 1/2 git p4: refactor diffOpts calculationPete Wyckoff, Jul 4, 2012
  3. 2/2 git p4: add support for 'p4 move' in P4SubmitPete Wyckoff, Jul 4, 2012
  4. Junio C HamanoJul 6, 2012
  5. Pete WyckoffJul 9, 2012

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.