feat(log): allow to disable git.log.order

This commit is contained in:
Ryooooooga 2023-01-28 21:10:57 +09:00
parent 679b0456f3
commit 2183c157d4
No known key found for this signature in database
GPG key ID: 07CF200DFCC20C25
3 changed files with 28 additions and 6 deletions

View file

@ -426,7 +426,10 @@ func (self *CommitLoader) getLogCmd(opts GetCommitsOptions) oscommands.ICmdObj {
config := self.UserConfig.Git.Log
orderFlag := "--" + config.Order
orderFlag := ""
if config.Order != "default" {
orderFlag = " --" + config.Order
}
allFlag := ""
if opts.All {
allFlag = " --all"
@ -434,7 +437,7 @@ func (self *CommitLoader) getLogCmd(opts GetCommitsOptions) oscommands.ICmdObj {
return self.cmd.New(
fmt.Sprintf(
"git -c log.showSignature=false log %s %s %s --oneline %s%s --abbrev=%d%s",
"git -c log.showSignature=false log %s%s%s --oneline %s%s --abbrev=%d%s",
self.cmd.Quote(opts.RefName),
orderFlag,
allFlag,