Re: [PATCH] pre-commit.sample: don't use [...] around a tr range
- From
Alex Riesen <raa.lkml@gmail.com>
- Date
- Sep 21, 2009, 12:45 UTC
- Message-ID
- <81b0412b0909210545n3da664c4r4e9250fa2eb241c4@mail.gmail.com>
- In-Reply-To
- <87ocp4imul.fsf@meyering.net>
On Mon, Sep 21, 2009 at 13:00, Jim Meyering <jim@meyering.net> wrote:
Show 22 quoted lines
> Alex Riesen wrote: >> On Mon, Sep 21, 2009 at 11:09, Jim Meyering <jim@meyering.net> wrote: >>> However, if the use of [] is deliberate, because git still >>> cares about portability to ancient SYSV versions of tr that >>> require that notation, then let me know and I'll undo that part >>> of the change and add a comment to that effect. >> >> We have (had?) people trying to support Git on HP-UX and SunOS. >> Do these count? > > I had my doubts, but have just confirmed that Solaris 10's > /usr/bin/tr is still doing it the SYSV way: > > $ echo foo | LC_ALL=C /usr/bin/tr a-z A-Z > foo > > There, you have to use /usr/xpg4/bin/tr to get the expected behavior: > > $ echo foo | LC_ALL=C /usr/xpg4/bin/tr a-z A-Z > FOO > > So you're right. ...
Sorry about that. I even made a simple tr once for Git tests exactly because of compatibility problems (look for "poor man tr" in the list archives, if needed).