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

Re: [PATCH 2/2] git-p4: Fix copy detection test

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 27, 2015, 22:23 UTC
Message-ID
<xmqq619mw04r.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1427418269-3263-3-git-send-email-vitor.hda@gmail.com>
Vitor Antunes <vitor.hda@gmail.com> writes:
Show 7 quoted lines
> File file11 is copied from file2 and diff-tree correctly reports this file as
> its the source, but the test expression was checking for file10 instead (which
> was a file that also originated from file2). It is possible that the diff-tree
> algorithm was updated in recent versions, which resulted in this mismatch in
> behavior.
>
> Signed-off-by: Vitor Antunes <vitor.hda@gmail.com>

Pete, these tests blame to your 9b6513ac (git p4 test: split up big t9800 test, 2012-06-27). I presume that you tested the result of this splitting, but do you happen to know if we did something to cause the test to break recently?

Show 25 quoted lines
> ---
>  t/t9814-git-p4-rename.sh |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/t/t9814-git-p4-rename.sh b/t/t9814-git-p4-rename.sh
> index 24008ff..018f01d 100755
> --- a/t/t9814-git-p4-rename.sh
> +++ b/t/t9814-git-p4-rename.sh
> @@ -156,14 +156,14 @@ test_expect_success 'detect copies' '
>  		git diff-tree -r -C HEAD &&
>  		git p4 submit &&
>  		p4 filelog //depot/file10 &&
> -		p4 filelog //depot/file10 | grep -q "branch from //depot/file" &&
> +		p4 filelog //depot/file10 | grep -q "branch from //depot/file2" &&
>  
>  		cp file2 file11 &&
>  		git add file11 &&
>  		git commit -a -m "Copy file2 to file11" &&
>  		git diff-tree -r -C --find-copies-harder HEAD &&
>  		src=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f2) &&
> -		test "$src" = file10 &&
> +		test "$src" = file2 &&
>  		git config git-p4.detectCopiesHarder true &&
>  		git p4 submit &&
>  		p4 filelog //depot/file11 &&
Previous: Vitor AntunesNext: Vitor Antunes
Message 4 of 10 in “git-p4: Small updates to test cases”
  1. 0/2 git-p4: Small updates to test casesVitor Antunes, Mar 27, 2015
  2. 1/2 git-p4: Make rename test case runnable under dashVitor Antunes, Mar 27, 2015
  3. 2/2 git-p4: Fix copy detection testVitor Antunes, Mar 27, 2015
  4. Junio C HamanoMar 27, 2015
  5. Vitor AntunesMar 27, 2015
  6. Vitor AntunesMar 28, 2015
  7. Junio C HamanoMar 28, 2015
  8. Junio C HamanoMar 27, 2015
  9. Junio C HamanoMar 27, 2015
  10. Vitor AntunesMar 27, 2015

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.