# [mingw port] git plumbing piping with CR/NL

6 messages from 2007-06-01 to 2007-06-02. Participants: Nguyen Thai Ngoc Duy, Alex Riesen, Sam Vilain, Johannes Schindelin.
Thread: https://gitlist.dev/t/8385

## Nguyen Thai Ngoc Duy, 2007-06-01 18:23

Subject: [mingw port] git plumbing piping with CR/NL
Message-ID: <fcaeb9bf0706011123ue4ceaf2i12569c63d1d92584@mail.gmail.com>
URL: https://gitlist.dev/e/fcaeb9bf0706011123ue4ceaf2i12569c63d1d92584%40mail.gmail.com

```
Hi,

I haven't had time looking at the code yet. I report here so that I
can free my memory for other things. I made a command like this:

$ git ls-tree -r HEAD|grep blah.cc|git update-index --index-info

and the output of git-status was:

$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#	new file:   path/to/blah.cc\r
#
# Changed but not updated:
#   (use "git add/rm <file>..." to update what will be committed)
#
#	deleted:    path/to/blah.cc\r
...
$ git version
git version 1.5.2.651.g80e39-dirty (if the commit isn't in the master
branch, it is based on master branch)

Apparently git should ignore \r at the end of the path. Will look at it later.
-- 
Duy

```

## Alex Riesen, 2007-06-01 23:18

Subject: Re: [mingw port] git plumbing piping with CR/NL
Message-ID: <20070601231816.GC6360@steel.home>
URL: https://gitlist.dev/e/20070601231816.GC6360%40steel.home
In-Reply-To: <fcaeb9bf0706011123ue4ceaf2i12569c63d1d92584@mail.gmail.com>

```
Nguyen Thai Ngoc Duy, Fri, Jun 01, 2007 20:23:24 +0200:
> Hi,
> 
> I haven't had time looking at the code yet. I report here so that I
> can free my memory for other things. I made a command like this:
> 
> $ git ls-tree -r HEAD|grep blah.cc|git update-index --index-info
> 
> and the output of git-status was:
> 
> $ git status
> # On branch master
> # Changes to be committed:
> #   (use "git reset HEAD <file>..." to unstage)
> #
> #	new file:   path/to/blah.cc\r
> #
> # Changed but not updated:
> #   (use "git add/rm <file>..." to update what will be committed)
> #
> #	deleted:    path/to/blah.cc\r
> ...
> $ git version
> git version 1.5.2.651.g80e39-dirty (if the commit isn't in the master
> branch, it is based on master branch)
> 
> Apparently git should ignore \r at the end of the path. ...

Why should it? \r is a valid character in filenames almost everywhere
(except for the some proprietary OSes, as usual).

Why does your grep _alters_ the input, instead of filtering it, btw?

```

## Nguyen Thai Ngoc Duy, 2007-06-01 23:56

Subject: Re: [mingw port] git plumbing piping with CR/NL
Message-ID: <fcaeb9bf0706011656p2145afe0k8be9797d250566df@mail.gmail.com>
URL: https://gitlist.dev/e/fcaeb9bf0706011656p2145afe0k8be9797d250566df%40mail.gmail.com
In-Reply-To: <20070601231816.GC6360@steel.home>

```
On 6/1/07, Alex Riesen <raa.lkml@gmail.com> wrote:
> Nguyen Thai Ngoc Duy, Fri, Jun 01, 2007 20:23:24 +0200:
> > Hi,
> >
> > I haven't had time looking at the code yet. I report here so that I
> > can free my memory for other things. I made a command like this:
> >
> > $ git ls-tree -r HEAD|grep blah.cc|git update-index --index-info
> >
> > and the output of git-status was:
> >
> > $ git status
> > # On branch master
> > # Changes to be committed:
> > #   (use "git reset HEAD <file>..." to unstage)
> > #
> > #     new file:   path/to/blah.cc\r
> > #
> > # Changed but not updated:
> > #   (use "git add/rm <file>..." to update what will be committed)
> > #
> > #     deleted:    path/to/blah.cc\r
> > ...
> > $ git version
> > git version 1.5.2.651.g80e39-dirty (if the commit isn't in the master
> > branch, it is based on master branch)
> >
> > Apparently git should ignore \r at the end of the path. ...
>
> Why should it? \r is a valid character in filenames almost everywhere
> (except for the some proprietary OSes, as usual).

Right. Although I doubt usage of \r and other special characters in filenames.

> Why does your grep _alters_ the input, instead of filtering it, btw?

I have no idea. It's grep from MKS Toolkit FYI.
-- 
Duy

```

## Johannes Schindelin, 2007-06-02 01:31

Subject: Re: [mingw port] git plumbing piping with CR/NL
Message-ID: <Pine.LNX.4.64.0706020229520.4046@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0706020229520.4046%40racer.site
In-Reply-To: <fcaeb9bf0706011656p2145afe0k8be9797d250566df@mail.gmail.com>

```
Hi,

On Fri, 1 Jun 2007, Nguyen Thai Ngoc Duy wrote:

> On 6/1/07, Alex Riesen <raa.lkml@gmail.com> wrote:
>
> > Why does your grep _alters_ the input, instead of filtering it, btw?
> 
> I have no idea. It's grep from MKS Toolkit FYI.

Your subject says "[mingw port]". You should have mentioned that you use a 
mixed setup, as the mingw port still depends on msys for the scripts.

Ciao,
Dscho

```

## Sam Vilain, 2007-06-02 01:31

Subject: Re: [mingw port] git plumbing piping with CR/NL
Message-ID: <4660C88D.2010208@vilain.net>
URL: https://gitlist.dev/e/4660C88D.2010208%40vilain.net
In-Reply-To: <20070601231816.GC6360@steel.home>

```
Alex Riesen wrote:
> > Apparently git should ignore \r at the end of the path. ...
> Why should it? \r is a valid character in filenames almost everywhere
> (except for the some proprietary OSes, as usual).
>   

So is \n!

Sam.

```

## Alex Riesen, 2007-06-02 23:09

Subject: Re: [mingw port] git plumbing piping with CR/NL
Message-ID: <20070602230939.GB25254@steel.home>
URL: https://gitlist.dev/e/20070602230939.GB25254%40steel.home
In-Reply-To: <fcaeb9bf0706011656p2145afe0k8be9797d250566df@mail.gmail.com>

```
Nguyen Thai Ngoc Duy, Sat, Jun 02, 2007 01:56:54 +0200:
> >Why does your grep _alters_ the input, instead of filtering it, btw?
> 
> I have no idea. It's grep from MKS Toolkit FYI.
>

Looks like it is buggy

```
