Skip to content

Commit

Permalink
plumbing: fix dropped error (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
alrs authored Aug 10, 2020
1 parent 4ee62c4 commit ad8f633
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plumbing/patch_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ func UnifiedPatchOnGit(patch string, commit *object.Commit, w, originWorktree *g
}
newBytes := bytes.NewBuffer(nil)
_, err = io.Copy(newBytes, newFile)
if err != nil {
patchError = fmt.Errorf("Unable to copy %s to a buffer: %v", file.NewName, err)
return ""
}
contents = newBytes.String()
_ = newFile.Close()
}
Expand Down

0 comments on commit ad8f633

Please sign in to comment.