Re: How do I "git fetch" with a custom <refspec> but a default remote?
- From
Jeff King <peff@peff.net>
- Date
- Nov 12, 2020, 20:48 UTC
- Message-ID
- <20201112204802.GA707750@coredump.intra.peff.net>
- In-Reply-To
- <CAPx1Gvckixj2hj5wL8EPpJbnp4rsV7-qnVUCG1d-UAqVtp-H-Q@mail.gmail.com>
On Thu, Nov 12, 2020 at 11:26:25AM -0800, Chris Torek wrote:
Show 14 quoted lines
> On Thu, Nov 12, 2020 at 10:52 AM Jeff King <peff@peff.net> wrote: > > If we were starting from scratch, then I think that might have been > > nicer, because --default-remote would be implied if there is no > > "--remote" option. And then my lazy-to-type: > > > > git fetch topic > > > > would just work. But given that we have the positional <remote> > > parameter already, I don't think adding --remote gives much value. And > > it raises the question of what "git fetch --remote=foo --remote=bar" > > means (I think the answer is last-one-wins). > > Since `git fetch` can fetch from more than one remote, it seems to me > to make more sense to mean "fetch from each".
Ah, right, I forgot that --multiple existed. Without it, specifying multiple remotes makes no sense at all. But perhaps giving multiple --remote would implicitly specify "--multiple". That makes sense to me.
> (This isn't necessarily an argument in favor of adding these options, > just my suggestion for what multiple `--remote=` settings would mean.)
Likewise. "makes sense" above mostly means I would not object to it, but I am not advocating for it. :)
-Peff