merge-recur: Explain why sha_eq() and struct stage_data cannot go
There were two TODOs to remove sha_eq() and to convert users of struct stage_data to active_cache users, but this is not possible. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Johannes Schindelin committed
Jul 27, 2006 at 19:14 UTC
3058e9339f05379462b7e14d832d091cc3d9b2b9
1 file changed
+4
-5
merge-recursive.c
+4
-5
@@ -47,8 +47,8 @@ static struct commit *make_virtual_commit(struct tree *tree, const char *comment
47
}
48
49
/*
50
- * TODO: we should not have to copy the SHA1s around, but rather reference
51
- * them. That way, sha_eq() is just sha1 == sha2.
50
+ * Since we use get_tree_entry(), which does not put the read object into
51
+ * the object pool, we cannot rely on a == b.
52
*/
53
static int sha_eq(const unsigned char *a, const unsigned char *b)
54
{
@@ -58,9 +58,8 @@ static int sha_eq(const unsigned char *a, const unsigned char *b)
58
}
59
60
/*
61
- * TODO: check if we can just reuse the active_cache structure: it is already
62
- * sorted (by name, stage).
63
- * Only problem: do not write it when flushing the cache.
61
+ * Since we want to write the index eventually, we cannot reuse the index
62
+ * for these (temporary) data.
63
*/
64
struct stage_data
65
{