Skip to content

Commit 2dc0a72

Browse files
committed
installer: record the default choice for the Default Branch option
If the user wants to simply follow what Git wants to use as the default branch name in freshly-initialized repositories, we used to record the empty string. Except we didn't. Because InnoSetup's `SetPreviousData()` function special-cases the empty string to mean "delete that key from the previous data instead of recording a value" (even if the documentation does not spell that out: https://jrsoftware.org/ishelp/index.php?topic=isxfunc_setpreviousdata). Let's just use a single space character instead of the empty string (which does not specify a valid branch name) to indicate that the user did not want to override Git's default. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent fd31539 commit 2dc0a72

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

installer/install.iss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1899,7 +1899,8 @@ begin
18991899
// Restore the setting chosen during a previous install.
19001900
Data:=ReplayChoice('Default Branch Option','');
19011901
case Data of
1902-
'': RdbDefaultBranch[DB_Unspecified].Checked:=True;
1902+
'': RdbDefaultBranch[DB_Unspecified].Checked:=True;
1903+
' ': RdbDefaultBranch[DB_Unspecified].Checked:=True;
19031904
else begin
19041905
RdbDefaultBranch[DB_Manual].Checked:=True;
19051906
EdtDefaultBranch.Text:=Data;
@@ -3162,7 +3163,7 @@ begin
31623163
RecordChoice(PreviousDataKey,'Custom Editor Path',CustomEditorData);
31633164
31643165
// Default Branch options.
3165-
Data:='';
3166+
Data:=' ';
31663167
if RdbDefaultBranch[DB_Manual].Checked then
31673168
Data:=EdtDefaultBranch.Text;
31683169
RecordChoice(PreviousDataKey,'Default Branch Option',Data);

0 commit comments

Comments
 (0)