Re: [PATCH 0/2] tagsize < 8kb restriction
- From
Junio C Hamano <junkio@cox.net>
- Date
- May 24, 2006, 19:39 UTC
- Message-ID
- <7v1wuj6wln.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <4474B10A.1020704@gmx.de>
Björn Engelmann <BjEngelmann@gmx.de> writes:
Show 10 quoted lines
> 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).