Thread (33 messages) flat view 33 messages, 5 authors, 2016-06-15

Re: [PATCH v3 07/11] Documentation/replace: tell that -f option bypasses the type check

From: Philip Oakley <hidden>
Date: 2016-06-15 22:58:36

From: "Jonathan Nieder" <redacted>
Hi,

Philip Oakley wrote:
quoted
Does `hash-object` do the inverese of `cat-file commit`?

I didn't find the hash-object(1) man page very informative on that 
matter
Hm.  The manpage says:

Computes the object ID value for an object with specified type
with the contents of the named file [...], and optionally writes
the resulting object into the object database.

And then:

-w
Actually write the object into the object database.

Any ideas for making this clearer?
The problem is the file format, in the sense that the earlier `git 
cat-file commit $orig` has a human readable output which is a 
description of the commit header, rather than the specific binary 
content. I couldn't tell if the command would cope with such a human 
readable file.

In Christian's quick untested script he'd matched the two commands as 
opposites, which doesn't appear to be the case, and I'm somewhat 
ignorant of what hash-object is doing - I'd expect that it simply hashed 
the already constructed data, but my ignorance starts showing at this 
point ;-)

regards

Philip 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help