Commit ea59519
committed
cmd/git(fix[GitRemoteManager.add]): Validate mirror parameter correctly
why: The assert statement was checking `any(f for f in ["push", "fetch"])`
which always returns True since non-empty strings are truthy. The actual
mirror value was never validated.
what:
- Replace always-true assertion with proper validation
- Raise ValueError if mirror is not 'push' or 'fetch'
- Fix --mirror syntax to use = format per git-remote docs
- Simplify bool check with elif1 parent 7cf3f46 commit ea59519
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4265 | 4265 | | |
4266 | 4266 | | |
4267 | 4267 | | |
4268 | | - | |
4269 | | - | |
4270 | | - | |
| 4268 | + | |
| 4269 | + | |
| 4270 | + | |
| 4271 | + | |
| 4272 | + | |
4271 | 4273 | | |
4272 | 4274 | | |
4273 | 4275 | | |
| |||
0 commit comments