Commit c4d4e857 authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Kirill Smelkov

pull: skip repository disapear during gitlab backup pull

If a repository is removed when git-backup is running, print a warning
message and continue pulling instead of exiting with error.

/reviewed-on !2
parent e37d99b4
......@@ -392,8 +392,13 @@ func cmd_pull_(gb *git.Repository, pullspecv []PullSpec) {
here := my.FuncName()
err := filepath.Walk(dir, func(path string, info os.FileInfo, err error) (errout error) {
// any error -> stop
if err != nil {
if os.IsNotExist(err) {
// a file or directory was removed in parallel to us scanning the tree.
infof("Warning: Skipping %s: %s", path, err)
return nil
}
// any other error -> stop
return err
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment