Björn Engelmann <BjEngelmann@xxxxxx> writes: > That is why I said, all input should be validated by default. All I > proposed was > a) unify the tools in order to have less duplicate code > (git-mktag, git-mktree & git-hash-object do merely the same > except for the validating part) > b) remove the possibility to introduce unchecked objects of arbitrary > type (or only allow it with the -f = "force, use with caution"-option) > maybe I should have written "blob, tag, tree or commit" instead of > "arbitrary". I did not mean really arbitrary like it is implemented > right now in git-hash-object. Sorry, I forgot all about hash-objects X-<. It was a convenient way to try out new things such as 'gitlink'. Thanks for the clarification. As to unification, I am not sure if there are a lot to unify. Everybody starts with type, length and a LF, but after that each type has its own format constraints. A grand unified command that knows about format constraints of every type under the sun does not sound like a good approach. While we have only handful types (and I expect things will stay that way) it is not a big deal either way, though. And the common part is already shared (write_sha1_file_prepare() and write_sha1_file() from sha1_file.c). - : send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html