mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-24 05:35:00 +00:00
refactor: diff for staged file with --amend
enabled (#1231)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
78f4809875
commit
345ad06aba
4 changed files with 9 additions and 3 deletions
|
@ -26,6 +26,7 @@ namespace SourceGit.Models
|
|||
{
|
||||
public string FileMode { get; set; } = "";
|
||||
public string ObjectHash { get; set; } = "";
|
||||
public string ParentSHA { get; set; } = "";
|
||||
}
|
||||
|
||||
public class Change
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace SourceGit.Models
|
|||
else
|
||||
{
|
||||
if (change.DataForAmend != null)
|
||||
_extra = "--cached HEAD^";
|
||||
_extra = $"--cached {change.DataForAmend.ParentSHA}";
|
||||
else
|
||||
_extra = "--cached";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue