mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-07 20:04:59 +00:00
enhance: unstaged renamed file should use git restore --staged <path> <org_path>
instead of git restore --staged <path>
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
6620bd193e
commit
fa004ce31b
2 changed files with 5 additions and 1 deletions
|
@ -1675,7 +1675,11 @@ namespace SourceGit.ViewModels
|
|||
var step = changes.GetRange(i, Math.Min(10, count - i));
|
||||
var files = new List<string>();
|
||||
foreach (var c in step)
|
||||
{
|
||||
files.Add(c.Path);
|
||||
if (c.Index == Models.ChangeState.Renamed)
|
||||
files.Add(c.OriginalPath);
|
||||
}
|
||||
|
||||
await Task.Run(() => new Commands.Restore(_repo.FullPath, files, "--staged").Use(log).Exec());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue