author | Christian Couder <chriscool@tuxfamily.org> | |
Sun, 17 May 2009 15:36:45 +0000 (17:36 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 18 May 2009 06:19:32 +0000 (23:19 -0700) | ||
commit | 836a3fd5b0c439642268fd1299cd16729f15e614 | |
tree | 7ab2043a0070ddb232f11f40298a81c5e28a3851 | tree | snapshot |
parent | a22347c6c866c94e9e941b1b39d57ea43218af96 | commit | diff |
commit: add function to unparse a commit and its parents
This patch adds the "unparse_commit" function that returns a commit
into an unparsed state by freeing its data and resetting its fields
to 0.
Its parents are recursively unparsed too, because they might have
been changed. But its tree is not unparsed as it should not have
been modifed.
Note that as the "flags" and "used" fields may be used even if the
object is not parsed, we have to reset them anyway.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This patch adds the "unparse_commit" function that returns a commit
into an unparsed state by freeing its data and resetting its fields
to 0.
Its parents are recursively unparsed too, because they might have
been changed. But its tree is not unparsed as it should not have
been modifed.
Note that as the "flags" and "used" fields may be used even if the
object is not parsed, we have to reset them anyway.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit.c | diff | blob | history | |
commit.h | diff | blob | history |