projects
/
sxmo-sms-ssh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c4465c
)
commit with filesystem date
author
Dobrica Pavlinušić
<dpavlin@rot13.org>
Thu, 29 Jun 2023 07:18:05 +0000
(09:18 +0200)
committer
Dobrica Pavlinušić
<dpavlin@rot13.org>
Sun, 2 Jul 2023 11:12:08 +0000
(13:12 +0200)
git-commit-date
[new file with mode: 0755]
patch
|
blob
diff --git a/git-commit-date
b/git-commit-date
new file mode 100755
(executable)
index 0000000..
54e196b
--- /dev/null
+++ b/
git-commit-date
@@ -0,0
+1,7
@@
+#!/bin/sh -x
+
+# preserve file timestamp in git date inside commit
+# usage: git-commit-date path
+
+git commit --date="$( ls --full-time $1 | awk '{ print $6" "$7 }' )" $1
+