Skip to content

Commit

Permalink
merge: cleanup ErrTooManyUniqueLines
Browse files Browse the repository at this point in the history
  • Loading branch information
fcharlie committed Dec 6, 2024
1 parent 6e077ad commit 23a0439
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/zeta/odb/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"strings"

"github.com/antgroup/hugescm/modules/diferenco"
"github.com/antgroup/hugescm/modules/diffmatchpatch"
"github.com/antgroup/hugescm/modules/merkletrie"
"github.com/antgroup/hugescm/modules/merkletrie/noder"
"github.com/antgroup/hugescm/modules/plumbing"
Expand Down Expand Up @@ -381,7 +380,7 @@ func (d *ODB) mergeEntry(ctx context.Context, ch *ChangeEntry, opts *MergeOption
M: opts.MergeDriver,
G: opts.TextGetter,
})
if err == object.ErrNotTextContent || err == diffmatchpatch.ErrTooManyUniqueLines {
if err == object.ErrNotTextContent {
result.Messages = append(result.Messages, tr.Sprintf("warning: Cannot merge binary files: %s (%s vs. %s)", ch.Path, opts.Branch1, opts.Branch2))
result.Conflicts = append(result.Conflicts, ch.makeConflict(CONFLICT_BINARY))
return &TreeEntry{Path: ch.Path, TreeEntry: ch.Our}, nil
Expand Down Expand Up @@ -429,7 +428,7 @@ func (d *ODB) mergeEntry(ctx context.Context, ch *ChangeEntry, opts *MergeOption
M: opts.MergeDriver,
G: opts.TextGetter,
})
if err == object.ErrNotTextContent || err == diffmatchpatch.ErrTooManyUniqueLines {
if err == object.ErrNotTextContent {
result.Messages = append(result.Messages, tr.Sprintf("warning: Cannot merge binary files: %s (%s vs. %s)", ch.Path, opts.Branch1, opts.Branch2))
result.Conflicts = append(result.Conflicts, ch.makeConflict(CONFLICT_BINARY))
return &TreeEntry{Path: ch.Path, TreeEntry: ch.Our}, nil
Expand Down

0 comments on commit 23a0439

Please sign in to comment.