1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-19 21:03:15 +03:00

Move DiffContextSize and RenameSimilarityThreshold to user config

This commit is contained in:
Stefan Haller
2025-07-07 15:16:51 +02:00
parent 8d7bfd131e
commit f318e45e9d
17 changed files with 73 additions and 64 deletions

View File

@ -254,7 +254,7 @@ func (self *CommitCommands) AmendHeadCmdObj() *oscommands.CmdObj {
}
func (self *CommitCommands) ShowCmdObj(hash string, filterPath string) *oscommands.CmdObj {
contextSize := self.AppState.DiffContextSize
contextSize := self.UserConfig().Git.DiffContextSize
extDiffCmd := self.UserConfig().Git.Paging.ExternalDiffCommand
cmdArgs := NewGitCmd("show").
@ -269,7 +269,7 @@ func (self *CommitCommands) ShowCmdObj(hash string, filterPath string) *oscomman
Arg("-p").
Arg(hash).
ArgIf(self.UserConfig().Git.IgnoreWhitespaceInDiffView, "--ignore-all-space").
Arg(fmt.Sprintf("--find-renames=%d%%", self.AppState.RenameSimilarityThreshold)).
Arg(fmt.Sprintf("--find-renames=%d%%", self.UserConfig().Git.RenameSimilarityThreshold)).
ArgIf(filterPath != "", "--", filterPath).
Dir(self.repoPaths.worktreePath).
ToArgv()