Re: [PATCH RFC v2 1/5] last-modified: new subcommand to show when files were last modified
- From
Toon Claes <toon@iotcl.com>
- Date
- Jun 5, 2025, 08:32 UTC
- Message-ID
- <8734ce37xw.fsf@iotcl.com>
- In-Reply-To
- <zz2xv667flcb46gp4scqu4wmrxviiecqz2ru35glalbsaluc3p@kmymzn5lxapk>
Justin Tobler <jltobler@gmail.com> writes:
Show 10 quoted lines
> On 25/05/23 11:33AM, Toon Claes wrote: >> +-r:: >> + Recurse into subtrees. >> + >> +-t:: >> + Show tree entry itself as well as subtrees. Implies `-r`. > > This left me wondering about the default behavior regarding displaying > trees when neither `-t` and `-r` are specified. If we omit showing when > a tree was last mostified?
When omitting both the command returns the commit that last modified the tree. Basically without any of both options it return which commit touched a tree entry last, it doesn't care if that tree entry is a tree or a blob.
I shall add something to the docs for `-r` that explains what happens if it is omitted.
Show 6 quoted lines
>> +[--] <path>...:: >> + For each _<path>_ given, the commit which last modified it is returned. >> + Without an optional path parameter, all files and subdirectories >> + of the current working directory are included in the > > are include in the? I assume you meant to say the search/operation.
Whoops.
Show 17 quoted lines
>> diff --git a/builtin/last-modified.c b/builtin/last-modified.c >> new file mode 100644 >> index 0000000000..0d4733f666 >> --- /dev/null >> +++ b/builtin/last-modified.c >> @@ -0,0 +1,43 @@ >> +#include "git-compat-util.h" >> +#include "last-modified.h" >> +#include "hex.h" >> +#include "quote.h" >> +#include "config.h" >> +#include "object-name.h" >> +#include "parse-options.h" >> +#include "builtin.h" > > For builtins, "builtin.h" should be included at the top and > "git-compat-util.h" should be omitted.
Thanks, will address.
-- Cheers, Toon