From: Linus Torvalds <torvalds@linux-foundation.org>
To: Sam Vilain <sam@vilain.net>
Cc: martin f krafft <madduck@madduck.net>,
git discussion list <git@vger.kernel.org>
Subject: Re: git-push [--all] and tags
Date: Sat, 6 Oct 2007 18:26:45 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.0.999.0710061814310.23684@woody.linux-foundation.org> (raw)
In-Reply-To: <47083035.7070904@vilain.net>
On Sun, 7 Oct 2007, Sam Vilain wrote:
>
> Think is, pushing tags is considered to be something that needs to be
> done very explicitly; the convention, after all, is that published tags
> are forever. Whereas branches change all the time. So, pushing tags
> should require an extra flag.
Well, I agrewe with Martin, and I think you missed his point.
Sure, pushing tags should require you to say so explicitly, but right now
you cannot (for example) push *both* the common branches *and* tags
easily.
You can do
git push
to push common branches, and you can do
git push --tags
to push tags, but there's no way to say "push both the common branches
_and_ all tags".
(And the same is true of "--all" and "--tags").
So I do think Martin is right. I think we should:
- make sure that "--all --tags" DTRT, namely send all branches and all
tags. Right now they are actually very similar things (one works on
"refs/heads", while the other works on "refs/tags"), but they are
implemented using *totally* different logic, and they don't work
together.
- I think it would be a good idea to implement a "--shared" flag, which
is the current default behavior when there are no command line flags,
and there are no listed branches to push in the config file. That would
allow doing "git push --shared --tags" to update shared branches _and_
tags, but it would probably *also* make it easier to explain the
default behaviour of "git push", by making the behavior more explicit.
(IOW, you can introduce the notion of "--shared updates all branches
that exists both locally and remotely under the same names" separately
early on as a command line option, and then later just explain that if
there is nothing else telling git what to push, it will default to
that shared branch behavior)
Hmm? I do agree with "git push" as it now stands has a lot of warts,
although I don't really agree with the people who want to change the
default behavior.
Linus
next prev parent reply other threads:[~2007-10-07 1:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-06 16:05 git-push [--all] and tags martin f krafft
2007-10-07 1:02 ` Sam Vilain
2007-10-07 1:26 ` Linus Torvalds [this message]
2007-10-07 9:36 ` martin f krafft
2007-10-07 16:39 ` Linus Torvalds
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.0.999.0710061814310.23684@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=git@vger.kernel.org \
--cc=madduck@madduck.net \
--cc=sam@vilain.net \
/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.
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 NNTP newsgroup(s).