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

Re: [WIP PATCH/RFC] Use a higher range-diff --creation-factor for format-patch

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 15, 2019, 19:00 UTC
Message-ID
<CAPig+cRMiEcXVRYrgp+B3tcDreh41-a5_k0zABe+HNce0G=Cyw@mail.gmail.com>
In-Reply-To
<87y35g9l18.fsf@evledraar.gmail.com>

On Fri, Mar 15, 2019 at 12:09 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:

Show 5 quoted lines
> diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
> @@ -261,6 +261,10 @@ material (this may change in the future).
> +Defaults to 90, whereas the linkgit:git-range-diff[1] default is
> +60. It's assumed that you're submitting a new patch series & that we
> +should try harder than normal to find similarities.

My understanding was that the primary use-case of git-range-diff itself (which existed before the --range-diff option was added to git-format-patch) was to generate a "range diff" for a cover letter of a re-rolled series. So, I'm confused about why this tweaks the default value of one command but not the other.

> diff --git a/range-diff.h b/range-diff.h
> @@ -4,6 +4,7 @@
>  #define RANGE_DIFF_CREATION_FACTOR_DEFAULT 60
> +#define RANGE_DIFF_CREATION_FACTOR_FORMAT_PATCH_DEFAULT 90

The point of introducing RANGE_DIFF_CREATION_FACTOR_DEFAULT in the first place was to ensure that the default creation-factor didn't get out-of-sync between git-range-diff and git-format-patch., Thus, introducing this sort of inconsistency between the two would likely lead to confusion on the part of users. After all, --range-diff was added to git-format-patch merely as a convenience over having to run git-range-diff separately and copy/pasting its output into a cover letter generated by git-format-patch. If the two programs default to different values, then that "convenience equality" breaks down.

So, I'm fairly negative on this change. However, that doesn't mean I would oppose tweaking the value shared between the two programs (and also the default used by GitGitGadget, if it specifies it manually), though I defer to Dscho in that regard.

Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 2 of 5 in “Use a higher range-diff --creation-factor for format-patch”
  1. Use a higher range-diff --creation-factor for format-patchÆvar Arnfjörð Bjarmason, Mar 15, 2019
  2. Eric SunshineMar 15, 2019
  3. Ævar Arnfjörð BjarmasonMar 15, 2019
  4. Johannes SchindelinMar 21, 2019
  5. Junio C HamanoMar 18, 2019

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.