diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-09-15 20:41:28 +0100 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-09-15 20:42:33 +0100 |
| commit | 40b1a3e0bb3dc918c5a7177b48f3e307f098b276 (patch) | |
| tree | 2fdd40a67930edf7f34d5587ffb8b3dcaf55a703 /include | |
| parent | 59cbc1784cc2f1e7d80ab93eaebdb71f5f2b3a49 (diff) | |
Revert "init.sh: re-initialise upstream src .git"
This reverts commit cf079dbd1775bb6270ee1cd8d36ce6c8aaa5a17c.
we don't need it anymore. we don't bother cleaning sources
for releases, because tehy're never dirtied. we build
using ./mk release which does everything fresh.
the git-clean feature was only used on ./mk -c, which was
removed because it's not needed for the same reason as
above. lbmk always cleans and re-builds everything when
metadata changes, otherwise storing builds out of tree
in a cache directory.
get rid of this dead code.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/env/init.sh | 43 |
1 files changed, 7 insertions, 36 deletions
diff --git a/include/env/init.sh b/include/env/init.sh index aa069cfa..ffd03407 100644 --- a/include/env/init.sh +++ b/include/env/init.sh @@ -356,50 +356,21 @@ git_init() "git_init" "$@"; : done - git_init_src . - [ -d "src" ] && \ - fx_ git_init_src x_ find src -maxdepth 1 -mindepth 1 -type d; : -} - -git_init_src() -{ - gitdir="${1-}" - - [ -z "$gitdir" ] && \ - err "Invalid argument" git_init_src "$@" - [ -L "$gitdir/.git" ] && \ + [ -L ".git" ] && \ err "'$xbmkpwd/.git' is a symlink" "git_init" "$@" - [ -e "$gitdir/.git" ] && \ + [ -e ".git" ] && \ return 0 - git_projectname="${gitdir#*/}" - git_treename="${git_projectname#*/}" - [ "$git_projectname" = "${git_projectname#*/}" ] && \ - git_treename="" - - git_projectname="${git_projectname%%/*}" - git_treename="${git_treename%%*/}" - - if ! singletree "$git_projectname"; then - if [ -z "$git_treename" ]; then - fx_ git_init_src x_ find "$gitdir" -maxdepth 1 \ - -mindepth 1 -type d - return 0 - fi - fi - ( export GIT_COMMITTER_DATE="@$versiondate +0000" export GIT_AUTHOR_DATE="@$versiondate +0000" - x_ git -C "$gitdir" init 1>/dev/null 2>/dev/null - x_ git -C "$gitdir" add -A . 1>/dev/null 2>/dev/null - x_ git -C "$gitdir" -c user.name="xbmk" \ - -c user.email="xbmk@example.com" \ - commit -m "$projectname $version $gitdir" \ + 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" \ --author="xbmk <xbmk@example.com>" 1>/dev/null 2>/dev/null - x_ git -C "$gitdir" -c user.name="xbmk" \ - -c user.email="xbmk@example.com" \ + x_ git -c user.name="xbmk" -c user.email="xbmk@example.com" \ tag -a "$version" -m "$projectname $version" \ 1>/dev/null 2>/dev/null; : |
