git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Jay Soffian <jaysoffian@gmail.com>
Cc: Michael J Gruber <git@drmicha.warpmail.net>,
	Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org
Subject: Re: [RFC] add test cases for the --repo option to git push
Date: Fri, 27 Feb 2009 13:00:21 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.2.00.0902271255530.3111@localhost.localdomain> (raw)
In-Reply-To: <76718490902271248p2de44082ka66645203c9683d4@mail.gmail.com>



On Fri, 27 Feb 2009, Jay Soffian wrote:
> 
> So I still don't get why Linus introduced the option. I'm looking at
> bcc785f:builtin-push.c and AFAICT, the following are exactly
> equivalent:
> 
> $ git push [options]... <repo>
> $ git push [options]... --repo=<repo>

Yes. 

But now do

	[alias]
		push-all=push all

and then try to add those options AFTERWARDS!

> --repo can be placed anywhere on the command line, but other than
> that, it's identical in effect to specifying the repo as the first
> non-dashed argument.
> 
> Or am I completely blind?

It's the "placed anywhere on the command line" that is the important part.

Try 

	git push-all --tags

and it didn't use to work without "--repo=all".

Of course, I think it works now, because I think "git push" uses 
"parse_options" these days, so now "--tags" actually works even after the 
repository definition. So _these_ days, you can just do

	git push all --tags

but that was not true historically. Back then, if you wanted to use an 
alias (which mean that the repo was named _before_ the arguments), you 
needed to do

	git push --repo=all --tags

because putting "--tags" after the repository name wouldn't work.

So _today_, we could remove the use of "--repo". But today, we have 
another reason to do "--repo" - compatibility.

		Linus

  reply	other threads:[~2009-02-27 21:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-20  9:16 git push usage Jay Soffian
2009-02-21  9:32 ` Jay Soffian
2009-02-24 17:40   ` [RFC] add test cases for the --repo option to git push Michael J Gruber
2009-02-25 21:58     ` Junio C Hamano
2009-02-26  9:26       ` Michael J Gruber
2009-02-26 17:09         ` Junio C Hamano
2009-02-26 17:48           ` Michael J Gruber
2009-02-26 22:11             ` Jay Soffian
2009-02-27 10:42           ` Michael J Gruber
2009-02-27 17:34             ` Junio C Hamano
2009-02-27 20:48             ` Jay Soffian
2009-02-27 21:00               ` Linus Torvalds [this message]
2009-02-27 21:21                 ` Jay Soffian

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.2.00.0902271255530.3111@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jaysoffian@gmail.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.
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).