git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Feb 21, 2016, 18:01 UTC
Message-ID
<CAPig+cSaF73ff-RppOZWiS3Hm1skmqGj+tE9g6Y85hM1GnWn7A@mail.gmail.com>
In-Reply-To
<1456067358-19781-5-git-send-email-felipegassis@gmail.com>

On Sun, Feb 21, 2016 at 10:09 AM, Felipe Gonçalves Assis <felipeg.assis@gmail.com> wrote:

Show 10 quoted lines
> 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@gmail.com>
> ---
> 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).

Show 7 quoted lines
> --- 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.

Show 29 quoted lines
>  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
> +'
Previous: Felipe Gonçalves AssisNext: Felipe Gonçalves Assis
Message 12 of 16 in “Tests and fixes for merge-recursive rename options”
  1. 0/5 Tests and fixes for merge-recursive rename optionsFelipe Gonçalves Assis, Feb 21, 2016
  2. 1/5 merge-recursive: find-renames resets thresholdFelipe Gonçalves Assis, Feb 21, 2016
  3. Eric SunshineFeb 21, 2016
  4. 2/5 merge-strategies.txt: fix typoFelipe Gonçalves Assis, Feb 21, 2016
  5. Eric SunshineFeb 21, 2016
  6. 3/5 merge-recursive: test rename threshold optionFelipe Gonçalves Assis, Feb 21, 2016
  7. Eric SunshineFeb 21, 2016
  8. Felipe Gonçalves AssisFeb 21, 2016
  9. Eric SunshineFeb 21, 2016
  10. Junio C HamanoFeb 21, 2016
  11. 4/5 merge-recursive: test option to disable renamesFelipe Gonçalves Assis, Feb 21, 2016
  12. Eric SunshineFeb 21, 2016
  13. 5/5 merge-recursive: test more consistent interfaceFelipe Gonçalves Assis, Feb 21, 2016
  14. Eric SunshineFeb 21, 2016
  15. Felipe Gonçalves AssisFeb 21, 2016
  16. Eric SunshineFeb 21, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.