From: Tamino Bauknecht <dev@tb6.eu>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] fetch: add new config option fetch.all
Date: Thu, 4 Jan 2024 21:18:02 +0100 [thread overview]
Message-ID: <70f17f0c-2226-41eb-ae08-348c794a3411@tb6.eu> (raw)
In-Reply-To: <xmqqv8896jqo.fsf@gitster.g>
On 1/4/24 19:23, Junio C Hamano wrote:> This sounds like a usability
annoyance for forks that use --all some
> of the time and not always, as they now have to remember not just to
> pass something to countermand the configured fetch.all but what that
> something exactly is (i.e., the name of the remote they fetch from
> by default), which makes fetch.all less appealing. I wonder if we
> can instead take "--no-all" from the command line to make configured
> fetch.all ignored (hence, giving an explicit remote will fetch from
> there, and not giving any remote will fetch from whereever the
> command will fetch from with "git -c fetch.all=false fetch")?
I don't think I fully understand the scenario you describe here.
But I see that the change would disallow users to fetch only the default
remote without its name in a straight-forward way - either your proposed
solution to overrule the config value or using something like
`git config "branch.$(git branch --show-current).remote"` in combination
with `git fetch` would be workarounds.
Do you think it is worth adding a flag for it? I can't really think of a
real-world use case for it. E.g. the config option "fetch.prune" also
doesn't have anything to counteract it (as far as I see).
If a flag is necessary, I think something like "--default-only" (or
similar) might be more descriptive than "--no-all".
> Missing sign-off.
Sorry, thanks for pointing it out.
> And we should say that this configuration variable defaults to false.
Will do so.
> This conditional cascade will probably need to change when we allow
> "--no-all" to countermand the configured fetch.all anyway, so I
> won't worry about it now, but it looks somewhat convoluted that we
> have to re-check "all" many times, which was the point of the
> original that implemented this as a nested conditional.
It's probably because of the tab width of 8 that I feel like three
indentation levels are already too much. I'll use Taylor's suggestion to
keep the `argc` check as-is (although two checks will still be necessary).
As an alternative I thought about modifying the current behavior of
"--all" in combination with an explicit remote as well, but discarded
that idea because it might be less intuitive than the error.
next prev parent reply other threads:[~2024-01-04 20:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 20:15 new config option "fetch.all" Tamino Bauknecht
2024-01-04 14:33 ` [PATCH] fetch: add new config option fetch.all Tamino Bauknecht
2024-01-04 17:33 ` Taylor Blau
2024-01-04 18:04 ` Eric Sunshine
2024-01-04 18:29 ` Junio C Hamano
2024-01-04 18:32 ` Tamino Bauknecht
2024-01-04 19:13 ` Taylor Blau
2024-01-04 18:23 ` Junio C Hamano
2024-01-04 20:18 ` Tamino Bauknecht [this message]
2024-01-04 20:49 ` Junio C Hamano
2024-01-04 20:25 ` Tamino Bauknecht
2024-01-04 20:50 ` Eric Sunshine
2024-01-04 20:55 ` Eric Sunshine
2024-01-04 22:22 ` [PATCH v2 1/2] " Tamino Bauknecht
2024-01-04 22:22 ` [PATCH v2 2/2] fetch: add cli option --default-only Tamino Bauknecht
2024-01-05 2:43 ` Eric Sunshine
2024-01-05 16:13 ` Junio C Hamano
2024-01-06 20:17 ` [PATCH v3] fetch: add new config option fetch.all Tamino Bauknecht
2024-01-06 23:32 ` Eric Sunshine
2024-01-06 23:37 ` Eric Sunshine
2024-01-08 17:25 ` Junio C Hamano
2024-01-08 21:13 ` [PATCH] " Tamino Bauknecht
2024-01-05 1:02 ` [PATCH v2 1/2] " Eric Sunshine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=70f17f0c-2226-41eb-ae08-348c794a3411@tb6.eu \
--to=dev@tb6.eu \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).