Skip to content

Commit 335cf2b

Browse files
authored
Merge pull request #305 from dscho/upgrade-to-gcm-core
Upgrade users to Git Credential Manager Core
2 parents 9fdc41b + 1db0a79 commit 335cf2b

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

git-extra/git-credential-helper-selector.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ static int discover_helpers(void)
491491
selected_helper = 0;
492492

493493
if (!previously_selected_helper)
494-
previously_selected_helper = L"manager";
494+
previously_selected_helper = L"manager-core";
495495

496496
for (p = env; *p; ) {
497497
WCHAR *q = wcschr(p, L';');

installer/install.iss

+12-7
Original file line numberDiff line numberDiff line change
@@ -2038,14 +2038,14 @@ begin
20382038
20392039
GitCredentialManagerPage:=CreatePage(PrevPageID,'Choose a credential helper','Which credential helper should be configured?',TabOrder,Top,Left);
20402040
2041-
// 1st choice
2042-
RdbGitCredentialManager[GCM_None]:=CreateRadioButton(GitCredentialManagerPage,'None','Do not use a credential helper.',TabOrder,Top,Left);
2041+
// Git Credential Manager Core
2042+
RdbGitCredentialManager[GCM_Core]:=CreateRadioButton(GitCredentialManagerPage,'Git Credential Manager Core','<RED>(NEW!)</RED> Use the new, <A HREF=https://github.com/microsoft/Git-Credential-Manager-Core>cross-platform version of the Git Credential Manager</A>.'+#13+'See more information about the future of Git Credential Manager <A HREF=https://github.com/microsoft/Git-Credential-Manager-Core/blob/master/docs/faq.md#about-the-project>here</A>.',TabOrder,Top,Left);
20432043
2044-
// 2nd choice
2045-
RdbGitCredentialManager[GCM_Classic]:=CreateRadioButton(GitCredentialManagerPage,'Git Credential Manager','The <A HREF=https://github.com/Microsoft/Git-Credential-Manager-for-Windows>Git Credential Manager for Windows</A> handles credentials e.g. for Azure'+#13+'DevOps and GitHub (requires .NET framework v4.5.1 or later).',TabOrder,Top,Left);
2044+
// Git Credential Manager for Windows
2045+
RdbGitCredentialManager[GCM_Classic]:=CreateRadioButton(GitCredentialManagerPage,'Git Credential Manager','(DEPRECATED) The <A HREF=https://github.com/Microsoft/Git-Credential-Manager-for-Windows>Git Credential Manager for Windows</A> handles credentials e.g.'+#13+'for Azure DevOps and GitHub (requires .NET framework v4.5.1 or later).',TabOrder,Top,Left);
20462046
2047-
// 3rd choice
2048-
RdbGitCredentialManager[GCM_Core]:=CreateRadioButton(GitCredentialManagerPage,'Git Credential Manager Core','<RED>(NEW!)</RED> Use the new, <A HREF=https://github.com/microsoft/Git-Credential-Manager-Core>cross-platform version of the Git Credential Manager</A>.'+#13+'See more information about the future of Git Credential Manager <A HREF=https://github.com/microsoft/Git-Credential-Manager-Core/blob/master/docs/faq.md#about-the-project>here</A>.',TabOrder,Top,Left);
2047+
// No credential helper
2048+
RdbGitCredentialManager[GCM_None]:=CreateRadioButton(GitCredentialManagerPage,'None','Do not use a credential helper.',TabOrder,Top,Left);
20492049
20502050
// Restore the settings chosen during a previous install, if .NET 4.5.1
20512051
// or later is available.
@@ -2055,13 +2055,18 @@ begin
20552055
RdbGitCredentialManager[GCM_Core].Checked:=False;
20562056
RdbGitCredentialManager[GCM_Core].Enabled:=False;
20572057
end else begin
2058-
case ReplayChoice('Use Credential Manager','Enabled') of
2058+
case ReplayChoice('Use Credential Manager','Core') of
20592059
'Disabled': RdbGitCredentialManager[GCM_None].Checked:=True;
20602060
'Enabled': RdbGitCredentialManager[GCM_Classic].Checked:=True;
20612061
'Core': RdbGitCredentialManager[GCM_Core].Checked:=True;
20622062
else
20632063
RdbGitCredentialManager[GCM_Classic].Checked:=True;
20642064
end;
2065+
// Auto-upgrade GCM to GCM Core in version v2.29.0
2066+
if RdbGitCredentialManager[GCM_Classic].Checked and (PreviousGitForWindowsVersion<>'') and IsDowngrade(PreviousGitForWindowsVersion,'2.29.0') then begin
2067+
RdbGitCredentialManager[GCM_Core].Checked:=True;
2068+
AddToSet(CustomPagesWithUnseenOptions,GitCredentialManagerPage);
2069+
end;
20652070
end;
20662071
20672072
(*

portable/release.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ die "Could not generate file list"
108108
mkdir -p "$SCRIPT_PATH/root/${etc_gitconfig%/*}" &&
109109
cp /"$etc_gitconfig" "$SCRIPT_PATH/root/$etc_gitconfig" &&
110110
git config -f "$SCRIPT_PATH/root/$etc_gitconfig" \
111-
credential.helper manager ||
111+
credential.helper manager-core ||
112112
die "Could not configure Git-Credential-Manager as default"
113113
test 64 != $BITNESS ||
114114
git config -f "$SCRIPT_PATH/root/$etc_gitconfig" --unset pack.packSizeLimit

0 commit comments

Comments
 (0)