config/packages/tools/brig/fix-replay-remove-already-gone.patch

16 lines
526 B
Diff
Raw Permalink Normal View History

2022-06-17 23:27:15 +03:00
diff --git a/catfs/vcs/change.go b/catfs/vcs/change.go
index 94800b23..e454c399 100644
--- a/catfs/vcs/change.go
+++ b/catfs/vcs/change.go
@@ -234,6 +234,10 @@ func replayAddMoveMapping(lkr *c.Linker, oldPath, newPath string) error {
func replayRemove(lkr *c.Linker, ch *Change) error {
currNd, err := lkr.LookupModNode(ch.Curr.Path())
if err != nil {
+ // file doesn't exist locally, nothing to do
+ if ie.IsNoSuchFileError(err) {
+ return nil
+ }
return e.Wrapf(err, "replay: lookup: %v", ch.Curr.Path())
}