1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Replace --include-untracked with -u in stash show command for compatibility and update failing tests

This commit is contained in:
Matteo Golinelli
2025-02-20 15:17:12 +01:00
committed by Jesse Duffield
parent 343a3e466a
commit d92c6d116b
2 changed files with 6 additions and 5 deletions

View File

@ -81,10 +81,11 @@ func (self *StashCommands) Hash(index int) (string, error) {
}
func (self *StashCommands) ShowStashEntryCmdObj(index int) oscommands.ICmdObj {
// "-u" is the same as "--include-untracked", but the latter fails in older git versions for some reason
cmdArgs := NewGitCmd("stash").Arg("show").
Arg("-p").
Arg("--stat").
Arg("--include-untracked").
Arg("-u").
Arg(fmt.Sprintf("--color=%s", self.UserConfig().Git.Paging.ColorArg)).
Arg(fmt.Sprintf("--unified=%d", self.AppState.DiffContextSize)).
ArgIf(self.AppState.IgnoreWhitespaceInDiffView, "--ignore-all-space").