aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/wrappers/git
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/wrappers/git')
-rwxr-xr-x.local/bin/wrappers/git12
1 files changed, 12 insertions, 0 deletions
diff --git a/.local/bin/wrappers/git b/.local/bin/wrappers/git
new file mode 100755
index 0000000..d321469
--- /dev/null
+++ b/.local/bin/wrappers/git
@@ -0,0 +1,12 @@
+#!/bin/sh -eu
+
+GIT=$(which git --all | grep --invert-match "local/bin" | head --lines 1)
+GIT_COMMITTER_DATE="$(date --utc --date '0' '+%a %b %d %H:%M:%S %Y %z')"
+
+export GIT_COMMITTER_DATE
+
+[ "${1:-}" = "commit" ] && export DATE=1 && $GIT "$@" --date="$GIT_COMMITTER_DATE"
+
+[ "${DATE:-}" = 1 ] && exit
+
+$GIT "$@"