git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Minor portability patch to git-submodule

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 18, 2007, 14:01 UTC
Message-ID
<Pine.LNX.4.64.0712181357150.23902@racer.site>
In-Reply-To
<Pine.LNX.4.64.0712180734520.28219@fractal.phys.lafayette.edu>
Hi,
On Tue, 18 Dec 2007, Andy Dougherty wrote:
Show 13 quoted lines
> On Mon, 17 Dec 2007, Johannes Schindelin wrote:
> 
> > On Mon, 17 Dec 2007, Andy Dougherty wrote:
> > 
> > > -	git ls-files --stage -- "$@" | grep -e '^160000 ' |
> > > +	git ls-files --stage -- "$@" | egrep -e '^160000 ' |
> > 
> > Nack.  egrep is not available on all platforms.  But then I have to 
> > wonder why not saying "grep '^160000 '" instead?
> 
> Your last suggestion is easily and obviously better -- I'll assume you 
> don't need an explicit patch and can just hand-edit mine.  Still, I'd have 
> thought egrep was fine.  As far as I recall, it goes back to v7 Unix.

This is just another instance where we should look at existing systems and not so much at standards documents.

> Or are there non-unix systems at issue (perhaps cygwin variants or 
> something) that have grep but not egrep?
Well, I checked msysGit, and it has it.

That is, kind of: it is just a wrapper, calling "grep -E". Which means yet another fork() on a fork() challenged platform, so I would appreciate it if we could avoid it.

Thanks, Dscho

Previous: Andy Dougherty
Message 4 of 4 in “Minor portability patch to git-submodule”
  1. Minor portability patch to git-submoduleAndy Dougherty, Dec 17, 2007
  2. Johannes SchindelinDec 17, 2007
  3. Andy DoughertyDec 18, 2007
  4. Johannes SchindelinDec 18, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.