Re: [RFC/ PATCH] revert: Allow arbitrary sequencer instructions

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

 



Hi Jonathan,

Jonathan Nieder writes:
> Ramkumar Ramachandra wrote:
>> --- a/sequencer.h
>> +++ b/sequencer.h
>> @@ -32,6 +32,16 @@ struct replay_opts {
>>       size_t xopts_nr, xopts_alloc;
>>  };
>>
>> +struct replay_insn {
>> +     struct commit *commit;
>> +     enum replay_action action;
>> +};
>> +
>> +struct replay_insn_list {
>> +     struct replay_insn *item;
>> +     struct replay_insn_list *next;
>> +};
>
> Ah, so this allows sequences like
>
>        revert A
>        pick B
>        pick C
>        revert D

Exactly.

> Nit: why isn't the list-item struct something like
>
>        struct replay_insn item;
>        struct replay_insn_list *next;
>
> which would save a little memory management and memory access
> overhead (or even
>
>        enum replay_action action;
>        struct commit *operand;
>        struct replay_insn_list *next;
>
> since every "struct replay_insn" exists in the context of an
> insn list afaict)?

Right.  Good suggestion.

> Anyway, the general idea seems good.

Nice.  Thanks for the quick early feedback.  Much appreciated.

-- Ram
--
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]