mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
fix: update visible staged changes retrieval in WorkingCopy (#1187)
* doc: Update translation status and missing keys * fix: update visible staged changes retrieval in WorkingCopy * fix: prevent unintended amend behavior when changing current branch --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
7d20f97f4e
commit
3b1018e0e2
3 changed files with 48 additions and 11 deletions
|
@ -162,7 +162,15 @@ namespace SourceGit.ViewModels
|
|||
public Models.Branch CurrentBranch
|
||||
{
|
||||
get => _currentBranch;
|
||||
private set => SetProperty(ref _currentBranch, value);
|
||||
private set
|
||||
{
|
||||
var oldHead = _currentBranch?.Head;
|
||||
if (SetProperty(ref _currentBranch, value))
|
||||
{
|
||||
if (oldHead != _currentBranch.Head && _workingCopy is { UseAmend: true })
|
||||
_workingCopy.UseAmend = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<BranchTreeNode> LocalBranchTrees
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue