Skip to content

Commit 02204ac

Browse files
authored
Rename entry executable to drop "-core" suffix (#551)
Rename the main entry executable from `git-credential-manager-core(.exe)` to simply `git-credential-manager(.exe)`, now that the older GCM4W has been removed from the Git for Windows project as an option (and the GCMC project has been renamed). We do **not** rename the Debian package ID, nor the Homebrew Cask name yet as this will require more thought forr migration. To help with migration somewhat, create symlinks and shim/copy-executables for the original executable name "git-credential-manager-core(.exe)" for consumers who have not updated to the new version. We detect if the consumer is launching us via the "-core" symlink or executable shim by consulting the platform-native APIs to get the original "argv[0]". All of the .NET APIs sadly don't give us the real "argv[0]", so we need to use native APIs... If we detect use of the old name, print a warning that the user should update their configuration, and a help link for more information.
2 parents 7047f48 + a47e1ce commit 02204ac

File tree

34 files changed

+440
-83
lines changed

34 files changed

+440
-83
lines changed

.github/ISSUE_TEMPLATE/auth-problem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ assignees: ''
88

99
**Which version of GCM are you using?**
1010

11-
From a terminal, run `git credential-manager-core --version` and paste the output.
11+
From a terminal, run `git credential-manager --version` and paste the output.
1212

1313
<!-- Ex:
1414
Git Credential Manager version 2.0.8-beta+e1f8492d04 (macOS, .NET Core 4.6.27129.04)

.github/ISSUE_TEMPLATE/experimental.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ assignees: ''
88

99
**Which version of GCM are you using?**
1010

11-
From a terminal, run `git credential-manager-core --version` and paste the output.
11+
From a terminal, run `git credential-manager --version` and paste the output.
1212

1313
<!-- Ex:
1414
Git Credential Manager version 2.0.8-beta+e1f8492d04 (macOS, .NET Core 4.6.27129.04)

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,17 +443,17 @@ jobs:
443443
component:
444444
- os: ubuntu-latest
445445
artifact: linux-sign
446-
command: git-credential-manager-core
446+
command: git-credential-manager
447447
- os: macos-latest
448448
artifact: osx-x64-sign
449-
command: git-credential-manager-core
449+
command: git-credential-manager
450450
- os: windows-latest
451451
artifact: win-sign
452452
# Even when a standalone GCM version is installed, GitHub actions
453453
# runners still only recognize the version bundled with Git for
454454
# Windows due to its placement on the PATH. For this reason, we use
455455
# the full path to our installation to validate the Windows version.
456-
command: "$PROGRAMFILES (x86)/Git Credential Manager/git-credential-manager-core.exe"
456+
command: "$PROGRAMFILES (x86)/Git Credential Manager/git-credential-manager.exe"
457457
runs-on: ${{ matrix.component.os }}
458458
needs: [ osx-sign, win-sign, linux-sign ]
459459
steps:

.github/workflows/validate-install-from-source.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
fi
3333
3434
sh "${GITHUB_WORKSPACE}/src/linux/Packaging.Linux/install-from-source.sh" -y
35-
git-credential-manager-core --help || exit 1
35+
git-credential-manager --help || exit 1

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"request": "launch",
1111
"preLaunchTask": "build",
1212
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net6.0/git-credential-manager-core.dll",
13+
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net6.0/git-credential-manager.dll",
1414
"args": ["get"],
1515
"cwd": "${workspaceFolder}/out/shared/Git-Credential-Manager",
1616
"console": "integratedTerminal",
@@ -22,7 +22,7 @@
2222
"request": "launch",
2323
"preLaunchTask": "build",
2424
// If you have changed target frameworks, make sure to update the program path.
25-
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net6.0/git-credential-manager-core.dll",
25+
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net6.0/git-credential-manager.dll",
2626
"args": ["store"],
2727
"cwd": "${workspaceFolder}/out/shared/Git-Credential-Manager",
2828
"console": "integratedTerminal",

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Download the latest [.deb package][latest-release], and run the following:
116116

117117
```shell
118118
sudo dpkg -i <path-to-package>
119-
git-credential-manager-core configure
119+
git-credential-manager configure
120120
```
121121

122122
**Note:** Although packages were previously offered on certain
@@ -127,7 +127,7 @@ Debian package using the above instructions instead.
127127
To uninstall:
128128

129129
```shell
130-
git-credential-manager-core unconfigure
130+
git-credential-manager unconfigure
131131
sudo dpkg -r gcmcore
132132
```
133133

@@ -139,14 +139,14 @@ Download the latest [tarball][latest-release], and run the following:
139139

140140
```shell
141141
tar -xvf <path-to-tarball> -C /usr/local/bin
142-
git-credential-manager-core configure
142+
git-credential-manager configure
143143
```
144144

145145
To uninstall:
146146

147147
```shell
148-
git-credential-manager-core unconfigure
149-
rm $(command -v git-credential-manager-core)
148+
git-credential-manager unconfigure
149+
rm $(command -v git-credential-manager)
150150
```
151151

152152
#### Option 2: Install from source helper script

docs/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ library (C#). The library targets .NET Standard as well as .NET Framework.
5656
5757
The entry-point for GCM can be found in the `Git-Credential-Manager`
5858
project, a console application that targets both .NET and .NET Framework.
59-
This project emits the `git-credential-manager-core(.exe)` executable, and
59+
This project emits the `git-credential-manager(.exe)` executable, and
6060
contains very little code - registration of all supported host providers and
6161
running the `Application` object found in `Core`.
6262

docs/azrepos-users-and-tokens.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ In advanced scenarios (such as using multiple accounts) you can interact with
7070
and manage remembered user accounts using the 'azure-repos' provider command:
7171

7272
```shell
73-
git-credential-manager-core azure-repos [ list | bind | unbind | ... ] <options>
73+
git-credential-manager azure-repos [ list | bind | unbind | ... ] <options>
7474
```
7575

7676
##### Listing remembered accounts
@@ -79,7 +79,7 @@ You can list all bound user accounts by Git Credential Manager for each Azure
7979
DevOps organization using the `list` command:
8080

8181
```shell
82-
$ git-credential-manager-core azure-repos list
82+
$ git-credential-manager azure-repos list
8383
contoso:
8484
(global) -> [email protected]
8585
fabrikam:
@@ -105,7 +105,7 @@ the `.git/config` file. If there are local bindings in a repository you can show
105105
them with the `list` command:
106106

107107
```shell
108-
~/myrepo$ git-credential-manager-core azure-repos list
108+
~/myrepo$ git-credential-manager azure-repos list
109109
contoso:
110110
(global) -> [email protected]
111111
(local) -> [email protected]
@@ -118,7 +118,7 @@ To create a local binding, use the `bind` command with the `--local` option when
118118
inside a repository:
119119

120120
```shell
121-
~/myrepo$ git-credential-manager-core azure-repos bind --local contoso [email protected]
121+
~/myrepo$ git-credential-manager azure-repos bind --local contoso [email protected]
122122
```
123123

124124
```diff
@@ -132,7 +132,7 @@ inside a repository:
132132
To have Git Credential Manager forget a user account, use the `unbind` command:
133133

134134
```shell
135-
git-credential-manager-core azure-repos unbind fabrikam
135+
git-credential-manager azure-repos unbind fabrikam
136136
```
137137

138138
```diff
@@ -151,7 +151,7 @@ To forget or remove a local binding, within the repository run the `unbind`
151151
command with the `--local` option:
152152

153153
```shell
154-
~/myrepo$ git-credential-manager-core azure-repos unbind --local contoso
154+
~/myrepo$ git-credential-manager azure-repos unbind --local contoso
155155
```
156156

157157
```diff
@@ -170,7 +170,7 @@ To show which accounts are being used for each Git remote in a repository use
170170
the `list` command with the `--show-remotes` option:
171171

172172
```shell
173-
~/myrepo$ git-credential-manager-core azure-repos list --show-remotes
173+
~/myrepo$ git-credential-manager azure-repos list --show-remotes
174174
contoso:
175175
(global) -> [email protected]
176176
origin:
@@ -208,7 +208,7 @@ The `list --show-remotes` command will show the user account specified in the
208208
remote URL:
209209

210210
```shell
211-
~/myrepo$ git-credential-manager-core azure-repos list --show-remotes
211+
~/myrepo$ git-credential-manager azure-repos list --show-remotes
212212
contoso:
213213
(global) -> [email protected]
214214
origin:

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Additionally, GCM respects several GCM-specific [environment variables][envars]
2020
also configure [default values][enterprise-config] for many settings used by GCM.
2121

2222
GCM will only be used by Git if it is installed and configured. Use
23-
`git config --global credential.helper manager-core` to assign GCM as your
23+
`git config --global credential.helper manager` to assign GCM as your
2424
credential helper. Use `git config credential.helper` to see the current
2525
configuration.
2626

docs/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ error, or to an absolute file path to write trace information to a file.
105105
For example:
106106

107107
```shell
108-
$ GCM_TRACE=1 git-credential-manager-core version
108+
$ GCM_TRACE=1 git-credential-manager version
109109
> 18:47:56.526712 ...er/Application.cs:69 trace: [RunInternalAsync] Git Credential Manager version 2.0.124-beta+e1ebbe1517 (macOS, .NET 5.0) 'version'
110110
> Git Credential Manager version 2.0.124-beta+e1ebbe1517 (macOS, .NET 5.0)
111111
```

0 commit comments

Comments
 (0)