Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer: detect manually-configured default branch #515

Merged
merged 2 commits into from Aug 7, 2023

Conversation

dscho
Copy link
Member

@dscho dscho commented Aug 6, 2023

As reported in git-for-windows/git#4525, during upgrades the Git for Windows installer may overwrite the current default branch name if it has been set manually in the system config (as opposed to configuring it in the previous Git for Windows installer run).

This PR addresses that by letting the system config override the values from the previous installer run.

A full Git for Windows SDK is a bit of an overkill if all one wants to
do is to fiddle with the installer a bit.

With this change, it is possible to fiddle with the individual "wizard
pages" of the installer, e.g. via

	scalar clone https://github.com/git-for-windows/build-extra
	cd build-extra/src
	git sparse-checkout add installer
	cd installer

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When a user configures the default branch name manually, i.e. edits the
system config themselves, the Git for Windows installer currently resets
it to whatever was specified when running the installer previously.

This is inconsistent with the way other defaults are inferred from the
system config, say, `core.symlinks`.

Let's make it consistent by interpreting the current value of
`init.defaultBranch` (if configured).

This addresses git-for-windows/git#4525.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho self-assigned this Aug 6, 2023
@dscho dscho merged commit a37e838 into git-for-windows:main Aug 7, 2023
12 checks passed
@dscho dscho deleted the installer-detect-default-branch branch August 7, 2023 12:51
@dscho
Copy link
Member Author

dscho commented Aug 7, 2023

/add relnote bug When init.defaultBranch is changed manually in the system config, subsequent Git for Windows upgrades would overwrite that change. This has been fixed.

The workflow run was started

github-actions bot pushed a commit that referenced this pull request Aug 7, 2023
When `init.defaultBranch` is changed manually in the system config,
subsequent Git for Windows upgrades [would overwrite that
change](git-for-windows/git#4525). This has
been [fixed](#515).

Signed-off-by: gitforwindowshelper[bot] <gitforwindowshelper-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants