Re: [PATCH v5 1/6] last-modified: new subcommand to show when files were last modified

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

 



Christian Couder <christian.couder@xxxxxxxxx> writes:

> On Fri, Jul 18, 2025 at 2:02 AM Taylor Blau <me@xxxxxxxxxxxx> wrote:
>
>> > +struct last_modified {
>> > +     struct hashmap paths;
>> > +     struct rev_info rev;
>> > +     int recursive, tree_in_recursive;
>>
>> Can we either make these two part of a bitfield, or at least declare
>> them separately?
>
> I wonder if we could/should use the `bool` type from <stdbool.h> as
> Documentation/CodingGuidelines says that it's now allowed.

Even though "allowed" is different from "encouraged", I would say
it is a good idea to declare them separately, i.e.

	bool recursive;
	bool show_trees_in_recursive;

I am guessing 'tree-in-recursive' is one similar to 'git ls-tree -t'
feature but the name given in the patch requires such guessing, as
the name is a bit inadequate (it does not say what you want to do to
trees when recursive).

Renaming to show_trees_in_recursive eliminates the need for such
guessing.  The implementation of ls-tree calls the corresponding but
as LS_SHOW_TREES which is a bit inadequate.




[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