Fix DiffCut For New File (#2065)

hackweek-2024-team-14
Johannes Batzill 2024-05-24 01:10:29 +00:00 committed by Harness
parent bc568edd85
commit 43897cd593
1 changed files with 2 additions and 2 deletions

View File

@ -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{
@ -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{