Skip to content

Commit dae01ab

Browse files
committed
Merge branch 'tc/last-modified' into seen
A new command "git last-modified" is proposed to show the closest ancestor commit that touched each path. Seems to break a CI job when merged to 'seen'. cf. <[email protected]> * tc/last-modified: last-modified: use Bloom filters when available commit-graph: export prepare_commit_graph() t/perf: add last-modified perf script last-modified: new subcommand to show when files were last modified
2 parents 1c3fc74 + 7562a72 commit dae01ab

14 files changed

+611
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
/git-init-db
8888
/git-interpret-trailers
8989
/git-instaweb
90+
/git-last-modified
9091
/git-log
9192
/git-ls-files
9293
/git-ls-remote

Documentation/git-last-modified.adoc

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
git-last-modified(1)
2+
====================
3+
4+
NAME
5+
----
6+
git-last-modified - EXPERIMENTAL: Show when files were last modified
7+
8+
9+
SYNOPSIS
10+
--------
11+
[synopsis]
12+
git last-modified [-r] [-t] [<revision-range>] [[--] <path>...]
13+
14+
DESCRIPTION
15+
-----------
16+
17+
Shows which commit last modified each of the relevant files and subdirectories.
18+
19+
THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
20+
21+
OPTIONS
22+
-------
23+
24+
-r::
25+
Recurse into subtrees.
26+
27+
-t::
28+
Show tree entry itself as well as subtrees. Implies `-r`.
29+
30+
<revision-range>::
31+
Only traverse commits in the specified revision range. When no
32+
`<revision-range>` is specified, it defaults to `HEAD` (i.e. the whole
33+
history leading to the current commit). For a complete list of ways to
34+
spell `<revision-range>`, see the 'Specifying Ranges' section of
35+
linkgit:gitrevisions[7].
36+
37+
[--] <path>...::
38+
For each _<path>_ given, the commit which last modified it is returned.
39+
Without an optional path parameter, all files and subdirectories
40+
in path traversal the are included in the output.
41+
42+
SEE ALSO
43+
--------
44+
linkgit:git-blame[1],
45+
linkgit:git-log[1].
46+
47+
GIT
48+
---
49+
Part of the linkgit:git[1] suite

Documentation/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ manpages = {
7474
'git-init.adoc' : 1,
7575
'git-instaweb.adoc' : 1,
7676
'git-interpret-trailers.adoc' : 1,
77+
'git-last-modified.adoc' : 1,
7778
'git-log.adoc' : 1,
7879
'git-ls-files.adoc' : 1,
7980
'git-ls-remote.adoc' : 1,

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,6 +1265,7 @@ BUILTIN_OBJS += builtin/hook.o
12651265
BUILTIN_OBJS += builtin/index-pack.o
12661266
BUILTIN_OBJS += builtin/init-db.o
12671267
BUILTIN_OBJS += builtin/interpret-trailers.o
1268+
BUILTIN_OBJS += builtin/last-modified.o
12681269
BUILTIN_OBJS += builtin/log.o
12691270
BUILTIN_OBJS += builtin/ls-files.o
12701271
BUILTIN_OBJS += builtin/ls-remote.o

builtin.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ int cmd_hook(int argc, const char **argv, const char *prefix, struct repository
176176
int cmd_index_pack(int argc, const char **argv, const char *prefix, struct repository *repo);
177177
int cmd_init_db(int argc, const char **argv, const char *prefix, struct repository *repo);
178178
int cmd_interpret_trailers(int argc, const char **argv, const char *prefix, struct repository *repo);
179+
int cmd_last_modified(int argc, const char **argv, const char *prefix, struct repository *repo);
179180
int cmd_log_reflog(int argc, const char **argv, const char *prefix, struct repository *repo);
180181
int cmd_log(int argc, const char **argv, const char *prefix, struct repository *repo);
181182
int cmd_ls_files(int argc, const char **argv, const char *prefix, struct repository *repo);

0 commit comments

Comments
 (0)