summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git_commands/diff.go
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2024-01-15 15:53:06 +0100
committerStefan Haller <stefan@haller-berlin.de>2024-02-18 15:22:43 +0100
commitd329c9255436316869560d2d96766bc62453d8c2 (patch)
tree729aa7369a4a8368fee3725a8e0fcbbe1a4e7fc8 /pkg/commands/git_commands/diff.go
parentafbaf82395a76514333557453458a22ec736ad6e (diff)
Set diff.noprefix=false for all other diff commands too
This fixes problems with being able to stage things in a custom patch correctly.
Diffstat (limited to 'pkg/commands/git_commands/diff.go')
-rw-r--r--pkg/commands/git_commands/diff.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/commands/git_commands/diff.go b/pkg/commands/git_commands/diff.go
index 73b30bc48..9f81bb91d 100644
--- a/pkg/commands/git_commands/diff.go
+++ b/pkg/commands/git_commands/diff.go
@@ -15,6 +15,7 @@ func NewDiffCommands(gitCommon *GitCommon) *DiffCommands {
func (self *DiffCommands) DiffCmdObj(diffArgs []string) oscommands.ICmdObj {
return self.cmd.New(
NewGitCmd("diff").
+ Config("diff.noprefix=false").
Arg("--submodule", "--no-ext-diff", "--color").
Arg(diffArgs...).
Dir(self.repoPaths.worktreePath).
@@ -24,6 +25,7 @@ func (self *DiffCommands) DiffCmdObj(diffArgs []string) oscommands.ICmdObj {
func (self *DiffCommands) internalDiffCmdObj(diffArgs ...string) *GitCommandBuilder {
return NewGitCmd("diff").
+ Config("diff.noprefix=false").
Arg("--no-ext-diff", "--no-color").
Arg(diffArgs...).
Dir(self.repoPaths.worktreePath)
@@ -87,6 +89,7 @@ func (self *DiffCommands) OpenDiffToolCmdObj(opts DiffToolCmdOptions) oscommands
func (self *DiffCommands) DiffIndexCmdObj(diffArgs ...string) oscommands.ICmdObj {
return self.cmd.New(
NewGitCmd("diff-index").
+ Config("diff.noprefix=false").
Arg("--submodule", "--no-ext-diff", "--no-color", "--patch").
Arg(diffArgs...).ToArgv(),
)