[PROPOSED] For timestamps compare to HEAD not to index

30 Dec
2024
30 Dec
'24
7:59 a.m.
Problem reported by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2024-12/msg00245.html * Makefile (set-timestamps.out): When comparing working file to repository, Use ‘git diff HEAD’ instead of plain ‘git diff’. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ffdbfe3b..e00b0f32 100644 --- a/Makefile +++ b/Makefile @@ -1104,7 +1104,7 @@ set-timestamps.out: $(EIGHT_YARDS) touch -md @1 test.out; then \ rm -f test.out && \ for file in $$files; do \ - if git diff --quiet $$file; then \ + if git diff --quiet HEAD $$file; then \ time=$$(TZ=UTC0 git log -1 \ --format='tformat:%cd' \ --date='format:%Y-%m-%dT%H:%M:%SZ' \ -- 2.47.1
44
Age (days ago)
44
Last active (days ago)
0 comments
1 participants
participants (1)
-
Paul Eggert