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

Re: [PATCH] git remote update: New option --prune (-p)

From
Jeff King <peff@peff.net>
Date
Apr 2, 2009, 16:32 UTC
Message-ID
<20090402163213.GA28261@coredump.intra.peff.net>
In-Reply-To
<9b18b3110904020907i23f246aelccc2a0770acc2574@mail.gmail.com>
On Thu, Apr 02, 2009 at 06:07:33PM +0200, demerphq wrote:
Show 6 quoted lines
> Er, personally i find that documentation pretty cryptic. And when i
> check git config for group, i see this:
> 
>        remotes.<group>
>            The list of remotes which are fetched by "git remote update
>            <group>". See git-remote(1).

Yeah, this should probably say "separated by space" or whatever (I actually don't even know). I would assume it contains the remote name; I can't imagine what other thing it would include. But it wouldn't hurt to make that more explicit.

I'm sure a documentation patch would be welcome.
Show 10 quoted lines
>        remote.<name>.skipDefaultUpdate
>            If true, this remote will be skipped by default when updating using
>            the update subcommand of git-remote(1).
>
> Neither of which really explain groups, how to define them properly,
> (the list is separated by what? and includes the remote name?) or
> whether there are implicit groups. I mean, it seems logical that if
> you can have user defined groups that there are some built in ones
> too, like "all" and "none" or perhaps groups defined by transport
> "http" or "git" for instance.

I think what is confusing is that there is exactly one implicit group, and it is "the default group", which contains every remote that doesn't have skipDefaultUpdate set. You refer to the "default group" by not mentioning any group.

So no, there aren't other implicit groups (AFAIK).

You can propose implicit groups, but I think they would have to have a compelling use case over simply creating them manually. To avoid conflict with groups people have already defined, they would only be used if no remotes.$whatever config existed.

I think having "git remote update foo" fall back to a group containing only the remote "foo" when "remotes.foo" does not exist makes sense. I'm not sure that "none", "http", or "git" is all that useful in practice (the only thing I can think of for the latter two is that you might use "git" versus "http" depending on restrictive firewall settings).

You could give the unnamed "default group" a name (like "all"), but then you risk conflict with existing "remotes.all". And in this case, it is hard to remain backwards compatible: "git remote update" will do something different now in the case that the user has configured remotes.all.

-Peff
Previous: demerphqNext: demerphq
Message 7 of 15 in “git remote update: New option --prune (-p)”
  1. git remote update: New option --prune (-p)Finn Arne Gangstad, Apr 2, 2009
  2. demerphqApr 2, 2009
  3. Jeff KingApr 2, 2009
  4. demerphqApr 2, 2009
  5. Jeff KingApr 2, 2009
  6. demerphqApr 2, 2009
  7. Jeff KingApr 2, 2009
  8. demerphqApr 2, 2009
  9. Junio C HamanoApr 2, 2009
  10. Finn Arne GangstadApr 2, 2009
  11. Junio C HamanoApr 2, 2009
  12. 0/2 git remote update: New option --prune (-p)Finn Arne Gangstad, Apr 3, 2009
  13. 1/2 builtin-remote.c: Split out prune_remote as a separate function.Finn Arne Gangstad, Apr 3, 2009
  14. 2/2 git remote update: New option --pruneFinn Arne Gangstad, Apr 3, 2009
  15. Junio C HamanoApr 5, 2009

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.