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

Re: git-push [--all] and tags

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Oct 7, 2007, 16:39 UTC
Message-ID
<alpine.LFD.0.999.0710070929340.23684@woody.linux-foundation.org>
In-Reply-To
<20071007093636.GA3568@lapse.madduck.net>
On Sun, 7 Oct 2007, martin f krafft wrote:
Show 6 quoted lines
> 
> So am I right if I say that all the logic should really be happening
> in send-pack and that push is really just an interface when it comes
> to selecting the refs to push, so it should basically feed through
> the options and refs, meaning that send-pack should get --tags and
> --shared as well?

I really don't have any strong personal opinions. I don't think anybody is ever supposed to use send-pack directly, so I don't think it really much matters whether send-pack is taught to do all the helper options too, or whether it should just get the list of refs..

But yes, I suspect it would be cleanest to just remove the "expand --tags" logic from builtin-push, and make the actual sending side do that.

> Or should push enumerate all refs needed and pass them directly to
> send-pack, effectively making send-pack's --all option obsolete?

I don't think this works very well - builtin-push doesn't even know what the remote branches _are_, so it cannot list "these branches are shared". So we'd always have to have that shared behaviour embedded in send-pack anyway, so I think the most logical thing is to also do the logic for --all and --tags there.

IOW, builtin-push would just be a wrapper around send-pack, doing the "for each remote" thing, but just passing down all/tags/shared.

		Linus
Previous: martin f krafft
Message 5 of 5 in “git-push [--all] and tags”
  1. martin f krafftOct 6, 2007
  2. Sam VilainOct 7, 2007
  3. Linus TorvaldsOct 7, 2007
  4. martin f krafftOct 7, 2007
  5. Linus TorvaldsOct 7, 2007

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.