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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2008/6/27 Miklos Vajna <vmiklos@xxxxxxxxxxxxxx>:
>
> 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 <vmiklos@xxxxxxxxxxxxxx>
> ---
>  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 <mike@xxxxxxxxxxxx>

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
--
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux