#502278 git-core: git cat-file should provide -z

Package:
git
Source:
git
Description:
fast, scalable, distributed revision control system
Submitter:
Josh Triplett
Date:
2010-05-15 21:21:21 UTC
Severity:
wishlist
#502278#3
Date:
2008-10-15 08:22:31 UTC
From:
To:
git cat-file supports --batch and --batch-check options, which take
object names on standard input and provide object metadata and (for
--batch) contents on standard output.  It assumes that one object name
appears per line.  For sha1s this works fine, but for names this
prevents the safe use of names that contain newline characters.  To
address this, git cat-file could support a -z option, which makes it
accept '\0'-terminated names on stdin instead.

git cat-file will also print a message of the form
<object> SP missing LF
to stdout for each object not found in the repository.  This will need
revising as well to allow for object names with newlines; perhaps it
could drop the object name and just print "missing" and an LF,
assuming the consumer of the data knows what it asked for.

- Josh Triplett