From: Christian Couder Date: Sun, 17 May 2009 15:36:45 +0000 (+0200) Subject: commit: add function to unparse a commit and its parents X-Git-Tag: v1.6.4-rc0~102^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/836a3fd5b0c439642268fd1299cd16729f15e614?hp=836a3fd5b0c439642268fd1299cd16729f15e614 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 Signed-off-by: Junio C Hamano ---