git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problem: `fatal: too-short tree object` when executing hash-object on tree
@ 2023-08-31 10:58 Gareth Hayes
  2023-08-31 17:10 ` Johannes Sixt
  2023-08-31 17:25 ` Junio C Hamano
  0 siblings, 2 replies; 3+ messages in thread
From: Gareth Hayes @ 2023-08-31 10:58 UTC (permalink / raw)
  To: git

Problem: I'm trying to reproduce the identifier of a tree object using `git cat-file -p <tree object identifier> | git hash-object -t tree --stdin`

This results in an error:
`fatal: too-short tree object`

To replicate: 
`git cat-file -p HEAD`
`git cat-file -p <tree object identifier from output of above> | git hash-object -t tree --stdin`

This works for other object types but not trees. What am I doing wrong?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-31 17:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-31 10:58 Problem: `fatal: too-short tree object` when executing hash-object on tree Gareth Hayes
2023-08-31 17:10 ` Johannes Sixt
2023-08-31 17:25 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).