From: Junio C Hamano
>
> Junio C Hamano writes:
>
> Having said all that, it appears that nobody seems to be able to
> come up with a saner arrangement that would not paint us into a
> tough corner that we would not be able to later escape from without
> being backward incompatible---I certainly
Junio C Hamano writes:
> Junio C Hamano writes:
>
> What is the right mental model the end-user needs to form when
> understanding these? Conditions on keys go on the left, and any
> other random conditions can come as a modifier after action
> e.g. add_if_same_value_is_not_at_the_end?
Having
Junio C Hamano writes:
> That is, you are saying with the above
>
> if_exists = add_if_different AND ignore_if_same
>
> So you already have to support more than one actions depending on
> the condition, ...
> of conditions, I think. Which is essentially the same as saying
> that you need th
Christian Couder writes:
> but we also want to say:
>
> action = do_Y_if_X_and_Z AND do_U_if_V
>
> For example some people might want:
>
> if_exists = overwrite
> if_missing = add
>
> while others might want:
>
> if_exists = overwrite
> if_missing = do_nothing
>
> and I don't
>> For example, how would you express something like this only with
>> "if-exists" vs "if-missing"?
>>
>> if_exists_exactly = ignore
>> if_exists_with_different_value = append
>> if_missng = prepend_to_the_beginning
>
> First, previously in the discussion you said that you did
From: Junio C Hamano
>
> Christian Couder writes:
>
>> For example some people might want:
>>
>> if_exists = overwrite
>> if_missing = add
>>
>> while others might want:
>>
>> if_exists = overwrite
>> if_missing = do_nothing
>>
>> and I don't see how we can say that with just:
>>
Christian Couder writes:
> For example some people might want:
>
> if_exists = overwrite
> if_missing = add
>
> while others might want:
>
> if_exists = overwrite
> if_missing = do_nothing
>
> and I don't see how we can say that with just:
>
> action = do_Y_if_X_and_Z
Yes, bu
From: Junio C Hamano
>
> These numerous questions you have to ask are indications why
> choosing "this condition goes to the left hand side of the equal
> sign (e.g. exists)" and "this condition goes to the right hand side
> (e.g. do-this-if_neighbor)" is not working well. The user has to
> remem
Christian Couder writes:
>> Even if we assume, for the sake of discussion, that it *is* a good
>> idea to separate "under this condition" part and "do this" part, I
>> do not think the above is the only or the best way to express
>> "distinct values allowed for the same key". How do we argue tha
On Mon, Feb 10, 2014 at 9:51 PM, Junio C Hamano wrote:
> Christian Couder writes:
>
>> Many entries with the same key but distinct values can be configured
>> using:
>>
>> if_exists = add_if_different
>> if_missing = add
>>
>> Many entries with the same key but values that can be the same can be
Christian Couder writes:
> Many entries with the same key but distinct values can be configured
> using:
>
> if_exists = add_if_different
> if_missing = add
>
> Many entries with the same key but values that can be the same can be
> configured using:
>
> if_exists = add
> if_missing = add
While
From: Junio C Hamano
Subject: Re: [PATCH v5 02/14] trailer: process trailers from file and arguments
Date: Mon, 10 Feb 2014 10:14:34 -0800
> Christian Couder writes:
>
>> This is what "if_exists" and "if_missing" are all about.
>>
>> Either:
>>
Christian Couder writes:
> This is what "if_exists" and "if_missing" are all about.
>
> Either:
>
> the same key already exists regardless of the value
>
> and, in this case, what happens depends on what has been specified using
> the "if_exists" configuration variable.
>
> Or:
>
> th
From: Junio C Hamano
>
> Christian Couder writes:
>
>> +static void apply_arg_if_exist(struct trailer_item *infile_tok,
>> + struct trailer_item *arg_tok,
>> + int alnum_len)
>> +{
>> +switch (arg_tok->conf->if_exist) {
>> +case EXIST_D
Christian Couder writes:
> This patch implements the logic that process trailers
> from file and arguments.
>
> At the beginning trailers from file are in their own
> infile_tok doubly linked list, and trailers from
> arguments are in their own arg_tok doubly linked list.
>
> The lists are traver
This patch implements the logic that process trailers
from file and arguments.
At the beginning trailers from file are in their own
infile_tok doubly linked list, and trailers from
arguments are in their own arg_tok doubly linked list.
The lists are traversed and when an arg_tok should be
"applie
16 matches
Mail list logo