mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
refactor: rewrite amend behaviour (#300)
* toggle amend will show changes in HEAD commit * since discard is not compatible with staged changes in `amend` mode, we only allows user to discard unstaged changes
This commit is contained in:
parent
3c5a661fa0
commit
f55a576013
9 changed files with 261 additions and 86 deletions
|
@ -22,12 +22,19 @@ namespace SourceGit.Models
|
|||
Untracked
|
||||
}
|
||||
|
||||
public class ChangeDataForAmend
|
||||
{
|
||||
public string FileMode { get; set; } = "";
|
||||
public string ObjectHash { get; set; } = "";
|
||||
}
|
||||
|
||||
public class Change
|
||||
{
|
||||
public ChangeState Index { get; set; }
|
||||
public ChangeState Index { get; set; } = ChangeState.None;
|
||||
public ChangeState WorkTree { get; set; } = ChangeState.None;
|
||||
public string Path { get; set; } = "";
|
||||
public string OriginalPath { get; set; } = "";
|
||||
public ChangeDataForAmend DataForAmend { get; set; } = null;
|
||||
|
||||
public bool IsConflit
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue