Commit 6201aef37bbf2daa3a7863f08751a08392855c85

Stefan Sperling 2020-02-02T09:20:56

ignore EROFS during checkout for repositories on read-only filesystems

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/lib/worktree.c b/lib/worktree.c
index f20acaa..17a07a2 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -1892,7 +1892,8 @@ checkout_files(struct got_worktree *worktree, struct got_fileindex *fileindex,
 
 	err = ref_base_commit(worktree, repo);
 	if (err) {
-		if (!(err->code == GOT_ERR_ERRNO && errno == EACCES))
+		if (!(err->code == GOT_ERR_ERRNO &&
+		    (errno == EACCES || errno == EROFS)))
 			goto done;
 		err = (*progress_cb)(progress_arg,
 		    GOT_STATUS_BASE_REF_ERR, worktree->root_path);