Commit 4b8a0f7
committed
cmd/git(fix[create]): Use git branch instead of checkout -b for branch creation
why: git branch should create a branch without switching HEAD, but the
implementation used checkout -b which always switches. This violated
git-branch semantics and surprised callers expecting create-only behavior.
what:
- Change create() to use git branch instead of checkout -b
- Add checkout parameter to opt-in to switching after creation1 parent 62c48c6 commit 4b8a0f7
1 file changed
+35
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5385 | 5385 | | |
5386 | 5386 | | |
5387 | 5387 | | |
5388 | | - | |
| 5388 | + | |
| 5389 | + | |
| 5390 | + | |
| 5391 | + | |
| 5392 | + | |
5389 | 5393 | | |
5390 | 5394 | | |
| 5395 | + | |
| 5396 | + | |
| 5397 | + | |
| 5398 | + | |
| 5399 | + | |
| 5400 | + | |
5391 | 5401 | | |
5392 | 5402 | | |
5393 | 5403 | | |
| |||
5396 | 5406 | | |
5397 | 5407 | | |
5398 | 5408 | | |
5399 | | - | |
5400 | | - | |
5401 | | - | |
5402 | | - | |
5403 | | - | |
5404 | | - | |
| 5409 | + | |
| 5410 | + | |
5405 | 5411 | | |
5406 | 5412 | | |
| 5413 | + | |
| 5414 | + | |
| 5415 | + | |
5407 | 5416 | | |
5408 | 5417 | | |
5409 | 5418 | | |
| |||
5682 | 5691 | | |
5683 | 5692 | | |
5684 | 5693 | | |
5685 | | - | |
| 5694 | + | |
| 5695 | + | |
| 5696 | + | |
| 5697 | + | |
| 5698 | + | |
| 5699 | + | |
5686 | 5700 | | |
5687 | 5701 | | |
| 5702 | + | |
| 5703 | + | |
| 5704 | + | |
| 5705 | + | |
| 5706 | + | |
| 5707 | + | |
| 5708 | + | |
| 5709 | + | |
5688 | 5710 | | |
5689 | 5711 | | |
5690 | 5712 | | |
5691 | 5713 | | |
5692 | 5714 | | |
5693 | | - | |
5694 | | - | |
5695 | | - | |
5696 | | - | |
5697 | | - | |
5698 | | - | |
| 5715 | + | |
| 5716 | + | |
5699 | 5717 | | |
5700 | 5718 | | |
| 5719 | + | |
| 5720 | + | |
| 5721 | + | |
5701 | 5722 | | |
5702 | 5723 | | |
5703 | 5724 | | |
| |||
0 commit comments