You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: installer/install.iss
+84-5Lines changed: 84 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -333,6 +333,10 @@ const
333
333
GP_Cmd = 2;
334
334
GP_CmdTools = 3;
335
335
336
+
// Default Branch options.
337
+
DB_Unspecified = 1;
338
+
DB_Manual = 2;
339
+
336
340
// Git SSH options.
337
341
GS_OpenSSH = 1;
338
342
GS_Plink = 2;
@@ -428,6 +432,11 @@ var
428
432
CustomEditorPath:String;
429
433
CustomEditorOptions:String;
430
434
435
+
// Wizard page and variables for the Default Branch options.
436
+
DefaultBranchPage:TWizardPage;
437
+
RdbDefaultBranch:array[DB_Unspecified..DB_Manual] of TRadioButton;
438
+
EdtDefaultBranch:TEdit;
439
+
431
440
// Wizard page and variables for the Path options.
432
441
PathPage:TWizardPage;
433
442
RdbPath:array[GP_BashOnly..GP_CmdTools] of TRadioButton;
@@ -676,14 +685,14 @@ begin
676
685
// exit code 5 means it was already unset, so that's okay
677
686
Result:=True
678
687
elsebegin
679
-
LogError('Unable to unset system config "'+Key+'": exit code '+IntToStr(i)+#10+#13+ReadFileAsString(OutPath)+#10+#13+'stderr:'+#10+#13+ReadFileAsString(ErrPath));
688
+
LogError('Unable to unset system config "'+Key+'": exit code '+IntToStr(i)+#13+#10+ReadFileAsString(OutPath)+#13+#10+'stderr:'+#13+#10+ReadFileAsString(ErrPath));
AppDir,SW_HIDE,ewWaitUntilTerminated,i) And (i=0) then
684
693
Result:=True
685
694
elsebegin
686
-
LogError('Unable to set system config "'+Key+'":="'+Value+'": exit code '+IntToStr(i)+#10+#13+ReadFileAsString(OutPath)+#10+#13+'stderr:'+#10+#13+ReadFileAsString(ErrPath));
695
+
LogError('Unable to set system config "'+Key+'":="'+Value+'": exit code '+IntToStr(i)+#13+#10+ReadFileAsString(OutPath)+#13+#10+'stderr:'+#13+#10+ReadFileAsString(ErrPath));
if EdtDefaultBranch.Enabled and (WizardForm.CurPageID=DefaultBranchPage.ID) then
1626
+
// If the manual option was just checked, move the focus to the text box
1627
+
WizardForm.ActiveControl:=EdtDefaultBranch;
1628
+
end;
1629
+
1607
1630
procedureQueryUninstallValues; forward;
1608
1631
1609
1632
procedureInitializeWizard;
@@ -1612,6 +1635,7 @@ var
1612
1635
PuTTYSessions,EnvSSH:TArrayOfString;
1613
1636
BtnPlink:TButton;
1614
1637
Data:String;
1638
+
LblInfo:TLabel;
1615
1639
begin
1616
1640
InferredDefaultKeys:=TStringList.Create;
1617
1641
InferredDefaultValues:=TStringList.Create;
@@ -1834,6 +1858,50 @@ begin
1834
1858
end;
1835
1859
EditorSelectionChanged(NIL);
1836
1860
1861
+
(*
1862
+
* Create a custom page for modifying the default branch.
1863
+
*)
1864
+
1865
+
DefaultBranchPage:=CreatePage(PrevPageID,'Adjusting the name of the initial branch in new repositories','What would you like Git to name the initial branch after "git init"?',TabOrder,Top,Left);
1866
+
1867
+
// 1st choice
1868
+
RdbDefaultBranch[DB_Unspecified]:=CreateRadioButton(DefaultBranchPage,'Let Git decide','Let Git use its default branch name (currently: "master") for the initial branch'+#13+'in newly created repositories. The Git project <A HREF=https://sfconservancy.org/news/2020/jun/23/gitbranchname/>intends</A> to change this default to'+#13+'a more inclusive name in the near future.',TabOrder,Top,Left);
RdbDefaultBranch[DB_Manual]:=CreateRadioButton(DefaultBranchPage,'Override the default branch name for new repositories','<RED>NEW!</RED> Many teams already renamed their default branches; common choices are'+#13+'"main", "trunk" and "development". Specify the name "git init" should use for the'+#13+'initial branch:',TabOrder,Top,Left);
0 commit comments