Commit 78cb696
committed
fork: Allow forking from remotes other than "origin"
The fork command can be used in two ways:
1. when passed a namespaced project name (e.g. "SomeGroup/AwesomeProject"),
the project is forked (and optionally cloned)
2. without arguments, the project name is determined from the "origin"
remote in the current repository, forked and added as remote
The second mode currently doesn't work if the repository pointed to by
"origin" doesn't use the Namespace/Project structure gitlab expects.
Support that use case by also picking the second mode when the passed
argument corresponds to an existing remote.
Fixes #5631 parent 7c2c165 commit 78cb696
1 file changed
Lines changed: 22 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
52 | 61 | | |
53 | 62 | | |
54 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
55 | 73 | | |
56 | 74 | | |
57 | 75 | | |
58 | | - | |
| 76 | + | |
59 | 77 | | |
60 | 78 | | |
61 | 79 | | |
| |||
82 | 100 | | |
83 | 101 | | |
84 | 102 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | 103 | | |
91 | 104 | | |
92 | 105 | | |
| |||
0 commit comments