From: Eric W. Biederman Date: Fri, 24 Feb 2006 12:58:34 GMT Subject: Re: [PATCH] commit-tree: disallow an empty single-parent commit. Message-ID: In-Reply-To: <7vslq99cd5.fsf_-_@assigned-by-dhcp.cox.net> Junio C Hamano writes: > Allow "git-commit-tree v2.6.15^{tree} -p HEAD", instead of > requiring "git-commit-tree `git rev-parse v2.6.15^{tree}` -p > HEAD". The parent parameter that follows -p uses get_sha1() to > understand the extended notation, and there is little reason not > to allow it for the tree object name parameter. > > Also make the check_valid() function simpler. This function > which predates sha1_object_info() so it had to do things by hand > but there is no reason to read the data just to discard anymore. > > Signed-off-by: Junio C Hamano Looks good to me. The logic at least looks complete. Eric