Repository navigation
v2.55.0.5: static git + system_prefix self-locate (wpm flat layout) - #9
Merged
Merged
Conversation
Phase 2 of #8: make usr/bin/git.exe the real git. - patch 0003: system_prefix() validates its strip result against <prefix>/<GIT_EXEC_PATH> and, when that fails, probes upward for the payload markers (opt/niugit/mingw64, mingw64) before falling back to the original chain. Strip-first keeps normal MinGit/build layouts byte-identical (one extra is_directory stat); the probe only runs for the wpm flat layout where the exe sits at <root>/usr/bin. - build.py: link ZLIB (zs.lib) and Iconv (iconv.lib) from x64-windows-static-md (searched first, /MD in both triplets) so git.exe's import table drops zlib1.dll/iconv-2.dll; curl/EXPAT stay dynamic from x64-windows. -UZLIB*/-UIconv* so reconfigures re-resolve. - build.py: hardlink the dashed server forms into mingw64/libexec/git-core (setup_path puts exec-path on PATH of spawned commands, so local clone/push finds them there), and stop shipping the root entry launcher - the flat layout maps mingw64/bin/git.exe straight to usr/bin/git.exe, no dispatcher hop. - build.py: apply patches with git apply first (winuxcmd patch(1) 1.1.8 drops -p1 stripping), reverse-check for idempotent re-runs.
- t-perl-shim: prefer Strawberry if present, else exec an MSYS /usr/bin/perl verbatim (present under a real Git Bash root); PATHEXP wrappers consume GITPERLLIB themselves so MSYS perl needs no conversion. Without this every test dies in chainlint when Strawberry is missing. - test.sh: hold noglob while splitting $GLOB. The curated test-globs.txt bare names worked, but a documented wildcard arg (test.sh t0*) expanded against src/t cwd, appended .sh to an already-suffixed name, selected nothing, and reported the silent ok=0 notok=0.
libexec/git-core/git-{upload-pack,receive-pack,upload-archive}.exe are
what git actually runs: setup_path prepends exec-path to the PATH of
spawned commands, and that is also what the wpm flat layout resolves
through (usr/bin carries only git.exe). The bin/ copies were only ever
reached through the removed launcher's private PATH prepend, but they are
hardlinks of the 5 MB git.exe and a zip explodes hardlinks - ~15 MB of
artifact for no reachable code path.
wpm/niugit.json becomes the first layout:flat entry: mingw64/ and etc/ land under opt/niugit/ and mingw64/bin/git.exe maps to the shared usr/bin/git.exe - the bare binary self-locates via patch 0003, no shim. sha256/size match niu-git-2.55.0.windows.2-x64.zip (static zlib/iconv, bin/ dashed forms dropped: 33 MB, was 21 MB). README: bundle numbers, patch #3, dispatcher retirement, test-harness notes (real Git Bash, perl auto-detect, wildcard globs), and the v2.55.0.4 asset-name 404 warning.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2 of #8 follow-up: make
usr/bin/git.exethe real git binary directly, no winuxcmd/launcher hops.What
system_prefix()validates its strip result against<prefix>/<GIT_EXEC_PATH>; on failure probes upward for the payload markers (opt/niugit/mingw64,mingw64) before falling back to the original chain. Normal MinGit/build layouts stay byte-identical (one extra is_directory stat); the probe only fires for the wpm flat layout.x64-windows-static-mdsearched first (ZLIB_USE_STATIC_LIBS=ON),git.exe's import table dropszlib1.dll/iconv-2.dll; curl/EXPAT stay dynamic inlibexec/git-corewhere libcurl lives.git-{upload-pack,receive-pack,upload-archive}.exehardlinked intomingw64/libexec/git-core(setup_path prepends exec-path to spawned PATH); dropped frombin/(~15 MB exploded-zip savings, unreachable there).build_entry()/--entry-onlykept for the differential suite.wpm/niugit.jsonv2.55.0.5,layout: flat;mingw64/bin/git.exe→ sharedusr/bin/git.exe.Perf
git --version72-83 ms → 23.3 ms avg / 17.5 ms min;git status19.9 ms avg (flat-layout simulation).Verification
--system --list/templates all pass; dumpbin shows no zlib/iconv DLL imports.wpm install niugit --force.Release
Asset:
niu-git-2.55.0.windows.2-x64.zip(33 147 311 B, sha256dd852695…a379932) — note: v2.55.0.4 shipped asniugit-…zip, its index URL 404s; this fixes fresh installs.