Commit 1251a9e5a52510aea3b03f1228de7404e6f95a3a

Stefan Sperling 2019-05-10T13:06:00

note potential problem in the existing out-of-dateness check

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/lib/worktree.c b/lib/worktree.c
index c00c98a..a4c605a 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -2785,6 +2785,14 @@ check_ct_out_of_date(struct commitable *ct, struct got_repository *repo,
 	const struct got_error *err = NULL;
 	struct got_object_id *id_in_head;
 
+	/*
+	 * XXX This should probably be checking each commit from
+	 * worktree's base_commit -> head and verify that the
+	 * same blob exists in each of these commits.
+	 * Removals+additions within this line of history could mean
+	 * that renames have occured in which case we should really
+	 * be forcing the user to run an update...
+	 */
 	err = got_object_id_by_path(&id_in_head, repo,
 	    head_commit_id, ct->in_repo_path);
 	if (err) {