Re: [PATCH] Add support for author-oriented git-rev-list switches [rev 8]
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jun 9, 2005, 20:35 UTC
- Message-ID
- <7vy89jb74x.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <2cfc4032050609085341e46242@mail.gmail.com>
>>>>> "JS" == Jon Seymour <jon.seymour@gmail.com> writes:
JS> test_output_expect_success JS> If you like, I'll generalize it and move it into testlib.sh
Sounds sensible, and yes please I prefer to have it in testlib.sh, and you would get bonus points if you converted some (I do not demand you do all of them ;-)) existing cat/echo users while you are at it.
Except for some minor points.
I do not think use of "local" to help readability is absolutely necessary in this small function, and if it is a bashism, I prefer to see it written in a more portable form. I was thinking about removing bashism from the test scripts, although I have not gotten around to actually doing it [*1*, *2*].
[Footnotes]
*1* Auditing all the shell scripts to look for quoting bugs while eradicating bashism would be another good "Janitor" sub-project if somebody is interested on the list.
I do not know what happend to other items on the Janitor project list. Personally I liked the one Sean did to redo the command line parameters using argp.
*2* Not that I claim what I have already written is bash free. I do not have a handy reference that lists which is bashism and which is in POSIX. To stay away from bashism, I just try not to use certain things that I did not use when I was introduced to shell programming. That list includes "${parameter#word}", "${!parameter}", "function" and "local".