From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Andy Whitcroft <apw@shadowen.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] git-push: plumb in --mirror mode
Date: Tue, 2 Oct 2007 13:50:28 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0710021347530.28395@racer.site> (raw)
In-Reply-To: <20071002120051.GC30636@shadowen.org>
Hi,
On Tue, 2 Oct 2007, Andy Whitcroft wrote:
> @@ -137,5 +144,10 @@ int cmd_push(int argc, const char **argv, const char *prefix)
> if (all && refspec)
> usage(push_usage);
>
> + if (modes_specified > 1) {
> + error("--all and --mirror are incompatible");
> + usage(push_usage);
> + }
> +
Why not
if ((flags & TRANSPORT_PUSH_ALL) && (flags & TRANSPORT_PUSH_MIRROR))?
It's more explicit.
> @@ -667,6 +673,8 @@ static int git_transport_push(struct transport *transport, int refspec_nr, const
> argv[argc++] = "--all";
> if (flags & TRANSPORT_PUSH_FORCE)
> argv[argc++] = "--force";
> + if (flags & TRANSPORT_PUSH_MIRROR)
> + argv[argc++] = "--mirror";
> if (data->receivepack) {
> char *rp = xmalloc(strlen(data->receivepack) + 16);
> sprintf(rp, "--receive-pack=%s", data->receivepack);
Shouldn't you then increment the "11" a few lines before that, to ensure
enough space for the new argument?
Ciao,
Dscho
next prev parent reply other threads:[~2007-10-02 12:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-02 7:55 mirror pushing Junio C Hamano
2007-10-02 11:59 ` Andy Whitcroft
2007-10-02 12:00 ` [PATCH] git-push: plumb in --mirror mode Andy Whitcroft
2007-10-02 12:50 ` Johannes Schindelin [this message]
2007-10-02 14:21 ` Andy Whitcroft
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=Pine.LNX.4.64.0710021347530.28395@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=apw@shadowen.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).