Skip to content

Commit b3ca758

Browse files
committed
installer: _really_ upgrade GCM(W) users to GCM Core
The `IsDowngrade()` function is really a slippery slope: it takes two arguments, but if even one of them has four numbers in it, the parameters are ignored and the installed Git version is used for the second parameter, and the current display version for the first one. This is _very_ dangerous, as it lured this developer into using this function with a different order of arguments. Let's use the `IsUpgrade()` function instead. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent e33aec3 commit b3ca758

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

installer/install.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2131,7 +2131,7 @@ begin
21312131
RdbGitCredentialManager[GCM_Core].Checked:=True;
21322132
end;
21332133
// Auto-upgrade GCM to GCM Core in version v2.29.0
2134-
if RdbGitCredentialManager[GCM_Classic].Checked and ((PreviousGitForWindowsVersion='') or IsDowngrade(PreviousGitForWindowsVersion,'2.29.0')) then begin
2134+
if RdbGitCredentialManager[GCM_Classic].Checked and ((PreviousGitForWindowsVersion='') or IsUpgrade('2.29.0',PreviousGitForWindowsVersion)) then begin
21352135
RdbGitCredentialManager[GCM_Core].Checked:=True;
21362136
AddToSet(CustomPagesWithUnseenOptions,GitCredentialManagerPage);
21372137
end;

0 commit comments

Comments
 (0)