refactor!: remove the diff-size cap and its gate.diff-size step
This commit is contained in:
20 files changed
+132
-241
No files matched your search
@@ -630,20 +630,6 @@ func (m *Manager) HasUncommittedChanges(ctx context.Context, dir string) (bool,
|
||||
return !status.IsClean(), nil
|
||||
}
|
||||
|
||||
// ChangedLines reports lines added+deleted vs the base branch -- the
|
||||
// input to the diff-size cap.
|
||||
func (m *Manager) ChangedLines(ctx context.Context, dir, base string) (int, error) {
|
||||
p, err := m.patch(ctx, dir, base)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
total := 0
|
||||
for _, stat := range p.Stats() {
|
||||
total += stat.Addition + stat.Deletion
|
||||
}
|
||||
return total, nil
|
||||
}
|
||||
|
||||
// Diff returns the unified diff of all committed changes against base.
|
||||
func (m *Manager) Diff(ctx context.Context, dir, base string) (string, error) {
|
||||
p, err := m.patch(ctx, dir, base)
|
||||
|
||||
Reference in new issue
Block a user