From: Junio C Hamano Date: Tue, 28 May 2019 16:56:19 GMT Subject: Re: [PATCH 2/3] hash-object doc: elaborate on -w and --literally promises Message-ID: In-Reply-To: <86woigp3ro.fsf@gmail.com> Jakub Narebski writes: > I thik that this implemetation detail of `--literally` is here to stay; > how would you otherwise fix the issue if garbage object makes Git crash? By repacking, presumably ;-). More importantly, there needs a way to extend "enum object_type" to allow unbounded number of arbitrary (garbage) types before we can allow --literally to record such a garbage type in a pack stream. So I'd expect the implementation detail would stay for a long time. But there is nothing that says `--literally` inherently must write loose. It is plausible that a new implementation writes objects of known/valid types to a pack stream, while unknown/garbage types to loose objects. > However, I would prefer to have options state _intent_; if there is > legitimate need for a tool that creates loose objects, it would be > better to have separate `--loose` option to `git hash-object` (which > would imply `-w`, otherwise it doesn't have sense). Yes, I very much agree with that.