{"thread":{"id":"61094","subject":"[PATCH v3 0/2] diff: copies-harder support","startedAt":"2024-03-11T21:39:37Z","lastAt":"2024-05-17T03:38:18Z","messageCount":8,"participants":["Sam James","Junio C Hamano"],"isPatch":true,"patchVersion":3,"patchTotal":2},"messages":[{"id":"490401","messageId":"20240311213928.1872437-1-sam@gentoo.org","threadId":"61094","inReplyTo":null,"subject":"[PATCH v3 0/2] diff: copies-harder support","fromName":"Sam James","fromEmail":"sam@gentoo.org","sentAt":"2024-03-11T21:38:52Z","receivedAt":"2024-03-11T21:39:37Z","isPatch":true,"sender":{"key":"sam@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/11667869?v=4"},"body":"range-diff:\n```\n1:  4ad89a3f1a ! 1:  879565c99a diff: implement config.diff.renames=copies-harder\n    @@ Commit message\n         This allows specifying that 'git log -p', 'git diff', etc should always act\n         as if '-C --find-copies-harder' was passed.\n\n    -    I've found this especially useful for certain types of repository (like\n    +    It has proven this especially useful for certain types of repository (like\n         Gentoo's ebuild repositories) because files are often copies of a previous\n    -    version.\n    +    version:\n    +\n    +    Suppose a directory 'sys-devel/gcc' contains recipes for building\n    +    GCC, with one file for each supported upstream branch:\n    +      gcc-13.x.build.recipe\n    +      gcc-12.x.build.recipe\n    +      gcc-11.x.build.recipe\n    +      gcc-10.x.build.recipe\n    +\n    +    gcc-13.x.build.recipe was started as a copy of gcc-12.x.build.recipe\n    +    (which was started as a copy of gcc-11.x.build.recipe, etc.). Previous versions\n    +    are kept around to support parallel installation of multiple versions.\n    +\n    +    Being able to easily observe the diff relative to other recipes within the\n    +    directory has been a quality of life improvement for such repo layouts.\n\n         Signed-off-by: Sam James <sam@gentoo.org>\n\n    @@ Documentation/config/diff.txt: diff.renames::\n      \trename detection is disabled. If set to \"true\", basic rename\n      \tdetection is enabled.  If set to \"copies\" or \"copy\", Git will\n     -\tdetect copies, as well.  Defaults to true.  Note that this\n    -+\tdetect copies, as well.  If set to \"copies-harder\", Git will try harder\n    -+\tto detect copies.  Defaults to true.  Note that this\n    - \taffects only 'git diff' Porcelain like linkgit:git-diff[1] and\n    - \tlinkgit:git-log[1], and not lower level commands such as\n    +-\taffects only 'git diff' Porcelain like linkgit:git-diff[1] and\n    +-\tlinkgit:git-log[1], and not lower level commands such as\n    ++\tdetect copies, as well.  If set to \"copies-harder\", Git will spend extra\n    ++\tcycles to find more copies even in unmodified paths, see\n    ++\t'--find-copies-harder' in linkgit:git-diff[1]. Defaults to true.\n    ++\tNote that this affects only 'git diff' Porcelain like linkgit:git-diff[1]\n    ++\tand linkgit:git-log[1], and not lower level commands such as\n      \tlinkgit:git-diff-files[1].\n    +\n    + diff.suppressBlankEmpty::\n\n      ## Documentation/config/status.txt ##\n     @@ Documentation/config/status.txt: status.renames::\n    @@ Documentation/config/status.txt: status.renames::\n      \tlinkgit:git-commit[1] .  If set to \"false\", rename detection is\n      \tdisabled. If set to \"true\", basic rename detection is enabled.\n     -\tIf set to \"copies\" or \"copy\", Git will detect copies, as well.\n    -+\tIf set to \"copies\" or \"copy\", Git will detect copies, as well.  If\n    -+\tset to \"copies-harder\", Git will try harder to detect copies.\n    ++\tIf set to \"copies\" or \"copy\", Git will detect copies, as well.  If set\n    ++\tto \"copies-harder\", Git will spend extra cycles to find more copies even\n    ++\tin unmodified paths, see '--find-copies-harder' in linkgit:git-diff[1].\n      \tDefaults to the value of diff.renames.\n\n      status.showStash::\n    @@ diff.c: int git_config_rename(const char *var, const char *value)\n     +\tif (!strcasecmp(value, \"copies-harder\"))\n     +\t\treturn DIFF_DETECT_COPY_HARDER;\n      \tif (!strcasecmp(value, \"copies\") || !strcasecmp(value, \"copy\"))\n    --\t\treturn  DIFF_DETECT_COPY;\n    -+\t\treturn DIFF_DETECT_COPY;\n    -+\n    + \t\treturn  DIFF_DETECT_COPY;\n      \treturn git_config_bool(var,value) ? DIFF_DETECT_RENAME : 0;\n    - }\n    -\n     @@ diff.c: void diff_setup_done(struct diff_options *options)\n      \telse\n      \t\toptions->flags.diff_from_contents = 0;\n\n     -\tif (options->flags.find_copies_harder)\n     +\t/* Just fold this in as it makes the patch-to-git smaller */\n    -+\tif (options->flags.find_copies_harder || options->detect_rename == DIFF_DETECT_COPY_HARDER) {\n    ++\tif (options->flags.find_copies_harder ||\n    ++\t    options->detect_rename == DIFF_DETECT_COPY_HARDER) {\n     +\t\toptions->flags.find_copies_harder = 1;\n      \t\toptions->detect_rename = DIFF_DETECT_COPY;\n     +\t}\n    @@ diff.c: static int diff_opt_find_copies(const struct option *opt,\n      \t\treturn error(_(\"invalid argument to %s\"), opt->long_name);\n\n     -\tif (options->detect_rename == DIFF_DETECT_COPY)\n    -+\tif (options->detect_rename == DIFF_DETECT_COPY || options->detect_rename == DIFF_DETECT_COPY_HARDER)\n    ++\tif (options->detect_rename == DIFF_DETECT_COPY ||\n    ++\t    options->detect_rename == DIFF_DETECT_COPY_HARDER)\n      \t\toptions->flags.find_copies_harder = 1;\n      \telse\n      \t\toptions->detect_rename = DIFF_DETECT_COPY;\n    @@ diffcore-rename.c: static int find_identical_files(struct hashmap *srcs,\n      \t\t/* Give higher scores to sources that haven't been used already */\n      \t\tscore = !source->rename_used;\n     -\t\tif (source->rename_used && options->detect_rename != DIFF_DETECT_COPY)\n    -+\t\tif (source->rename_used && options->detect_rename != DIFF_DETECT_COPY && options->detect_rename != DIFF_DETECT_COPY_HARDER)\n    ++\t\tif (source->rename_used && options->detect_rename != DIFF_DETECT_COPY &&\n    ++\t\t    options->detect_rename != DIFF_DETECT_COPY_HARDER)\n      \t\t\tcontinue;\n      \t\tscore += basename_same(source, target);\n      \t\tif (score > best_score) {\n    @@ diffcore-rename.c: void diffcore_rename_extended(struct diff_options *options,\n      \tinfo.setup = 0;\n      \tassert(!dir_rename_count || strmap_empty(dir_rename_count));\n     -\twant_copies = (detect_rename == DIFF_DETECT_COPY);\n    -+\twant_copies = (detect_rename == DIFF_DETECT_COPY || detect_rename == DIFF_DETECT_COPY_HARDER);\n    ++\twant_copies = (detect_rename == DIFF_DETECT_COPY ||\n    ++\t\t       detect_rename == DIFF_DETECT_COPY_HARDER);\n      \tif (dirs_removed && (break_idx || want_copies))\n      \t\tBUG(\"dirs_removed incompatible with break/copy detection\");\n      \tif (break_idx && relevant_sources)\n-:  ---------- > 2:  eda1e07ac2 diff: whitespace cleanup\n```\n\nSam James (2):\n  diff: implement config.diff.renames=copies-harder\n  diff: whitespace cleanup\n\n Documentation/config/diff.txt   |  8 +++++---\n Documentation/config/status.txt |  4 +++-\n diff.c                          | 14 +++++++++++---\n diff.h                          |  1 +\n diffcore-rename.c               |  6 ++++--\n merge-ort.c                     |  2 +-\n merge-recursive.c               |  2 +-\n 7 files changed, 26 insertions(+), 11 deletions(-)\n\n-- \n2.44.0\n\n"},{"id":"490402","messageId":"20240311213928.1872437-2-sam@gentoo.org","threadId":"61094","inReplyTo":"20240311213928.1872437-1-sam@gentoo.org","subject":"[PATCH v3 1/2] diff: implement config.diff.renames=copies-harder","fromName":"Sam James","fromEmail":"sam@gentoo.org","sentAt":"2024-03-11T21:38:53Z","receivedAt":"2024-03-11T21:39:38Z","isPatch":true,"sender":{"key":"sam@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/11667869?v=4"},"body":"This patch adds a config value for 'diff.renames' called 'copies-harder'\nwhich make it so '-C -C' is in effect always passed for 'git log -p',\n'git diff', etc.\n\nThis allows specifying that 'git log -p', 'git diff', etc should always act\nas if '-C --find-copies-harder' was passed.\n\nIt has proven this especially useful for certain types of repository (like\nGentoo's ebuild repositories) because files are often copies of a previous\nversion:\n\nSuppose a directory 'sys-devel/gcc' contains recipes for building\nGCC, with one file for each supported upstream branch:\n  gcc-13.x.build.recipe\n  gcc-12.x.build.recipe\n  gcc-11.x.build.recipe\n  gcc-10.x.build.recipe\n\ngcc-13.x.build.recipe was started as a copy of gcc-12.x.build.recipe\n(which was started as a copy of gcc-11.x.build.recipe, etc.). Previous versions\nare kept around to support parallel installation of multiple versions.\n\nBeing able to easily observe the diff relative to other recipes within the\ndirectory has been a quality of life improvement for such repo layouts.\n\nSigned-off-by: Sam James <sam@gentoo.org>\n---\n Documentation/config/diff.txt   |  8 +++++---\n Documentation/config/status.txt |  4 +++-\n diff.c                          | 11 +++++++++--\n diff.h                          |  1 +\n diffcore-rename.c               |  6 ++++--\n merge-ort.c                     |  2 +-\n merge-recursive.c               |  2 +-\n 7 files changed, 24 insertions(+), 10 deletions(-)\n\ndiff --git a/Documentation/config/diff.txt b/Documentation/config/diff.txt\nindex 6c7e09a1ef..d50bae8c66 100644\n--- a/Documentation/config/diff.txt\n+++ b/Documentation/config/diff.txt\n@@ -131,9 +131,11 @@ diff.renames::\n \tWhether and how Git detects renames.  If set to \"false\",\n \trename detection is disabled. If set to \"true\", basic rename\n \tdetection is enabled.  If set to \"copies\" or \"copy\", Git will\n-\tdetect copies, as well.  Defaults to true.  Note that this\n-\taffects only 'git diff' Porcelain like linkgit:git-diff[1] and\n-\tlinkgit:git-log[1], and not lower level commands such as\n+\tdetect copies, as well.  If set to \"copies-harder\", Git will spend extra\n+\tcycles to find more copies even in unmodified paths, see\n+\t'--find-copies-harder' in linkgit:git-diff[1]. Defaults to true.\n+\tNote that this affects only 'git diff' Porcelain like linkgit:git-diff[1]\n+\tand linkgit:git-log[1], and not lower level commands such as\n \tlinkgit:git-diff-files[1].\n \n diff.suppressBlankEmpty::\ndiff --git a/Documentation/config/status.txt b/Documentation/config/status.txt\nindex 2ff8237f8f..5236088878 100644\n--- a/Documentation/config/status.txt\n+++ b/Documentation/config/status.txt\n@@ -33,7 +33,9 @@ status.renames::\n \tWhether and how Git detects renames in linkgit:git-status[1] and\n \tlinkgit:git-commit[1] .  If set to \"false\", rename detection is\n \tdisabled. If set to \"true\", basic rename detection is enabled.\n-\tIf set to \"copies\" or \"copy\", Git will detect copies, as well.\n+\tIf set to \"copies\" or \"copy\", Git will detect copies, as well.  If set\n+\tto \"copies-harder\", Git will spend extra cycles to find more copies even\n+\tin unmodified paths, see '--find-copies-harder' in linkgit:git-diff[1].\n \tDefaults to the value of diff.renames.\n \n status.showStash::\ndiff --git a/diff.c b/diff.c\nindex e50def4538..a6433dec30 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -204,6 +204,8 @@ int git_config_rename(const char *var, const char *value)\n {\n \tif (!value)\n \t\treturn DIFF_DETECT_RENAME;\n+\tif (!strcasecmp(value, \"copies-harder\"))\n+\t\treturn DIFF_DETECT_COPY_HARDER;\n \tif (!strcasecmp(value, \"copies\") || !strcasecmp(value, \"copy\"))\n \t\treturn  DIFF_DETECT_COPY;\n \treturn git_config_bool(var,value) ? DIFF_DETECT_RENAME : 0;\n@@ -4848,8 +4850,12 @@ void diff_setup_done(struct diff_options *options)\n \telse\n \t\toptions->flags.diff_from_contents = 0;\n \n-\tif (options->flags.find_copies_harder)\n+\t/* Just fold this in as it makes the patch-to-git smaller */\n+\tif (options->flags.find_copies_harder ||\n+\t    options->detect_rename == DIFF_DETECT_COPY_HARDER) {\n+\t\toptions->flags.find_copies_harder = 1;\n \t\toptions->detect_rename = DIFF_DETECT_COPY;\n+\t}\n \n \tif (!options->flags.relative_name)\n \t\toptions->prefix = NULL;\n@@ -5280,7 +5286,8 @@ static int diff_opt_find_copies(const struct option *opt,\n \tif (*arg != 0)\n \t\treturn error(_(\"invalid argument to %s\"), opt->long_name);\n \n-\tif (options->detect_rename == DIFF_DETECT_COPY)\n+\tif (options->detect_rename == DIFF_DETECT_COPY ||\n+\t    options->detect_rename == DIFF_DETECT_COPY_HARDER)\n \t\toptions->flags.find_copies_harder = 1;\n \telse\n \t\toptions->detect_rename = DIFF_DETECT_COPY;\ndiff --git a/diff.h b/diff.h\nindex 66bd8aeb29..b29e5b777f 100644\n--- a/diff.h\n+++ b/diff.h\n@@ -555,6 +555,7 @@ int git_config_rename(const char *var, const char *value);\n \n #define DIFF_DETECT_RENAME\t1\n #define DIFF_DETECT_COPY\t2\n+#define DIFF_DETECT_COPY_HARDER 3\n \n #define DIFF_PICKAXE_ALL\t1\n #define DIFF_PICKAXE_REGEX\t2\ndiff --git a/diffcore-rename.c b/diffcore-rename.c\nindex 5a6e2bcac7..d54078de7d 100644\n--- a/diffcore-rename.c\n+++ b/diffcore-rename.c\n@@ -299,7 +299,8 @@ static int find_identical_files(struct hashmap *srcs,\n \t\t}\n \t\t/* Give higher scores to sources that haven't been used already */\n \t\tscore = !source->rename_used;\n-\t\tif (source->rename_used && options->detect_rename != DIFF_DETECT_COPY)\n+\t\tif (source->rename_used && options->detect_rename != DIFF_DETECT_COPY &&\n+\t\t    options->detect_rename != DIFF_DETECT_COPY_HARDER)\n \t\t\tcontinue;\n \t\tscore += basename_same(source, target);\n \t\tif (score > best_score) {\n@@ -1405,7 +1406,8 @@ void diffcore_rename_extended(struct diff_options *options,\n \ttrace2_region_enter(\"diff\", \"setup\", options->repo);\n \tinfo.setup = 0;\n \tassert(!dir_rename_count || strmap_empty(dir_rename_count));\n-\twant_copies = (detect_rename == DIFF_DETECT_COPY);\n+\twant_copies = (detect_rename == DIFF_DETECT_COPY ||\n+\t\t       detect_rename == DIFF_DETECT_COPY_HARDER);\n \tif (dirs_removed && (break_idx || want_copies))\n \t\tBUG(\"dirs_removed incompatible with break/copy detection\");\n \tif (break_idx && relevant_sources)\ndiff --git a/merge-ort.c b/merge-ort.c\nindex 817f7b57c7..bfb895544b 100644\n--- a/merge-ort.c\n+++ b/merge-ort.c\n@@ -4788,7 +4788,7 @@ static void merge_start(struct merge_options *opt, struct merge_result *result)\n \t * sanity check them anyway.\n \t */\n \tassert(opt->detect_renames >= -1 &&\n-\t       opt->detect_renames <= DIFF_DETECT_COPY);\n+\t       opt->detect_renames <= DIFF_DETECT_COPY_HARDER);\n \tassert(opt->verbosity >= 0 && opt->verbosity <= 5);\n \tassert(opt->buffer_output <= 2);\n \tassert(opt->obuf.len == 0);\ndiff --git a/merge-recursive.c b/merge-recursive.c\nindex d58c05ad2c..9e59c75b3e 100644\n--- a/merge-recursive.c\n+++ b/merge-recursive.c\n@@ -3704,7 +3704,7 @@ static int merge_start(struct merge_options *opt, struct tree *head)\n \tassert(opt->branch1 && opt->branch2);\n \n \tassert(opt->detect_renames >= -1 &&\n-\t       opt->detect_renames <= DIFF_DETECT_COPY);\n+\t       opt->detect_renames <= DIFF_DETECT_COPY_HARDER);\n \tassert(opt->detect_directory_renames >= MERGE_DIRECTORY_RENAMES_NONE &&\n \t       opt->detect_directory_renames <= MERGE_DIRECTORY_RENAMES_TRUE);\n \tassert(opt->rename_limit >= -1);\n-- \n2.44.0\n\n"},{"id":"490403","messageId":"20240311213928.1872437-3-sam@gentoo.org","threadId":"61094","inReplyTo":"20240311213928.1872437-1-sam@gentoo.org","subject":"[PATCH v3 2/2] diff: whitespace cleanup","fromName":"Sam James","fromEmail":"sam@gentoo.org","sentAt":"2024-03-11T21:38:54Z","receivedAt":"2024-03-11T21:39:39Z","isPatch":true,"sender":{"key":"sam@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/11667869?v=4"},"body":"Fix whitespace after 'return' and add a newline after the if block to separate\nthe strcasecmp logic from the rest.\n\nSigned-off-by: Sam James <sam@gentoo.org>\n---\n diff.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/diff.c b/diff.c\nindex a6433dec30..9a7425cae4 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -207,7 +207,8 @@ int git_config_rename(const char *var, const char *value)\n \tif (!strcasecmp(value, \"copies-harder\"))\n \t\treturn DIFF_DETECT_COPY_HARDER;\n \tif (!strcasecmp(value, \"copies\") || !strcasecmp(value, \"copy\"))\n-\t\treturn  DIFF_DETECT_COPY;\n+\t\treturn DIFF_DETECT_COPY;\n+\n \treturn git_config_bool(var,value) ? DIFF_DETECT_RENAME : 0;\n }\n \n-- \n2.44.0\n\n"},{"id":"492543","messageId":"875xwr27le.fsf@gentoo.org","threadId":"61094","inReplyTo":"20240311213928.1872437-1-sam@gentoo.org","subject":"Re: [PATCH v3 0/2] diff: copies-harder support","fromName":"Sam James","fromEmail":"sam@gentoo.org","sentAt":"2024-04-08T15:32:29Z","receivedAt":"2024-04-08T15:32:32Z","isPatch":true,"sender":{"key":"sam@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/11667869?v=4"},"body":"Sam James <sam@gentoo.org> writes:\n\n> range-diff:\n> ```\n> [...]\n> ```\n>\n> Sam James (2):\n>   diff: implement config.diff.renames=copies-harder\n>   diff: whitespace cleanup\n>\n\nIt was pointed out that\nhttps://github.com/gitgitgadget/git/pull/1606#issuecomment-2002137907\nthat I forgot to add the changes in v2/v3.\n\nv2: Documentation phrasing fixes.\nv3: Split out whitespace & formatting changes into their own commit and\napply missed documentation phrasing tweaks.\n\n\n>  Documentation/config/diff.txt   |  8 +++++---\n>  Documentation/config/status.txt |  4 +++-\n>  diff.c                          | 14 +++++++++++---\n>  diff.h                          |  1 +\n>  diffcore-rename.c               |  6 ++++--\n>  merge-ort.c                     |  2 +-\n>  merge-recursive.c               |  2 +-\n>  7 files changed, 26 insertions(+), 11 deletions(-)\n"},{"id":"492976","messageId":"87sezm1116.fsf@gentoo.org","threadId":"61094","inReplyTo":"875xwr27le.fsf@gentoo.org","subject":"Re: [PATCH v3 0/2] diff: copies-harder support","fromName":"Sam James","fromEmail":"sam@gentoo.org","sentAt":"2024-04-16T02:42:13Z","receivedAt":"2024-04-16T02:42:17Z","isPatch":true,"sender":{"key":"sam@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/11667869?v=4"},"body":"Sam James <sam@gentoo.org> writes:\n\n> Sam James <sam@gentoo.org> writes:\n>\n>> range-diff:\n>> ```\n>> [...]\n>> ```\n>>\n>> Sam James (2):\n>>   diff: implement config.diff.renames=copies-harder\n>>   diff: whitespace cleanup\n>>\n>\n> It was pointed out that\n> https://github.com/gitgitgadget/git/pull/1606#issuecomment-2002137907\n> that I forgot to add the changes in v2/v3.\n>\n> v2: Documentation phrasing fixes.\n> v3: Split out whitespace & formatting changes into their own commit and\n> apply missed documentation phrasing tweaks.\n\nping\n\nI'm not sure of the etiquette for git development, so if it's too short\nto ping, my apologies.\n\n>\n>\n>>  Documentation/config/diff.txt   |  8 +++++---\n>>  Documentation/config/status.txt |  4 +++-\n>>  diff.c                          | 14 +++++++++++---\n>>  diff.h                          |  1 +\n>>  diffcore-rename.c               |  6 ++++--\n>>  merge-ort.c                     |  2 +-\n>>  merge-recursive.c               |  2 +-\n>>  7 files changed, 26 insertions(+), 11 deletions(-)\n"},{"id":"494847","messageId":"8734qihft5.fsf@gentoo.org","threadId":"61094","inReplyTo":"87sezm1116.fsf@gentoo.org","subject":"Re: [PATCH v3 0/2] diff: copies-harder support","fromName":"Sam James","fromEmail":"sam@gentoo.org","sentAt":"2024-05-15T22:27:02Z","receivedAt":"2024-05-15T22:27:06Z","isPatch":true,"sender":{"key":"sam@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/11667869?v=4"},"body":"Sam James <sam@gentoo.org> writes:\n\n> Sam James <sam@gentoo.org> writes:\n>\n>> Sam James <sam@gentoo.org> writes:\n>>\n>>> range-diff:\n>>> ```\n>>> [...]\n>>> ```\n>>>\n>>> Sam James (2):\n>>>   diff: implement config.diff.renames=copies-harder\n>>>   diff: whitespace cleanup\n>>>\n>>\n>> It was pointed out that\n>> https://github.com/gitgitgadget/git/pull/1606#issuecomment-2002137907\n>> that I forgot to add the changes in v2/v3.\n>>\n>> v2: Documentation phrasing fixes.\n>> v3: Split out whitespace & formatting changes into their own commit and\n>> apply missed documentation phrasing tweaks.\n>\n> ping\n>\n> I'm not sure of the etiquette for git development, so if it's too short\n> to ping, my apologies.\n>\n\nping - let me know if I need to do anything different. Thanks!\n\n>>\n>>\n>>>  Documentation/config/diff.txt   |  8 +++++---\n>>>  Documentation/config/status.txt |  4 +++-\n>>>  diff.c                          | 14 +++++++++++---\n>>>  diff.h                          |  1 +\n>>>  diffcore-rename.c               |  6 ++++--\n>>>  merge-ort.c                     |  2 +-\n>>>  merge-recursive.c               |  2 +-\n>>>  7 files changed, 26 insertions(+), 11 deletions(-)\n"},{"id":"494894","messageId":"xmqq8r09u5u5.fsf@gitster.g","threadId":"61094","inReplyTo":"8734qihft5.fsf@gentoo.org","subject":"Re: [PATCH v3 0/2] diff: copies-harder support","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-05-16T15:36:18Z","receivedAt":"2024-05-16T15:36:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sam James <sam@gentoo.org> writes:\n\n> ping - let me know if I need to do anything different. Thanks!\n>\n>>>\n>>>\n>>>>  Documentation/config/diff.txt   |  8 +++++---\n>>>>  Documentation/config/status.txt |  4 +++-\n>>>>  diff.c                          | 14 +++++++++++---\n>>>>  diff.h                          |  1 +\n>>>>  diffcore-rename.c               |  6 ++++--\n>>>>  merge-ort.c                     |  2 +-\n>>>>  merge-recursive.c               |  2 +-\n>>>>  7 files changed, 26 insertions(+), 11 deletions(-)\n\nCopies-harder is supported from the command line already.  We do not\nwant a configuration variable for it.  diff.renames configuration\nwas already a mistake enough.  Let's not pile on a new mistake on an\nold mistake that it is too late for us to take back.\n\nThanks.\n"},{"id":"494919","messageId":"87r0e1f6qg.fsf@gentoo.org","threadId":"61094","inReplyTo":"xmqq8r09u5u5.fsf@gitster.g","subject":"Re: [PATCH v3 0/2] diff: copies-harder support","fromName":"Sam James","fromEmail":"sam@gentoo.org","sentAt":"2024-05-17T03:38:15Z","receivedAt":"2024-05-17T03:38:18Z","isPatch":true,"sender":{"key":"sam@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/11667869?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Sam James <sam@gentoo.org> writes:\n>\n>> ping - let me know if I need to do anything different. Thanks!\n>>\n>>>>\n>>>>\n>>>>>  Documentation/config/diff.txt   |  8 +++++---\n>>>>>  Documentation/config/status.txt |  4 +++-\n>>>>>  diff.c                          | 14 +++++++++++---\n>>>>>  diff.h                          |  1 +\n>>>>>  diffcore-rename.c               |  6 ++++--\n>>>>>  merge-ort.c                     |  2 +-\n>>>>>  merge-recursive.c               |  2 +-\n>>>>>  7 files changed, 26 insertions(+), 11 deletions(-)\n>\n> Copies-harder is supported from the command line already.  We do not\n> want a configuration variable for it.  diff.renames configuration\n> was already a mistake enough.  Let's not pile on a new mistake on an\n> old mistake that it is too late for us to take back.\n\nThanks for the reply. It's a shame that a conceptual NACK wasn't\ndelivered in v1 [0] though. Also, Elijah said a configuration option made\nsense in v1 and you responded to him and didn't disagree, so I took it\nas conceptually okay.\n\nI'm aware of the command line option existing. It doesn't work well for\nus because it's really only suitable for certain classes of repos where\nyou essentially *always* want it enabled (any ebuild repository), but\nyou don't otherwise given its speed and you may not even be\nexpecting many copies/renames elsewhere.\n\n[0] https://lore.kernel.org/git/xmqq7cmu9s29.fsf@gitster.g/\n\n>\n> Thanks.\n\nthanks,\nsam\n"}]}