# git check-attr -z and quoting

3 messages from 2010-11-02 to 2010-11-02. Participants: Joey Hess, Kevin Ballard.
Thread: https://gitlist.dev/t/25618

## Joey Hess, 2010-11-02 15:57

Subject: git check-attr -z and quoting
Message-ID: <20101102155705.GA17207@gnu.kitenet.net>
URL: https://gitlist.dev/e/20101102155705.GA17207%40gnu.kitenet.net

```
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

```

## Kevin Ballard, 2010-11-02 21:24

Subject: Re: git check-attr -z and quoting
Message-ID: <7583D61F-64FA-44A8-B5C5-6E0FC329ED32@sb.org>
URL: https://gitlist.dev/e/7583D61F-64FA-44A8-B5C5-6E0FC329ED32%40sb.org
In-Reply-To: <20101102155705.GA17207@gnu.kitenet.net>

```
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
```

## Joey Hess, 2010-11-02 22:10

Subject: Re: git check-attr -z and quoting
Message-ID: <20101102221029.GA3646@gnu.kitenet.net>
URL: https://gitlist.dev/e/20101102221029.GA3646%40gnu.kitenet.net
In-Reply-To: <7583D61F-64FA-44A8-B5C5-6E0FC329ED32@sb.org>

```
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

```
