From: Junio C Hamano <gitster@pobox•com>
To: Pete Wyckoff <pw@padd•com>
Cc: git@vger•kernel.org, Vitor Antunes <vitor.hda@gmail•com>
Subject: Re: [PATCH 2/2] git-p4: Fix copy detection test
Date: Fri, 27 Mar 2015 15:23:16 -0700 [thread overview]
Message-ID: <xmqq619mw04r.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1427418269-3263-3-git-send-email-vitor.hda@gmail.com> (Vitor Antunes's message of "Fri, 27 Mar 2015 01:04:29 +0000")
Vitor Antunes <vitor.hda@gmail•com> writes:
> 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?
> ---
> 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 &&
next prev parent reply other threads:[~2015-03-27 22:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-27 1:04 [PATCH 0/2] git-p4: Small updates to test cases Vitor Antunes
2015-03-27 1:04 ` [PATCH 1/2] git-p4: Make rename test case runnable under dash Vitor Antunes
2015-03-27 1:04 ` [PATCH 2/2] git-p4: Fix copy detection test Vitor Antunes
2015-03-27 22:23 ` Junio C Hamano [this message]
2015-03-27 23:59 ` Vitor Antunes
2015-03-28 0:36 ` Vitor Antunes
2015-03-28 16:12 ` Junio C Hamano
2015-03-27 1:26 ` [PATCH 0/2] git-p4: Small updates to test cases Junio C Hamano
2015-03-27 1:45 ` Junio C Hamano
2015-03-27 1:54 ` Vitor Antunes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq619mw04r.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=pw@padd$(echo .)com \
--cc=vitor.hda@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox