fix: prevent target branch HEAD from being changed when adding worktree (#919)

* fix: prevent target branch HEAD from being changed when adding worktree

Signed-off-by: Gadfly <gadfly@gadfly.vip>

* fix: worktree path validator trigger error

Signed-off-by: Gadfly <gadfly@gadfly.vip>

---------

Signed-off-by: Gadfly <gadfly@gadfly.vip>
This commit is contained in:
GadflyFang
2025-01-21 13:58:07 +08:00
committed by GitHub
parent 38e7b69450
commit 6482ef227a
2 changed files with 3 additions and 1 deletions

View File

@@ -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();

View File

@@ -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