Thread (56 messages) flat view 56 messages, 7 authors, 2016-06-15

Re: [PATCH 04/15] Add new test to ensure git-merge handles pull.twohead and pull.octopus

From: Mike Ralphson <hidden>
Date: 2016-06-15 22:44:53
Subsystem: the rest · Maintainer: Linus Torvalds

2008/6/27 Miklos Vajna [off-list ref]:
Test if the given strategies are used and test the case when multiple
strategies are configured using a space separated list.

Also test if the best strategy is picked if none is specified.  This is
done by adding a simple test case where recursive detects a rename, but
resolve does not, and verify that finally merge will pick up the
previous.

Signed-off-by: Miklos Vajna <redacted>
---
 t/t7601-merge-pull-config.sh |  129 ++++++++++++++++++++++++++++++++++++++++++
+
+conflict_count()
+{
+       eval $1=`{
+               git diff-files --name-only
+               git ls-files --unmerged
+       } | wc -l`
+}
+
This here causes the test to fail on AIX (and likely other OS, such as
apparently OSX) where wc -l outputs whitespace. See
http://article.gmane.org/gmane.comp.version-control.git/80450

Here we want the line count not just a return value, so is the
following acceptable?
diff --git a/t/t7601-merge-pull-config.sh b/t/t7601-merge-pull-config.sh
index 32585f8..9b6097d 100755
--- a/t/t7601-merge-pull-config.sh
+++ b/t/t7601-merge-pull-config.sh
@@ -73,7 +73,7 @@ conflict_count()
        eval $1=`{
                git diff-files --name-only
                git ls-files --unmerged
-       } | wc -l`
+       } | wc -l | tr -d \ `
 }

 # c4 - c5
Signed-off-by: Mike Ralphson <redacted>

Anyway, I thought we preferred $() to backticks?

I do apologise for not being around for the earlier comedy breakage on
AIX, my sysadmins decided to 'improve' our firewall rules which cut my
automated builds off just after the final rc for 1.5.6, then I was on
vacation miles from any computers.

Mike
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help