Skip to content

Commit

Permalink
Fix DiffCut For New File (#2065)
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesHarness authored and Harness committed May 24, 2024
1 parent bc568ed commit 43897cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git/api/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ func (g *Git) diffCutFromBlob(

if asAdded {
for i := range cut.Lines {
cut.Lines[i] = "+ " + cut.Lines[i]
cut.Lines[i] = "+" + cut.Lines[i]
}

hunkHeader = parser.HunkHeader{
Expand All @@ -588,7 +588,7 @@ func (g *Git) diffCutFromBlob(
}
} else {
for i := range cut.Lines {
cut.Lines[i] = "- " + cut.Lines[i]
cut.Lines[i] = "-" + cut.Lines[i]
}

hunkHeader = parser.HunkHeader{
Expand Down

0 comments on commit 43897cd

Please sign in to comment.