Re: [PATCH v2 02/10] merge-ort: add a special minimal index just for renormalization

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

 



On 3/9/2021 1:24 AM, Elijah Newren via GitGitGadget wrote:
> From: Elijah Newren <newren@xxxxxxxxx>
> 
> renormalize_buffer() requires an index_state, which is something that
> merge-ort does not operate with.  However, all the renormalization code
> needs is an index with a .gitattributes file...plus a little bit of
> setup.  Create such an index, along with the deallocation and
> attr_direction handling.
> 
> A subsequent commit will add a function to finish the initialization
> of this index.

Is this the best way to solve this problem? Shouldn't we extract the
logic that interacts with the .gitattributes file from
renormalize_buffer() (say, to renormalize_buffer_attributes()) and
just pass the .gitattributes file instead of creating a fake index?

It probably moves more code to do it the way I recommend, but it
helps to separate the concerns a bit better. Of course, I haven't
tried doing it myself, so maybe it's harder than I think.
 
Thanks,
-Stolee



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

  Powered by Linux