From 399d9dce562a909ae493a591371e0a6c83518182 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 25 Feb 2025 09:19:52 +0100 Subject: [PATCH] vc-mtime: Improve comment. Suggested by Paul Eggert. * lib/vc-mtime.c (git_mtime): Clarify CommitDate vs. AuthorDate. --- ChangeLog | 6 ++++++ lib/vc-mtime.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3e170e5117..dfea4e0e6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2025-02-25 Bruno Haible + + vc-mtime: Improve comment. + Suggested by Paul Eggert. + * lib/vc-mtime.c (git_mtime): Clarify CommitDate vs. AuthorDate. + 2025-02-24 Bruno Haible vc-mtime: New module. diff --git a/lib/vc-mtime.c b/lib/vc-mtime.c index 0f333d5b6b..0e609033f6 100644 --- a/lib/vc-mtime.c +++ b/lib/vc-mtime.c @@ -102,7 +102,9 @@ static int git_mtime (struct timespec *mtime, const char *filename) { /* Run "git log -1 --format=%ct -- FILENAME". It prints the time of last - modification, as the number of seconds since the Epoch. + modification (the 'CommitDate', not the 'AuthorDate' which merely + represents the time at which the author locally committed the first version + of the change), as the number of seconds since the Epoch. The '--' option is for the case that the specified file was removed. */ const char *argv[7]; pid_t child; -- 2.39.5