mirror of
https://github.com/dolthub/dolt.git
synced 2026-04-29 19:39:52 -05:00
simpler Rebase optimization
This commit is contained in:
@@ -865,14 +865,17 @@ func (nbs *NomsBlockStore) Rebase(ctx context.Context) error {
|
||||
nbs.mu.Lock()
|
||||
defer nbs.mu.Unlock()
|
||||
exists, contents, err := nbs.mm.Fetch(ctx, nbs.stats)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if exists {
|
||||
newTables, err := nbs.tables.Rebase(ctx, contents.specs, nbs.stats)
|
||||
if contents.lock == nbs.upstream.lock {
|
||||
// short-circuit if manifest is unchanged
|
||||
return nil
|
||||
}
|
||||
|
||||
newTables, err := nbs.tables.Rebase(ctx, contents.specs, nbs.stats)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user