Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1041030

Browse files
committedNov 15, 2022
fix(diff): don't include signoffs when formatting patch
Diff tests keep failing bacause I have format.signOff set to true in my gitconfig
1 parent 58d9f16 commit 1041030

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎repo_diff.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,15 @@ func (r *Repository) RawDiff(rev string, diffType RawDiffFormat, w io.Writer, op
126126
if commit.ParentsCount() == 0 {
127127
cmd = cmd.AddArgs("format-patch").
128128
AddOptions(opt.CommandOptions).
129-
AddArgs("--full-index", "--no-signature", "--stdout", "--root", rev)
129+
AddArgs("--full-index", "--no-signoff", "--no-signature", "--stdout", "--root", rev)
130130
} else {
131131
c, err := commit.Parent(0)
132132
if err != nil {
133133
return err
134134
}
135135
cmd = cmd.AddArgs("format-patch").
136136
AddOptions(opt.CommandOptions).
137-
AddArgs("--full-index", "--no-signature", "--stdout", rev+"..."+c.ID.String())
137+
AddArgs("--full-index", "--no-signoff", "--no-signature", "--stdout", rev+"..."+c.ID.String())
138138
}
139139
default:
140140
return fmt.Errorf("invalid diffType: %s", diffType)

0 commit comments

Comments
 (0)
Please sign in to comment.