summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 696ee23)
raw | patch | inline | side by side (parent: 696ee23)
author | Miklos Vajna <vmiklos@frugalware.org> | |
Fri, 5 Sep 2008 17:26:42 +0000 (19:26 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 5 Sep 2008 18:57:54 +0000 (11:57 -0700) |
We now just leave the object->sha1 field of virtual commits 0{40} as it
is initialized, as a unique hash is not necessary in case of virtual
commits.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
is initialized, as a unique hash is not necessary in case of virtual
commits.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-recursive.c | patch | blob | history |
diff --git a/merge-recursive.c b/merge-recursive.c
index 1c24c31e5b96ff5d3c556b86c5422d93c2353d95..dbdb9ac2c41d700f7d8521f25a5d45aefd0829c7 100644 (file)
--- a/merge-recursive.c
+++ b/merge-recursive.c
}
/*
- * A virtual commit has
- * - (const char *)commit->util set to the name, and
- * - *(int *)commit->object.sha1 set to the virtual id.
+ * A virtual commit has (const char *)commit->util set to the name.
*/
struct commit *make_virtual_commit(struct tree *tree, const char *comment)
{
struct commit *commit = xcalloc(1, sizeof(struct commit));
- static unsigned virtual_id = 1;
commit->tree = tree;
commit->util = (void*)comment;
- *(int*)commit->object.sha1 = virtual_id++;
/* avoid warnings */
commit->object.parsed = 1;
return commit;