Re: [PATCH 14/15] git-am.sh: replace using expr for arithmetic operations with the equivalent shell builtin

2016-02-05 Thread Elia Pinto
2016-02-04 20:33 GMT+01:00 Junio C Hamano : > As pointed out already, quoting of "$this" inside the arithmetic > expansion would not work very well, so [14/15] needs fixing. > > I do not see 01/15 thru 13/15 here, by the way. Is it just me? Excuse me, everyone. Yesterday was a bad day. I did a bi

Re: [PATCH 14/15] git-am.sh: replace using expr for arithmetic operations with the equivalent shell builtin

2016-02-04 Thread Stefan Beller
On which version did you base your patches? git-am.sh is no more since 2015-08-04, (it was moved to contrib/examples/git-am.sh as part of the rewrite of am in C) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo i

Re: [PATCH 14/15] git-am.sh: replace using expr for arithmetic operations with the equivalent shell builtin

2016-02-04 Thread Eric Sunshine
On Thu, Feb 4, 2016 at 2:33 PM, Junio C Hamano wrote: > As pointed out already, quoting of "$this" inside the arithmetic > expansion would not work very well, so [14/15] needs fixing. > > I do not see 01/15 thru 13/15 here, by the way. Is it just me? I didn't receive them either, and they don't

Re: [PATCH 14/15] git-am.sh: replace using expr for arithmetic operations with the equivalent shell builtin

2016-02-04 Thread Junio C Hamano
As pointed out already, quoting of "$this" inside the arithmetic expansion would not work very well, so [14/15] needs fixing. I do not see 01/15 thru 13/15 here, by the way. Is it just me? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vge

Re: [PATCH 14/15] git-am.sh: replace using expr for arithmetic operations with the equivalent shell builtin

2016-02-04 Thread Johannes Schindelin
Hi Elia, On Thu, 4 Feb 2016, Elia Pinto wrote: > 2016-02-04 12:14 GMT+01:00 Johannes Schindelin : > > Hi Elia, > > > > On Thu, 4 Feb 2016, Elia Pinto wrote: > > > >> - this=$(expr "$this" + 1) > >> + this=$(( "$this" + 1 )) > > > > Why the funny spaces? We

Re: [PATCH 14/15] git-am.sh: replace using expr for arithmetic operations with the equivalent shell builtin

2016-02-04 Thread Elia Pinto
2016-02-04 12:14 GMT+01:00 Johannes Schindelin : > Hi Elia, > > On Thu, 4 Feb 2016, Elia Pinto wrote: > >> - this=$(expr "$this" + 1) >> + this=$(( "$this" + 1 )) > > Why the funny spaces? We do not do that anywhere in the existing code > except in three plac

Re: [PATCH 14/15] git-am.sh: replace using expr for arithmetic operations with the equivalent shell builtin

2016-02-04 Thread Johannes Schindelin
Hi Elia, On Thu, 4 Feb 2016, Elia Pinto wrote: > - this=$(expr "$this" + 1) > + this=$(( "$this" + 1 )) Why the funny spaces? We do not do that anywhere in the existing code except in three places (2x filter-branch, 1x rebase--interactive, all three *not*

[PATCH 14/15] git-am.sh: replace using expr for arithmetic operations with the equivalent shell builtin

2016-02-04 Thread Elia Pinto
expr is considered generally antiquated. It is best to use for arithmetic operations the shell $((..)). To quote POSIX: "The expr utility has a rather difficult syntax [...] In many cases, the arithmetic and string features provided as part of the shell command language are easier to use than