#58 Export duplicates the git runner, shares the 10s timeout, and round-trips paths through UTF-8
export_dumb_repo re-implements the git subprocess plumbing (~75 lines) instead of reusing run_git, and runs the export under the same 10 s GIT_TIMEOUT.
Problems:
- Second full traversal under a 10 s cap.
snapshot()already reads the whole history forgit bundle createunderGIT_TIMEOUT. The export is a second full pass with the same 10 s budget, so a repo whose bundle takes ~7 s now exceeds the cap in the export step and fails the build withGitError::Timeout("git clone/update-server-info")— a regression for large repos that deployed fine before #54. - Duplicated runner.
run_plain_gitcopiesrun_git's spawn / stdout-stderr reader threads / poll loop / kill-on-timeout. Every future fix must be made twice; the two already differ in error text and in the--git-dirhandling. - Lossy path round-trip.
canonicalize()->to_string_lossy()->OsStringconverts non-UTF-8 paths into replacement characters, so the clone target can be a different path than intended.
Fix:
- fold the runner into one helper that takes an optional cwd (
git -C <cwd>vs plaingit), keepingGIT_TIMEOUTand the kill/reader-thread behaviour identical - pass
&OsStr/Pathstraight through (no string conversion) - once #55/#56 are fixed (export from the existing bundle) the marginal cost is small; still, give the export its own, larger budget rather than sharing 10 s with a full-history read
Acceptance:
-
one subprocess helper;
run_plain_gitgone -
no
to_string_lossyon paths handed to git - timeout is not silently doubled against the same cap (documented constant or separate budget)
Uunknown ·
Fixed in e2792258-fd01-4be6-83ca-c68ef435cfed: export now clones from repo.bundle (one pack, no loose/dangling objects), remote.origin removed, sample hooks removed, single run_git_opt runner with OsStr paths + 120s export budget, content-type anchored to .git/HEAD+info/, docs updated. tests/clone_export.rs asserts all of it.