File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ type File struct {
41
41
42
42
// String returns a git diff representation of this file. The value can be
43
43
// parsed by this library to obtain the same File, but may not be the same as
44
- // the original input or the same as what Git would produces
44
+ // the original input.
45
45
func (f * File ) String () string {
46
46
var diff strings.Builder
47
47
newFormatter (& diff ).FormatFile (f )
@@ -219,6 +219,10 @@ const (
219
219
BinaryPatchLiteral
220
220
)
221
221
222
+ // String returns a git diff format of this fragment. Due to differences in
223
+ // zlib implementation between Go and Git, encoded binary data in the result
224
+ // will likely differ from what Git produces for the same input. See
225
+ // [File.String] for more details on this format.
222
226
func (f * BinaryFragment ) String () string {
223
227
var diff strings.Builder
224
228
newFormatter (& diff ).FormatBinaryFragment (f )
You can’t perform that action at this time.
0 commit comments