diff --git a/src/Commands/Worktree.cs b/src/Commands/Worktree.cs index 7516b1e3..27c0e28e 100644 --- a/src/Commands/Worktree.cs +++ b/src/Commands/Worktree.cs @@ -73,6 +73,8 @@ namespace SourceGit.Commands if (!string.IsNullOrEmpty(tracking)) Args += tracking; + else if (!string.IsNullOrEmpty(name) && !createNew) + Args += name; _outputHandler = outputHandler; return Exec(); diff --git a/src/ViewModels/AddWorktree.cs b/src/ViewModels/AddWorktree.cs index cf736029..6c1c7481 100644 --- a/src/ViewModels/AddWorktree.cs +++ b/src/ViewModels/AddWorktree.cs @@ -12,7 +12,7 @@ namespace SourceGit.ViewModels public string Path { get => _path; - set => SetProperty(ref _path, value); + set => SetProperty(ref _path, value, true); } public bool CreateNewBranch