summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-09-11 19:40:18 +0100
committerLeah Rowe <leah@libreboot.org>2026-09-11 19:42:03 +0100
commit36fef51e8fe76908ba09b2dba3e0fb898834d094 (patch)
treefea0fc0a2d8d9145558766c1af3c09fbfe63f135 /include
parentb6b5f709346df5861d4192472a090236d3d448f1 (diff)
init.sh: universally set git commit/auth date
do it as an export. to avoid pollution elsewhere, do it inside a subshell. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
-rw-r--r--include/init.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/init.sh b/include/init.sh
index 03878d41..e611127f 100644
--- a/include/init.sh
+++ b/include/init.sh
@@ -424,15 +424,19 @@ xbmk_git_init()
[ -e ".git" ] && \
return 0
+ (
+ export GIT_COMMITTER_DATE="@$versiondate +0000"
+ export GIT_AUTHOR_DATE="@$versiondate +0000"
+
x_ git init 1>/dev/null 2>/dev/null
x_ git add -A . 1>/dev/null 2>/dev/null
- GIT_COMMITTER_DATE="@$versiondate +0000" \
- x_ git -c user.name="xbmk" -c user.email="xbmk@example.com" \
- commit -m "$projectname $version" --date "@$versiondate +0000" \
+ x_ git -c user.name="xbmk" -c user.email="xbmk@example.com" \
+ commit -m "$projectname $version" \
--author="xbmk <xbmk@example.com>" 1>/dev/null 2>/dev/null
x_ git -c user.name="xbmk" -c user.email="xbmk@example.com" \
tag -a "$version" -m "$projectname $version" \
1>/dev/null 2>/dev/null; :
+ ) || err "Can't initialise workdir" xbmk_git_init "$@"; :
}
xbmk_child_exec()