Re: [PATCH 4/5] merge-recursive: test option to disable renames

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

 



On Sun, Feb 21, 2016 at 10:09 AM, Felipe Gonçalves Assis
<felipeg.assis@xxxxxxxxx> wrote:
> Also update name and description of tests for consistency:
> "merge-recursive options"          -> "merge-recursive space options"
> "merge-recursive rename threshold" -> "merge-recursive rename options"
>
> Signed-off-by: Felipe Gonçalves Assis <felipegassis@xxxxxxxxx>
> ---
> diff --git a/t/t3034-merge-recursive-rename-threshold.sh b/t/t3034-merge-recursive-rename-options.sh
> similarity index 83%
> rename from t/t3034-merge-recursive-rename-threshold.sh
> rename to t/t3034-merge-recursive-rename-options.sh

t3034 was entirely new in the previous patch (3/5) and could have been
given the correct name at that time, so it's not clear why the
approach of giving it a too-specific name and then immediately
renaming it with a more general purpose name in the following patch is
desirable. It should be perfectly fine to start with the general
purpose name even if the patch initially contains only very specific
tests (knowing that you will be adding more tests later).

> --- a/t/t3034-merge-recursive-rename-threshold.sh
> +++ b/t/t3034-merge-recursive-rename-options.sh
> @@ -1,6 +1,6 @@
>  #!/bin/sh
>
> -test_description='merge-recursive rename threshold option
> +test_description='merge-recursive rename options

Ditto. This could have been described with the more generic "options"
from the start.

>  Test rename detection by examining rename/delete conflicts.
>
> @@ -137,10 +137,28 @@ test_expect_success 'rename threshold is truncated' '
>         check_find_renames_100
>  '
>
> +test_expect_success 'disabled rename detection' '
> +       git read-tree --reset -u HEAD &&
> +       git merge-recursive --no-renames HEAD^ -- HEAD master &&
> +       check_no_renames
> +'
> +
>  test_expect_success 'last wins in --rename-threshold=<m> --rename-threshold=<n>' '
>         git read-tree --reset -u HEAD &&
>         test_must_fail git merge-recursive --rename-threshold=25 --rename-threshold=75 HEAD^ -- HEAD master &&
>         check_find_renames_75
>  '
>
> +test_expect_success 'last wins in --no-renames --rename-threshold=<n>' '
> +       git read-tree --reset -u HEAD &&
> +       test_must_fail git merge-recursive --no-renames --rename-threshold=25 HEAD^ -- HEAD master &&
> +       check_find_renames_25
> +'
> +
> +test_expect_success 'last wins in --rename-threshold=<n> --no-renames' '
> +       git read-tree --reset -u HEAD &&
> +       git merge-recursive --rename-threshold=25 --no-renames HEAD^ -- HEAD master &&
> +       check_no_renames
> +'
--
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]