git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git check-attr -z and quoting
@ 2010-11-02 15:57 Joey Hess
  2010-11-02 21:24 ` Kevin Ballard
  0 siblings, 1 reply; 3+ messages in thread
From: Joey Hess @ 2010-11-02 15:57 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

First, thanks to all for supporting -z in various commands like 
git ls-files and git diff. Big help for plumbing, as I'm sure you know.

But, git check-attr -z only enables NUL separation of its input; output
always has munged pathnames. This bit me trying to use it as plumbing.

-- 
see shy jo

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* Re: git check-attr -z and quoting
  2010-11-02 15:57 git check-attr -z and quoting Joey Hess
@ 2010-11-02 21:24 ` Kevin Ballard
  2010-11-02 22:10   ` Joey Hess
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Ballard @ 2010-11-02 21:24 UTC (permalink / raw)
  To: Joey Hess; +Cc: git

On Nov 2, 2010, at 8:57 AM, Joey Hess wrote:

> First, thanks to all for supporting -z in various commands like 
> git ls-files and git diff. Big help for plumbing, as I'm sure you know.
> 
> But, git check-attr -z only enables NUL separation of its input; output
> always has munged pathnames. This bit me trying to use it as plumbing.

What do you mean by munged pathnames? As long as the path doesn't contain the sequence ": " it seems like the output should be unambiguous.

-Kevin Ballard

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

* Re: git check-attr -z and quoting
  2010-11-02 21:24 ` Kevin Ballard
@ 2010-11-02 22:10   ` Joey Hess
  0 siblings, 0 replies; 3+ messages in thread
From: Joey Hess @ 2010-11-02 22:10 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 764 bytes --]

Kevin Ballard wrote:
> On Nov 2, 2010, at 8:57 AM, Joey Hess wrote:
> 
> > First, thanks to all for supporting -z in various commands like 
> > git ls-files and git diff. Big help for plumbing, as I'm sure you know.
> > 
> > But, git check-attr -z only enables NUL separation of its input; output
> > always has munged pathnames. This bit me trying to use it as plumbing.
> 
> What do you mean by munged pathnames? As long as the path doesn't contain the sequence ": " it seems like the output should be unambiguous.

Quoted with quote_c_style()

$ perl -e 'print shift()."\n\0"' '¡hello!' | git check-attr eol -z --stdin
"\302\241hello!\n": foo: unspecified

Maybe -Z could enable this output:

¡hello!\n\0foo\0unspecified\0

-- 
see shy jo

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

end of thread, other threads:[~2010-11-02 22:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-02 15:57 git check-attr -z and quoting Joey Hess
2010-11-02 21:24 ` Kevin Ballard
2010-11-02 22:10   ` Joey Hess

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).