Skip to content

Fix bash split brain with Unified Git Install Selection - #3153

Open
daxgames wants to merge 29 commits into
cmderdev:mainfrom
daxgames:fix-bash-shared-git-selection
Open

daxgames wants to merge 29 commits into
cmderdev:mainfrom
daxgames:fix-bash-shared-git-selection

Conversation

@daxgames

Copy link
Copy Markdown
Member

This change contains what is in #3151 but extends it to unify Git selection code in one place.

Git install selection for al shells is done with the same code so it only has to be maintained once in one place and makes the smae selection for all shells.

The old code had independent Git selection code that had to be maintained seperately for each cmd, powershell or git bash shell that could all do different things in the same cmder distribution.

Trust MINGW_PREFIX/MSYSTEM from Git's own startup instead of always
preferring an external Program Files Git, then prepend Cmder's bin
directories. Run once via a CMDER_EXINIT guard with CMDER_ROOT set by
the caller, support ucrt64/clangarm64 and Zsh, fix the
"Program Files (x86)" path, stop sourcing ~/.bashrc (login files run
after profile.d), restore the native bin after user profiles reset
PATH, and route debug messages through vendor/lib/lib_console.sh
gated by debug_output.
…files

Build the bundled Git Bash hook from the cmder_exinit shim and install
it as zz-cmder.sh so Cmder runs after Git's standard PATH hooks,
including env.sh. Because this hook only ships inside the bundled Git,
it can safely fall back to deriving CMDER_ROOT from the mount root when
bundled Git Bash is launched directly outside Cmder. Replace the old
cmder.sh hook with a placeholder on in-place upgrades so Cmder does not
initialize twice. Fail packaging early when any required Bash startup
file (cmder.sh, cmder_exinit, lib_console.sh,
setup_external_git_bash.ps1) is missing.
Use the common Git shell initializer for discovery, PATH setup, and external Git hook guidance. Keep each launcher focused on starting its shell and logging the launch.
Cover shared launcher setup, Bash startup behavior, and external hook installation. Verify package variants include required startup files and exclude user-owned state.
@daxgames daxgames changed the title Fix bash shared git selection Fix bash with Unified Git Install Selection Nov 26, 2026
@daxgames daxgames changed the title Fix bash with Unified Git Install Selection Fix bash split brain with Unified Git Install Selection Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant