mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -08:00
fix: don't reverse commit order when cherry-picking (#736)
Fixes #726. Looks like a980cc987d
isn't sufficient. It sorts the commits according to the ordering in history, but then CherryPick ViewModel reverses the order.
This commit changes CherryPick ViewModel to use string.Join on the commit list without reordering, so that the ordering is controlled entirely by the caller.
This commit is contained in:
parent
cd96a28545
commit
546f628470
1 changed files with 1 additions and 5 deletions
|
@ -85,13 +85,9 @@ namespace SourceGit.ViewModels
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var builder = new StringBuilder();
|
|
||||||
for (int i = Targets.Count - 1; i >= 0; i--)
|
|
||||||
builder.Append($"{Targets[i].SHA} ");
|
|
||||||
|
|
||||||
succ = new Commands.CherryPick(
|
succ = new Commands.CherryPick(
|
||||||
_repo.FullPath,
|
_repo.FullPath,
|
||||||
builder.ToString(),
|
string.Join(' ', Targets.ConvertAll(c => c.SHA)),
|
||||||
!AutoCommit,
|
!AutoCommit,
|
||||||
AppendSourceToMessage,
|
AppendSourceToMessage,
|
||||||
string.Empty).Exec();
|
string.Empty).Exec();
|
||||||
|
|
Loading…
Reference in a new issue