From: Felipe Contreras <felipe.contreras@gmail.com>
To: Richard Hansen <rhansen@bbn.com>,
Felipe Contreras <felipe.contreras@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH 1/9] transport-helper: add 'force' to 'export' helpers
Date: Sun, 22 Sep 2013 21:39:27 -0500 [thread overview]
Message-ID: <523fa9df8ed1b_5c910e3e801fa@nysa.mail> (raw)
In-Reply-To: <523FAA59.6040200@bbn.com>
Richard Hansen wrote:
> On 2013-08-29 11:23, Felipe Contreras wrote:
> > Otherwise they cannot know when to force the push or not (other than
> > hacks).
> >
> > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> > ---
> > transport-helper.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/transport-helper.c b/transport-helper.c
> > index 63cabc3..62051a6 100644
> > --- a/transport-helper.c
> > +++ b/transport-helper.c
> > @@ -814,6 +814,9 @@ static int push_refs_with_export(struct transport *transport,
> > die("helper %s does not support dry-run", data->name);
> > }
> >
> > + if (flags & TRANSPORT_PUSH_FORCE)
> > + set_helper_option(transport, "force", "true");
>
> Should the return value of set_helper_option() be checked?
Yeah, it would make sense. I guess we want to die() if the user does
'git push -f' and the remote helper doesn't support that.
> Also, should there be a #define TRANS_OPT_FORCE "force" with
I don't see the point of that. Defines are useful when you want to change the
value string, so you don't have to change the string everywhere, but we
definitely don't want to do that, as that would break backwards compatibility,
so TRANS_OPT_KEEP would always be "keep" so it's just a way to tire our
fingers.
> TRANS_OPT_FORCE added to boolean_options[]?
I don't see how that would help us, the only thing that would achieve is to map:
set_helper_option(transport, "force", 1);
to
set_helper_option(transport, "force", "true");
But we are already doing that.
Moreover, the code is already doing something similar for all the other options.
set_helper_option(t, "progress", t->progress ? "true" : "false");
set_helper_option(t, "verbosity", buf);
set_helper_option(transport, "servpath", exec);
set_helper_option(transport, "dry-run", "true");
--
Felipe Contreras
next prev parent reply other threads:[~2013-09-23 2:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-29 15:23 [PATCH 0/9] transport-helper: updates Felipe Contreras
2013-08-29 15:23 ` [PATCH 1/9] transport-helper: add 'force' to 'export' helpers Felipe Contreras
2013-09-23 2:41 ` Richard Hansen
2013-09-23 2:39 ` Felipe Contreras [this message]
2013-08-29 15:23 ` [PATCH 2/9] transport-helper: check for 'forced update' message Felipe Contreras
2013-08-29 15:23 ` [PATCH 3/9] fast-export: improve argument parsing Felipe Contreras
2013-08-29 15:23 ` [PATCH 4/9] fast-export: add new --refspec option Felipe Contreras
2013-09-23 1:59 ` Richard Hansen
2013-09-23 2:35 ` Felipe Contreras
2013-08-29 15:23 ` [PATCH 5/9] transport-helper: add support for old:new refspec Felipe Contreras
2013-08-29 15:23 ` [PATCH 6/9] fast-import: add support to delete refs Felipe Contreras
2013-08-29 15:23 ` [PATCH 7/9] fast-export: " Felipe Contreras
2013-08-29 15:23 ` [PATCH 8/9] transport-helper: add support to delete branches Felipe Contreras
2013-09-23 1:50 ` Richard Hansen
2013-09-23 2:34 ` Felipe Contreras
2013-08-29 15:23 ` [PATCH 9/9] transport-helper: don't update refs in dry-run Felipe Contreras
2013-08-29 19:22 ` [PATCH 0/9] transport-helper: updates Junio C Hamano
2013-08-29 19:26 ` Felipe Contreras
2013-09-23 1:49 ` Richard Hansen
2013-09-23 2:32 ` Felipe Contreras
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=523fa9df8ed1b_5c910e3e801fa@nysa.mail \
--to=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=rhansen@bbn.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).