diff --git a/bin/gstack-session-update b/bin/gstack-session-update index b1bc48529..4722cf0eb 100755 --- a/bin/gstack-session-update +++ b/bin/gstack-session-update @@ -131,12 +131,9 @@ hook_report() { hook_incoming_hold() { _hc_dir=$(mktemp -d "${TMPDIR:-/tmp}/gstack-session-hooks-XXXXXX" 2>/dev/null) \ || { echo "hook-check-unavailable: cannot create a temp directory under ${TMPDIR:-/tmp}"; return 0; } - # With MSYS path conversion off, Git for Windows cannot open /tmp/... (#3468). - _hc_git=$_hc_dir - [ -z "${MSYS_NO_PATHCONV:-}" ] || _hc_git=$(gstack_path_native "$_hc_dir") _hc_out="" _hc_why="" - if ! ( export GIT_INDEX_FILE="$_hc_git.index" - git -C "$GSTACK_DIR" read-tree "$1" && git -C "$GSTACK_DIR" -c core.symlinks=false checkout-index -a --prefix="$_hc_git/" ) 2>"$_hc_dir.err"; then + if ! ( export GIT_INDEX_FILE="$_hc_dir.index" + git -C "$GSTACK_DIR" read-tree "$1" && git -C "$GSTACK_DIR" -c core.symlinks=false checkout-index -a --prefix="$_hc_dir/" ) 2>"$_hc_dir.err"; then _hc_why="cannot extract the incoming revision: $(ff_flatten "$(head -c 200 "$_hc_dir.err" 2>/dev/null)" 200)" elif [ -f "$_hc_dir/bin/gstack-hook-check" ] && hook_report "$_hc_dir/bin/gstack-hook-check" "$_hc_dir"; then _hc_out=$_hr_out diff --git a/changelog.d/gsta208-windows-msys-paths.md b/changelog.d/gsta208-windows-msys-paths.md index 154bbb624..309424d1c 100644 --- a/changelog.d/gsta208-windows-msys-paths.md +++ b/changelog.d/gsta208-windows-msys-paths.md @@ -1,9 +1,9 @@ -**Windows custom-root installs keep their own paths, and gstack's git helpers work with `MSYS_NO_PATHCONV=1` exported.** Git Bash hands native Bun a setup install root like `/c/Users/you/isolated/...` as `C:/Users/you/isolated/...`, and the renderer refused any root that did not start with `/`. Setup warned and the isolated install kept the default-install paths (#3498, reported by DanCanadian). With `MSYS_NO_PATHCONV=1` exported (common for docker), Git for Windows received raw `/tmp/...` temp index paths it cannot open, so `gstack-wtree` and every review record built on it failed. `gstack-ff-update` and the session updater's hook check failed the same way (#3468, reported by Simba3696). +**Windows custom-root installs keep their own paths, and gstack's git helpers work with `MSYS_NO_PATHCONV=1` exported.** Git Bash hands native Bun a setup install root like `/c/Users/you/isolated/...` as `C:/Users/you/isolated/...`, and the renderer refused any root that did not start with `/`. Setup warned and the isolated install kept the default-install paths (#3498, reported by DanCanadian). With `MSYS_NO_PATHCONV=1` exported (common for docker), Git for Windows received raw `/tmp/...` temp index paths it cannot open, so `gstack-wtree` and every review record built on it failed. `gstack-ff-update` failed the same way (#3468, reported by Simba3696). ### Fixed - **`scripts/gen-skill-docs.ts --install-root`** accepts a drive-letter root and renders it in the `/c/...` spelling setup checks. A root with characters outside the plain set still refuses. - **`setup`** converts a drive-form root with `cygpath -u` before its plain-path guard, so the guard, the render and setup's own post-render check agree. -- **`gstack-wtree`, `gstack-ff-update` and `gstack-session-update`** hand Git their temp index paths in Windows form. +- **`gstack-wtree` and `gstack-ff-update`** hand Git their temp index paths in Windows form. - **`gstack-doctor`** warns on the `windows bash` row when `MSYS_NO_PATHCONV` is exported. Bun-based gstack commands start with `--config=/dev/null`, and with path conversion off native Bun cannot open `/dev/null`. No spelling works for both Bun on Windows and Linux/macOS (checked on windows-latest), so the fix is to set the variable per command. See docs/troubleshooting.md#msys-no-pathconv. ### Tests diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index daea38278..991645da9 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -2163,8 +2163,9 @@ or in Windows PowerShell: `/dev/null` and `/tmp/...` into paths native Windows programs can open. With `MSYS_NO_PATHCONV=1` exported, it passes them through unchanged: native Bun cannot open `/dev/null`, so every Bun-based gstack command fails before it -starts. `gstack-wtree`, `gstack-ff-update` and the session updater hand Git -their temp files in Windows form, so they work either way (#3468). +starts, and the session updater holds new releases because its hook check runs +Bun. `gstack-wtree` and `gstack-ff-update` hand Git their temp files in Windows +form, so they work either way (#3468). **Fix.** Don't export `MSYS_NO_PATHCONV`. Set it only on the command that needs it, for example `MSYS_NO_PATHCONV=1 docker run -v /c/src:/src ...`, or remove