From: Jay Soffian <jaysoffian@gmail.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [RFC] add test cases for the --repo option to git push
Date: Fri, 27 Feb 2009 15:48:18 -0500 [thread overview]
Message-ID: <76718490902271248p2de44082ka66645203c9683d4@mail.gmail.com> (raw)
In-Reply-To: <49A7C3A7.6060202@drmicha.warpmail.net>
On Fri, Feb 27, 2009 at 5:42 AM, Michael J Gruber
<git@drmicha.warpmail.net> wrote:
> bcc785f (git push: add verbose flag and allow overriding of default
> target repository, 2006-10-30) Linus introduces --repo.
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>
Which is why I sent the original message that has spawned this saga. :-)
Here's the abbreviated code in question:
const char *repo = "origin"; /* default repository */
for (i = 1; i < argc; i++) {
const char *arg = argv[i];
if (arg[0] != '-') {
repo = arg;
i++;
break;
}
if (!strncmp(arg, "--repo=", 7)) {
repo = arg+7;
continue;
}
}
set_refspecs(argv + i, argc - i);
return do_push(repo);
--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?
j.
next prev parent reply other threads:[~2009-02-27 20:49 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 [this message]
2009-02-27 21:00 ` Linus Torvalds
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=76718490902271248p2de44082ka66645203c9683d4@mail.gmail.com \
--to=jaysoffian@gmail.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=torvalds@linux-foundation.org \
/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).