Re: [PATCH 6/8] receive-pack.c: add a receive.preferatomicpush configuration variable

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

 



On Thu, Oct 30, 2014 at 1:11 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Ronnie Sahlberg <sahlberg@xxxxxxxxxx> writes:
>
>> Add receive.preferatomicpush setting to receive-pack.c. This triggers
>> a new capability "prefer-atomic-push" to be sent back to the send-pack
>> client, requesting the client, if it supports it, to request
>> an atomic push.
>
> I can understand a configuration that says "We take only atomics
> when a push tries to update more than one", but this one is iffy.
>
> If the receiver accepts non-atomic from older send-pack, those with
> newer send-pack should have a way to say "the receiving end may
> prefer atomic, but I choose not to."  Is there a way to do so?

There is no way to do so right now.
I can add a --no-atomic-push argument to the client to make it ignore
this hint from the server.

>
> And if there is such a way, what value does the preference add to
> the user experience and the server's operation?
>

The reason for this preference was to make it possible to flag a
repository to always try to make all pushes atomic, when possible.
A preference for convenience. You could set on the server to try to
make all pushes atomic so that clients do not have to specify
--atomic-push all the time.


Currently this is just a hint on from the server and is not enforced
for backward compatibility reasons.
If the client does not have atomic push support, the client will
ignore this hint and just do a normal push instead.


This is the least important part in this patch series so I am open for advice :
1, I can remove this patch/preference if you prefer.
or
2a, I can add a --no-atomic-push flag to send-pack to have a way to
force the client to do a normal nonatomic push even if the server
indicates it wants atomic pushes.
and/or
2b, I can add another preference  receive.requireatomicpush to the
server so that the server can reject any push outright if it is not
atomic.


At some stage it may becomes too many preferences and over-engineered.
Maybe I should drop this patch and then just require the plain "if you
want a push to be atomic, then use --atomic-push. end." and we have
simple and easy to understand semantics.


Please advise.


Regards
Ronnie Sahlberg
--
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]