mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
feature: supports switch histories order mode (#705)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
f45bed6f92
commit
b25f9bdb6c
9 changed files with 69 additions and 5 deletions
|
@ -6,11 +6,13 @@ namespace SourceGit.Commands
|
|||
{
|
||||
public class QueryCommits : Command
|
||||
{
|
||||
public QueryCommits(string repo, string limits, bool needFindHead = true)
|
||||
public QueryCommits(string repo, bool useTopoOrder, string limits, bool needFindHead = true)
|
||||
{
|
||||
var order = useTopoOrder ? "--topo-order" : "--date-order";
|
||||
|
||||
WorkingDirectory = repo;
|
||||
Context = repo;
|
||||
Args = "log --date-order --no-show-signature --decorate=full --pretty=format:%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%s " + limits;
|
||||
Args = $"log {order} --no-show-signature --decorate=full --pretty=format:%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%s {limits}";
|
||||
_findFirstMerged = needFindHead;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue