git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Francesco Mazzoli <f@mazzo.li>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] push: add config option to --force-with-lease by default.
Date: Tue, 04 Jul 2017 00:28:00 +0200	[thread overview]
Message-ID: <87wp7pb1fz.fsf@gmail.com> (raw)
In-Reply-To: <87y3s5b204.fsf@gmail.com>


On Mon, Jul 03 2017, Ævar Arnfjörð Bjarmason jotted:

> On Mon, Jul 03 2017, Francesco Mazzoli jotted:
>
> A couple of things I didn't notice at first:

Oh and also, makes sense to add tests for this, see
t/t5533-push-cas.sh. I.e. just make sure the cases where the option
works work with the config, and that the option overrides the config
etc.

>>  	git_config(git_push_config, &flags);
>> +	if (push_always_force_with_lease) {
>> +		cas.use_tracking_for_rest = 1;
>> +	}
>
> This should go in git_push_config.
>
>> +	if (!strcmp(var, "push.alwaysforcewithlease")) {
>> +		push_always_force_with_lease = git_config_bool(var, value);
>> +		return 0;
>> +	}
>
> [As you noted on IRC] --force-with-lease takes args, but yours
> doesn't. Arguably this makes no sense whatsoever to have in the config,
> but something worth pointing out in the commit message.
>
> We could make the config accept args, you'd call
> parse_push_cas_option(), but should we? I don't know.
>
> Should this also apply to send-pack's --force-with-lease? Under the same
> option name or send-pack.forceWithLease? I also don't know...

  reply	other threads:[~2017-07-03 22:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-03 21:18 [PATCH] push: add config option to --force-with-lease by default Francesco Mazzoli
2017-07-03 21:47 ` Ævar Arnfjörð Bjarmason
2017-07-03 21:57   ` Francesco Mazzoli
2017-07-03 22:08   ` Francesco Mazzoli
2017-07-03 22:15 ` Ævar Arnfjörð Bjarmason
2017-07-03 22:28   ` Ævar Arnfjörð Bjarmason [this message]
2017-07-04 17:51 ` Junio C Hamano
2017-07-05  6:34   ` Francesco Mazzoli
2017-07-05  7:43     ` Junio C Hamano
2017-07-05  8:04       ` Francesco Mazzoli
2017-07-05 15:17         ` Junio C Hamano
2017-07-05 16:43           ` Francesco Mazzoli
2017-07-05 18:51             ` Mike Rappazzo
2017-07-06 19:13             ` Junio C Hamano
2017-07-07  6:19               ` Francesco Mazzoli
2017-07-05 11:26       ` Ævar Arnfjörð Bjarmason
2017-07-05 15:48         ` Ævar Arnfjörð Bjarmason

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=87wp7pb1fz.fsf@gmail.com \
    --to=avarab@gmail.com \
    --cc=f@mazzo.li \
    --cc=git@vger.kernel.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).