From: Andy Whitcroft <apw@shadowen.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
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 15:21:15 +0100 [thread overview]
Message-ID: <20071002142115.GC14110@shadowen.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0710021347530.28395@racer.site>
On Tue, Oct 02, 2007 at 01:50:28PM +0100, Johannes Schindelin wrote:
> 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.
Yep, that does seem cleaner.
> > @@ -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?
I should have mentioned I'd not even reviewed it as the basic underlying
functionality seemed to be broken. I'll look over it if I get a chance
to try and debug the underlying failure.
-apw
prev parent reply other threads:[~2007-10-02 14:21 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
2007-10-02 14:21 ` Andy Whitcroft [this message]
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=20071002142115.GC14110@shadowen.org \
--to=apw@shadowen.org \
--cc=Johannes.Schindelin@gmx.de \
--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).