On Thu, Nov 16, 2006 at 10:49:36PM CET, Junio C Hamano wrote: > I would like to keep it that way. I agree - I certainly don't want to infect Git with bash dependency. > And "POSIX says shell should behave that way" is _not_ what I want to > hear about. Actually, which sane platforms we care about have /bin/sh that is NOT POSIX compatible? > Things I would want to change: What about [ instead of test? And if foo; then instead of if foo then ? Am I the only one who hates case "$log_given" in tt*) die "Only one of -c/-C/-F can be used." ;; *tm*|*mt*) die "Option -m cannot be combined with -c/-C/-F." ;; esac instead of having this stuff in explicit variables and writing out some explicit boolean expressions? (There _are_ few cases where the case is cool, but they are rare.) It would be really great if Git would have something alike the Cogito's optparse infrastructure. I'm not sure if you can implement it in Bourne sh with reasonable performance, though... I think addressing these three particular points would make the scripts hugely more coder-friendly. (And well, I usually say that coding style is not *that* important and is frequently overemphasised. But that holds only to a certain point. ;-) > Things I do not want to change: ..snip all those I agree with.. > - Do not use locals. It's a pity. :-( Which shell doesn't support them? It's not that huge a deal, though. > - Do not use shell arrays. This is quite a larger deal, I think; but the portability concerns are very real, I guess. :| -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1 lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/) - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html