Skip to content

Commit 7f70586

Browse files
committed
rename: remove git-credential-manager-core symlinks
Since 2 versions of Git have released since the rename of the executable from git-credential-manager-core to git-credential-manager, remove the associated symlinks and warnings, (as outlined in docs/rename.md).
1 parent 878418b commit 7f70586

File tree

6 files changed

+3
-56
lines changed

6 files changed

+3
-56
lines changed

src/linux/Packaging.Linux/build.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@ if [ $INSTALL_FROM_SOURCE = true ]; then
7070
"$LINK_TO/git-credential-manager" || exit 1
7171
fi
7272

73-
# Create legacy symlink with older name
74-
if [ ! -f "$LINK_TO/git-credential-manager-core" ]; then
75-
ln -s -r "$INSTALL_TO/git-credential-manager" \
76-
"$LINK_TO/git-credential-manager-core" || exit 1
77-
fi
78-
7973
echo "Install complete."
8074
else
8175
# Pack

src/linux/Packaging.Linux/pack.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,6 @@ if [ ! -f "$LINK_TO/git-credential-manager" ]; then
126126
"$LINK_TO/git-credential-manager" || exit 1
127127
fi
128128

129-
# Create legacy symlink with older name
130-
if [ ! -f "$LINK_TO/git-credential-manager-core" ]; then
131-
ln -s -r "$INSTALL_TO/git-credential-manager" \
132-
"$LINK_TO/git-credential-manager-core" || exit 1
133-
fi
134-
135129
dpkg-deb -Zxz --build "$DEBROOT" "$DEBPKG" || exit 1
136130

137131
echo $MESSAGE

src/osx/Installer.Mac/scripts/postinstall

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ fi
3030
mkdir -p /usr/local/bin
3131
/bin/ln -Fs "$INSTALL_DESTINATION/git-credential-manager" /usr/local/bin/git-credential-manager
3232

33-
# Create legacy symlink to GCMCore in /usr/local/bin
34-
/bin/ln -Fs "$INSTALL_DESTINATION/git-credential-manager" /usr/local/bin/git-credential-manager-core
35-
3633
# Configure GCM for the current user (running as the current user to avoid root
3734
# from taking ownership of ~/.gitconfig)
3835
sudo -u ${USER} "$INSTALL_DESTINATION/git-credential-manager" configure

src/shared/Core/Constants.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ public static class HelpUrls
210210
public const string GcmCredentialStores = "https://aka.ms/gcm/credstores";
211211
public const string GcmWamComSecurity = "https://aka.ms/gcm/wamadmin";
212212
public const string GcmAutoDetect = "https://aka.ms/gcm/autodetect";
213-
public const string GcmExecRename = "https://aka.ms/gcm/rename";
214213
public const string GcmDefaultAccount = "https://aka.ms/gcm/defaultaccount";
215214
public const string GcmMultipleUsers = "https://aka.ms/gcm/multipleusers";
216215
}

src/shared/Git-Credential-Manager/Program.cs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -55,36 +55,6 @@ private static void AppMain(object o)
5555
// Write the start and version events
5656
context.Trace2.Start(context.ApplicationPath, args);
5757

58-
//
59-
// Git Credential Manager's executable used to be named "git-credential-manager-core" before
60-
// dropping the "-core" suffix. In order to prevent "helper not found" errors for users who
61-
// haven't updated their configuration, we include either a 'shim' or symlink with the old name
62-
// that print warning messages about using the old name, and then continue execution of GCM.
63-
//
64-
// On Windows the shim is an exact copy of the main "git-credential-manager.exe" executable
65-
// with the old name. We inspect argv[0] to see which executable we are launched as.
66-
//
67-
// On UNIX systems we do the same check, except instead of a copy we use a symlink.
68-
//
69-
string appPath = context.ApplicationPath;
70-
if (!string.IsNullOrWhiteSpace(appPath))
71-
{
72-
// Trim any (.exe) file extension if we're on Windows
73-
// Note that in some circumstances (like being called by Git when config is set
74-
// to just `helper = manager-core`) we don't always have ".exe" at the end.
75-
if (PlatformUtils.IsWindows() && appPath.EndsWith(".exe", StringComparison.OrdinalIgnoreCase))
76-
{
77-
appPath = appPath.Substring(0, appPath.Length - 4);
78-
}
79-
if (appPath.EndsWith("git-credential-manager-core", StringComparison.OrdinalIgnoreCase))
80-
{
81-
context.Streams.Error.WriteLine(
82-
"warning: git-credential-manager-core was renamed to git-credential-manager");
83-
context.Streams.Error.WriteLine(
84-
$"warning: see {Constants.HelpUrls.GcmExecRename} for more information");
85-
}
86-
}
87-
8858
// Register all supported host providers at the normal priority.
8959
// The generic provider should never win against a more specific one, so register it with low priority.
9060
app.RegisterProvider(new AzureReposHostProvider(context), HostProviderPriority.Normal);

src/windows/Installer.Windows/layout.ps1

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,24 +54,17 @@ dotnet publish "$GCM_UI_SRC" `
5454
Write-Output "Publishing Bitbucket UI helper..."
5555
dotnet publish "$BITBUCKET_UI_SRC" `
5656
--configuration "$CONFIGURATION" `
57-
--output "$PAYLOAD"
57+
--output "$PAYLOAD"
5858

5959
Write-Output "Publishing GitHub UI helper..."
6060
dotnet publish "$GITHUB_UI_SRC" `
6161
--configuration "$CONFIGURATION" `
62-
--output "$PAYLOAD"
62+
--output "$PAYLOAD"
6363

6464
Write-Output "Publishing GitLab UI helper..."
6565
dotnet publish "$GITLAB_UI_SRC" `
6666
--configuration "$CONFIGURATION" `
67-
--output "$PAYLOAD"
68-
69-
# Create copy of main GCM executable with older "GCM Core" name
70-
Copy-Item -Path "$PAYLOAD/git-credential-manager.exe" `
71-
-Destination "$PAYLOAD/git-credential-manager-core.exe"
72-
73-
Copy-Item -Path "$PAYLOAD/git-credential-manager.exe.config" `
74-
-Destination "$PAYLOAD/git-credential-manager-core.exe.config"
67+
--output "$PAYLOAD"
7568

7669
# Delete libraries that are not needed for Windows but find their way
7770
# into the publish output.

0 commit comments

Comments
 (0)