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

Re: [PATCH] Add config variable besides env variable to squelch "do-not-use" warning.

From
Elijah Newren <newren@gmail.com>
Date
Jun 16, 2021, 08:03 UTC
Message-ID
<CABPp-BFiD5eYNXsRk=f-5k4oDeCHBW7_pd8iqYYBKsrd6evC9g@mail.gmail.com>
In-Reply-To
<xmqqy2baqvxv.fsf@gitster.g>
On Tue, Jun 15, 2021 at 9:23 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 25 quoted lines
>
> "Daniel Höpfl via GitGitGadget"  <gitgitgadget@gmail.com> writes:
>
> > From: =?UTF-8?q?Daniel=20H=C3=B6pfl?= <daniel@hoepfl.de>
> >
> > In addition to the environment variable FILTER_BRANCH_SQUELCH_WARNING,
> > the git config filter-branch.squelchWarning is checked to see if the
> > usage warning should be squelched.
>
> Thanks for trying to improve the system.
>
> A configuration variable that is used to squelch warning messages
> related to migration and transition typically lives under advice.*
> hierarchy, so something ike "advice.weanOffOfFilterBranch" may be a
> more appropriate name for this new knob.
>
> Having said that.
>
> As this message with environment as an escape hatch was added as a
> way to strongly discourage users from keep using the command, I am
> fairly negative to a change that adds yet another way to make it
> easier to keep using it.
>
> Elijah, who did 9df53c5d (Recommend git-filter-repo instead of
> git-filter-branch, 2019-09-04), added to CC list for input.
Yeah, I generally would like to discourage it but...

Back when we put this strong discouragement and escape hatch in, I wasn't aware of anything that could be done in filter-branch that was hard to do in filter-repo. However, since then, a user reported they wanted to re-sign commits after a rewrite. Since fast-import does not (currently) provide a way to sign commits, and filter-repo is built on top of fast-export and fast-import, this makes it rather difficult for filter-repo to do. (I think it still can, given all the shenanigans I did to create filter-branch-ish as a rewrite of filter-branch on top of filter-repo, but that comes with nearly all the same caveats as filter-branch if used directly, and is a huge amount of code to lift to try to use outside of filter-branch-ish.)

Since there's a valid use for filter-branch (even if rare) that isn't readily done in filter-repo, adding the option Daniel requests makes sense.

Previous: Junio C Hamano
Message 3 of 3 in “Add config variable besides env variable to squelch "do-not-use" warning.”
  1. Add config variable besides env variable to squelch "do-not-use" warning.Daniel Höpfl via GitGitGadget, Jun 15, 2021
  2. Junio C HamanoJun 16, 2021
  3. Elijah NewrenJun 16, 2021

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.