Re: [PATCH 02/21] read-cache.c: remove 'const' from index_has_changes()

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

 



On Sun, Aug 26, 2018 at 3:03 AM Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> wrote:
>
> This function calls do_diff_cache() which eventually needs to set this
> "istate" to unpack_options->src_index (*). This is an unfornate fact

unfortunate

> diff --git a/diff.c b/diff.c

Unlike I thought in the cover letter, this is just adding the repository all
over the place and not adding new code, despite the size.

A cursory read seems to make sense, though I'd nitpick on the
choice of the variable name as I used to use 'r' for the repository
struct. I am not saying that is better, but we could think if we want to
strive for some consistency eventually. (for example most strbufs are
named 'sb', as they are temporary helpers with no explicit naming
required. So maybe we could strive to name all "repository pass throughs"
to be "repo" or "r").

It's sad to see the diff code invaded by the need of the_repository, but
the dependency is there, so it is better to have it explicit than implicit.

Thanks,
Stefan




[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