From 58094bd0176be132aa4f01359c1edcdf2f9ff798 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 11 Sep 2026 19:24:15 +0100 Subject: [PATCH] init.sh: portable date on git-init don't even call the date util at all, to fix the portability issues. now we don't need GNU date anymore. git itself can just take an epoch, and it will do whatever it will do. yes. Signed-off-by: Leah Rowe --- include/init.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/include/init.sh b/include/init.sh index f1e5eafd..eb0cfdca 100644 --- a/include/init.sh +++ b/include/init.sh @@ -424,19 +424,10 @@ xbmk_git_init() [ -e ".git" ] && \ return 0 - # GNU-specific extensions of date are used. - # TODO: that is a bug. fix it! - - x_ date --version | grep "GNU coreutils" 1>/dev/null 2>/dev/null || \ - err "Non-GNU date implementation" "xbmk_git_init" "$@" - - cdate="`x_ date -Rud @$versiondate || err "can't get date"`" || \ - err "can't get date" "xbmk_git_init" "$@" - x_ git init 1>/dev/null 2>/dev/null x_ git add -A . 1>/dev/null 2>/dev/null x_ git -c user.name="xbmk" -c user.email="xbmk@example.com" \ - commit -m "$projectname $version" --date "$cdate" \ + commit -m "$projectname $version" --date "@$versiondate +0000" \ --author="xbmk " 1>/dev/null 2>/dev/null x_ git -c user.name="xbmk" -c user.email="xbmk@example.com" \ tag -a "$version" -m "$projectname $version" \