Re: [PATCH RFC v2 1/5] last-modified: new subcommand to show when files were last modified
From: Toon Claes <hidden>
Date: 2025-06-05 08:32:27
Justin Tobler [off-list ref] writes:
On 25/05/23 11:33AM, Toon Claes wrote:quoted
+-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.
quoted
+[--] <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 theare include in the? I assume you meant to say the search/operation.
Whoops.
quoted
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