On Fri, Jul 25, 2014 at 12:05 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Johannes Sixt <j6t@xxxxxxxx> writes: >> I see a few other no-nos in the context of the changes, in particular, >> pipelines where git is not the last command; these would not catch >> failures in the git commands. But a fix for that is certainly outside >> the scope of this patch. > > Yuck. Thanks for spotting. > > Perhaps we should apply a preliminary clean-up before doing anything > else, perhaps? The change in 9814 is a post 2.0 regression. Apart from your change and the word wrap adjustments suggested by Pete, would the following also make sense, to fix the other flaw Johannes pointed out? With regards to failing, git diff-tree should be idempotent. I think those are the two occurrences in this file: diff --git a/t/t9814-git-p4-rename.sh b/t/t9814-git-p4-rename.sh index 1fc1f5f..7815f9a 100755 --- a/t/t9814-git-p4-rename.sh +++ b/t/t9814-git-p4-rename.sh @@ -176,6 +176,7 @@ test_expect_success 'detect copies' ' git diff-tree -r -C --find-copies-harder HEAD && level=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f1 | cut -d" " -f5 | sed "s/C test -n "$level" && test "$level" -gt 0 && test "$level" -lt 98 && + 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" = file11 && git config git-p4.detectCopies $(($level + 2)) && @@ -190,6 +191,7 @@ test_expect_success 'detect copies' ' git diff-tree -r -C --find-copies-harder HEAD && level=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f1 | cut -d" " -f5 | sed "s/C test -n "$level" && test "$level" -gt 2 && test "$level" -lt 100 && + 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" = file11 || test "$src" = file12 && git config git-p4.detectCopies $(($level - 2)) && -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html