Re: [PATCH 7/7] push: document --lockref

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 09.07.2013 21:53, schrieb Junio C Hamano:
> +--lockref::
> +--lockref=<refname>::
> +--lockref=<refname>:<expect>::
> ...
> +This is meant to make `--force` safer to use.

This is a contradiction. "--force" means "I mean it, dude", and not "I
mean it sometimes". It would make sense if this sentence were "This is
meant to make `+refspec` safer to use."

Do you intend to require users to opt in to safety by saying --lockref
until the end of time? Which makes it actually usable only for scripts
and aliases. How do you override when the safety triggers, e.g., in an
alias that uses --force --lockref? Add --i-really-mean-it?

Or do we want to make --lockref the default at least for cases where
necessary ingredients can be derived automatically, perhaps in Git 3.0?
Then, how do you override when the safety triggers? Add --i-really-mean-it?

IMO, the way forward is:

1. Teach users to use +refspec to force-push. Do not encourage 'push
--force'.

2. Add --lockref as an opt-in for +refspec. Do not apply the safety to
'push --force'. (Current users and scripts do not see a behavior change
because they do not use --lockref, either.)

3. Make --lockref behavior the default at least for +refspec. Then 'push
--force' is still able to override the safety.

-- Hannes

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]