Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
/git-init-db
/git-interpret-trailers
/git-instaweb
/git-last-modified
/git-log
/git-ls-files
/git-ls-remote
Expand Down
21 changes: 21 additions & 0 deletions Documentation/RelNotes/2.52.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ UI, Workflows & Features
* A new subcommand "git repo" gives users a way to grab various
repository characteristics.

* A new command "git last-modified" has been added to show the closest
ancestor commit that touched each path.


Performance, Internal Implementation, Development Support etc.
--------------------------------------------------------------
Expand All @@ -40,6 +43,10 @@ Performance, Internal Implementation, Development Support etc.
* Discord has been added to the first contribution documentation as
another way to ask for help.

* Inspired by Ezekiel's recent effort to showcase Rust interface, the
hash function implementation used to hash lines have been updated
to the one used for ELF symbol lookup by Glibc.


Fixes since v2.51
-----------------
Expand Down Expand Up @@ -130,6 +137,20 @@ including security updates, are included in this release.
instead of `gitgitgadget/git`.
(merge 37001cdbc4 ds/doc-ggg-pr-fork-clarify later to maint).

* Makefile tried to run multiple "cargo build" which would not work
very well; serialize their execution to work it around.
(merge 0eeacde50e da/cargo-serialize later to maint).

* "git repack --path-walk" lost objects in some corner cases, which
has been corrected.
(merge 93afe9b060 ds/path-walk-repack-fix later to maint).

* "git ls-files <pathspec>..." should not necessarily have to expand
the index fully if a sparsified directory is excluded by the
pathspec; the code is taught to expand the index on demand to avoid
this.
(merge 681f26bccc ds/ls-files-lazy-unsparse later to maint).

* Other code cleanup, docfix, build fix, etc.
(merge 823d537fa7 kh/doc-git-log-markup-fix later to maint).
(merge cf7efa4f33 rj/t6137-cygwin-fix later to maint).
Expand Down
54 changes: 54 additions & 0 deletions Documentation/git-last-modified.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
git-last-modified(1)
====================

NAME
----
git-last-modified - EXPERIMENTAL: Show when files were last modified


SYNOPSIS
--------
[synopsis]
git last-modified [--recursive] [--show-trees] [<revision-range>] [[--] <path>...]

DESCRIPTION
-----------

Shows which commit last modified each of the relevant files and subdirectories.
A commit renaming a path, or changing it's mode is also taken into account.

THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.

OPTIONS
-------

`-r`::
`--recursive`::
Instead of showing tree entries, step into subtrees and show all entries
inside them recursively.

`-t`::
`--show-trees`::
Show tree entries even when recursing into them. It has no effect
without `--recursive`.

`<revision-range>`::
Only traverse commits in the specified revision range. When no
`<revision-range>` is specified, it defaults to `HEAD` (i.e. the whole
history leading to the current commit). For a complete list of ways to
spell `<revision-range>`, see the 'Specifying Ranges' section of
linkgit:gitrevisions[7].

`[--] <path>...`::
For each _<path>_ given, the commit which last modified it is returned.
Without an optional path parameter, all files and subdirectories
in path traversal the are included in the output.

SEE ALSO
--------
linkgit:git-blame[1],
linkgit:git-log[1].

GIT
---
Part of the linkgit:git[1] suite
1 change: 1 addition & 0 deletions Documentation/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ manpages = {
'git-init.adoc' : 1,
'git-instaweb.adoc' : 1,
'git-interpret-trailers.adoc' : 1,
'git-last-modified.adoc' : 1,
'git-log.adoc' : 1,
'git-ls-files.adoc' : 1,
'git-ls-remote.adoc' : 1,
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1265,6 +1265,7 @@ BUILTIN_OBJS += builtin/hook.o
BUILTIN_OBJS += builtin/index-pack.o
BUILTIN_OBJS += builtin/init-db.o
BUILTIN_OBJS += builtin/interpret-trailers.o
BUILTIN_OBJS += builtin/last-modified.o
BUILTIN_OBJS += builtin/log.o
BUILTIN_OBJS += builtin/ls-files.o
BUILTIN_OBJS += builtin/ls-remote.o
Expand Down Expand Up @@ -3945,13 +3946,12 @@ unit-tests: $(UNIT_TEST_PROGS) $(CLAR_TEST_PROG) t/helper/test-tool$X
$(MAKE) -C t/ unit-tests

.PHONY: libgit-sys libgit-rs
libgit-sys libgit-rs:
$(QUIET)(\
cd contrib/$@ && \
cargo build \
)
libgit-sys:
$(QUIET)cargo build --manifest-path contrib/libgit-sys/Cargo.toml
libgit-rs: libgit-sys
$(QUIET)cargo build --manifest-path contrib/libgit-rs/Cargo.toml
ifdef INCLUDE_LIBGIT_RS
all:: libgit-sys libgit-rs
all:: libgit-rs
endif

LIBGIT_PUB_OBJS += contrib/libgit-sys/public_symbol_export.o
Expand Down
1 change: 1 addition & 0 deletions builtin.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ int cmd_hook(int argc, const char **argv, const char *prefix, struct repository
int cmd_index_pack(int argc, const char **argv, const char *prefix, struct repository *repo);
int cmd_init_db(int argc, const char **argv, const char *prefix, struct repository *repo);
int cmd_interpret_trailers(int argc, const char **argv, const char *prefix, struct repository *repo);
int cmd_last_modified(int argc, const char **argv, const char *prefix, struct repository *repo);
int cmd_log_reflog(int argc, const char **argv, const char *prefix, struct repository *repo);
int cmd_log(int argc, const char **argv, const char *prefix, struct repository *repo);
int cmd_ls_files(int argc, const char **argv, const char *prefix, struct repository *repo);
Expand Down
Loading