Re: [RFC/PATCH] hash-object doc: "git hash-object -w" can write invalid objects

2013-02-22 Thread Jeff King
On Fri, Feb 22, 2013 at 03:01:32PM -0800, Jonathan Nieder wrote: > > Git doesn't handle the resulting tag objects nicely at all. For example, > > running `git cat-file -p` on the new object outputs a really odd > > timestamp "Thu Jun Thu Jan 1 00:16:09 1970 +0016" (I'm guessing it > > parses the y

Re: [RFC/PATCH] hash-object doc: "git hash-object -w" can write invalid objects

2013-02-22 Thread Junio C Hamano
Jonathan Nieder writes: > Perhaps by default hash-object should automatically fsck the objects > it is asked to create. Yes, and let the experimentors to override when they are trying to invent a new object type, finished a reader but not a writer (that is why they are exprimenting with hash-obj

[RFC/PATCH] hash-object doc: "git hash-object -w" can write invalid objects

2013-02-22 Thread Jonathan Nieder
When using "hash-object -w" to create non-blob objects, it is generally a good policy to run "git fsck" afterward to make sure the resulting object is valid. Add a warning to the manpage. While it at, gently nudge the user of "hash-object -w" toward higher-level interfaces for creating or modifyi