Git development
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Jim Meyering <jim@meyering.net>
Cc: Alex Riesen <raa.lkml@gmail.com>, git list <git@vger.kernel.org>
Subject: Re: [PATCH] pre-commit.sample: don't use [...] around a tr range
Date: Mon, 21 Sep 2009 10:21:57 -0400	[thread overview]
Message-ID: <20090921142157.GA20860@sigio.peff.net> (raw)
In-Reply-To: <87tyywgzhu.fsf@meyering.net>

On Mon, Sep 21, 2009 at 04:10:21PM +0200, Jim Meyering wrote:

> >>  	test "$(git diff --cached --name-only --diff-filter=A -z |
> >>  	  LC_ALL=C tr -d '[ -~]\0')"
> >
> > Does this work on non-bracket systems?
> 
> Yes, since [] happen to fall in the range.
> 
> > I would think that enumerating
> > the sequence would be the most portable thing.
> 
> Enumerating is more portable, at the expense of
> readability and maintainability.
> In case you want to go that route, here's one more:

Agreed. If we can avoid enumeration, we should. If your original is
portable, then I think it is preferable. Thanks for looking into it.

-Peff

  reply	other threads:[~2009-09-21 14:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-21  9:09 [PATCH] pre-commit.sample: don't use [...] around a tr range Jim Meyering
2009-09-21  9:43 ` Alex Riesen
2009-09-21 11:00   ` Jim Meyering
2009-09-21 12:45     ` Alex Riesen
2009-09-21 13:44     ` Jeff King
2009-09-21 14:10       ` Jim Meyering
2009-09-21 14:21         ` Jeff King [this message]
2009-09-21 15:58       ` Brandon Casey
2009-09-24  5:55         ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090921142157.GA20860@sigio.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=jim@meyering.net \
    --cc=raa.lkml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox