Skip to content

Commit 8dfe882

Browse files
committed
enhance: use -B instead of -b to support creating worktree with existed branch (#205)
1 parent ac00d1a commit 8dfe882

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Commands/Worktree.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public bool Add(string fullpath, string name, string tracking, Action<string> ou
7070
Args += "--track ";
7171

7272
if (!string.IsNullOrEmpty(name))
73-
Args += $"-b {name} ";
73+
Args += $"-B {name} ";
7474

7575
Args += $"\"{fullpath}\" ";
7676

src/Views/Launcher.axaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ public partial class Launcher : ChromelessWindow
1111
{
1212
public Launcher()
1313
{
14-
InitializeComponent();
15-
1614
var layout = ViewModels.Preference.Instance.Layout;
1715
WindowState = layout.LauncherWindowState;
1816

@@ -21,6 +19,8 @@ public Launcher()
2119
Width = layout.LauncherWidth;
2220
Height = layout.LauncherHeight;
2321
}
22+
23+
InitializeComponent();
2424
}
2525

2626
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)

0 commit comments

Comments
 (0)