Commit de426ea6e11d30934ad252a54e6cfad88f3ed054

Stefan Sperling 2019-08-03T15:54:19

schedule_for_deletion(): return success if file is already deleted

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/worktree.c b/lib/worktree.c
index 64ad2d2..7587a67 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -2532,7 +2532,7 @@ schedule_for_deletion(const char *ondisk_path, struct got_fileindex *fileindex,
 
 	if (status != GOT_STATUS_NO_CHANGE) {
 		if (status == GOT_STATUS_DELETE)
-			return got_error_set_errno(ENOENT, ondisk_path);
+			return NULL;
 		if (status != GOT_STATUS_MODIFY)
 			return got_error(GOT_ERR_FILE_STATUS);
 		if (!delete_local_mods)