cli/pkg
Tim Rogers c719d920c3
When renaming an existing remote in gh repo fork, log the change
When running `gh repo fork` in the context of an existing repo, the CLI offers to create a remote for the fork:

```
? Would you like to add a remote for the fork? Yes
```

If you accept, it prints a log stating that the `origin` remote has been created:

```
✓ Added remote origin
```

Where there is an existing `origin` remote, this is renamed to `upstream`, but this is done silently without any notification to the user.

```bash
$ git remote -v
origin	https://github.com/timrogers/badger.github.io.git (fetch)
origin	https://github.com/timrogers/badger.github.io.git (push)
upstream	https://github.com/badger/badger.github.io.git (fetch)
upstream	https://github.com/badger/badger.github.io.git (push)
```

It seems kinda fine to rename the remote without explicitly confirming since this is not a truly destructive action, but it should make it clear what it is doing.

This updates the logging to explicitly log about the renaming of
the existing remote:

```
✓ Renamed remote origin to upstream
```

Fixes #9982.
2024-11-30 21:19:55 +00:00
..
cmd When renaming an existing remote in gh repo fork, log the change 2024-11-30 21:19:55 +00:00
cmdutil Fix repo fork to use remote protocol if none configured 2024-05-10 10:48:36 +02:00
extensions gh extension install not give an error if extension already installed and a clear message (#8211) 2023-10-19 15:22:21 +02:00
findsh go fmt 2021-12-02 16:12:24 +01:00
githubtemplate Add issue create --editor 2024-07-09 21:01:50 +09:00
httpmock ScopesResponder wraps StatusScopesResponder 2024-11-23 13:19:45 -07:00
iostreams Print filtered gists similar to code search 2024-10-12 23:17:56 -07:00
jsoncolor Wrap JSON arrays, objects in array with --slurp 2024-04-04 01:26:05 -07:00
jsonfieldstest Add tests for JSON field support on issue and pr view commands 2024-07-12 17:35:54 +02:00
markdown Allow user to override markdown wrap width via $GH_MDWIDTH from environment 2024-10-04 17:43:06 -07:00
option Add further docs to Option type 2024-05-10 11:05:59 +02:00
search Add json export flags to variable list command (#8516) 2024-01-17 10:09:09 -08:00
set Add GH_HOST to hosts list if it has corresponding auth token (#5087) 2022-01-29 07:37:24 +00:00
ssh Minor nit suggestion 2024-11-06 16:12:55 -05:00
surveyext Unify use of tab indent in non-test source files 2024-08-03 00:35:30 +08:00