mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45: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
|
@ -1526,8 +1526,8 @@ namespace SourceGit.ViewModels
|
|||
if (_useAmend)
|
||||
{
|
||||
var head = new Commands.QuerySingleCommit(_repo.FullPath, "HEAD").Result();
|
||||
return new Commands.QueryStagedChangesWithAmend(_repo.FullPath, head.Parents.Count == 0 ? "4b825dc642cb6eb9a060e54bf8d69288fbee4904" : "HEAD^").Result();
|
||||
}
|
||||
return new Commands.QueryStagedChangesWithAmend(_repo.FullPath, head.Parents.Count == 0 ? "4b825dc642cb6eb9a060e54bf8d69288fbee4904" : $"{head.SHA}^").Result();
|
||||
}
|
||||
|
||||
var rs = new List<Models.Change>();
|
||||
foreach (var c in _cached)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue