From: Jeff King Date: Mon, 21 Sep 2009 14:21:57 GMT Subject: Re: [PATCH] pre-commit.sample: don't use [...] around a tr range Message-ID: <20090921142157.GA20860@sigio.peff.net> 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