fix: prevent target branch HEAD from being changed when adding worktree (#919)
Some checks are pending
Continuous Integration / Build (push) Waiting to run
Continuous Integration / Prepare version string (push) Waiting to run
Continuous Integration / Package (push) Blocked by required conditions

* 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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -73,6 +73,8 @@ namespace SourceGit.Commands
if (!string.IsNullOrEmpty(tracking)) if (!string.IsNullOrEmpty(tracking))
Args += tracking; Args += tracking;
else if (!string.IsNullOrEmpty(name) && !createNew)
Args += name;
_outputHandler = outputHandler; _outputHandler = outputHandler;
return Exec(); return Exec();

View file

@ -12,7 +12,7 @@ namespace SourceGit.ViewModels
public string Path public string Path
{ {
get => _path; get => _path;
set => SetProperty(ref _path, value); set => SetProperty(ref _path, value, true);
} }
public bool CreateNewBranch public bool CreateNewBranch