From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Linus Torvalds <torvalds@osdl.org>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] fetch-pack: start multi-head pulling.
Date: Fri, 12 Aug 2005 09:43:44 -0700 [thread overview]
Message-ID: <7vk6irumv3.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.63.0508121818230.26488@wgmdd8.biozentrum.uni-wuerzburg.de> (Johannes Schindelin's message of "Fri, 12 Aug 2005 18:19:30 +0200 (CEST)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> I seem to remember Junio does not like bash arrays... And in a recent
> commit message, he even admits to using something different than bash!
Correct and somewhat misleading. My usual shell is bash but
from time to time I try to run things with (d)ash to see how far
I strayed from the common denominator.
Yes, I am old fashioned.
I have been trying, admittably perhaps not very successfully, to
stay away from bashism in the core GIT scripts. I knew we
started using shell array when Linus did the git-diff-script,
but I have been hoping somebody coming from other platforms
(hello, Solaris and Darwin guys) would send in patches if they
cared enough. So I try to avoid making their life harder than
already is.
Here is a semi off-topic joke, hopefully to give you a better
sense of where I am coming from.
Anybody can start pretending to be an old fashioned shell
programmer by adhering to the following simple rules:
1. Never, ever say [ ... ]; we old-timers always spell that
"test".
2. Never use "test" when "case" would do; this comes from
the days when test was not built-in and machines were
small. We tried to reduce number of forks in our
scripts. We also never use echo piped to grep when
"case" would do.
3. We tend to write && || more often than we use if
... then ... fi, especially for simple things. We do
not use parantheses () to introduce command grouping
lightly. We usually say braces {} and use parentheses
only when we do want a subshell.
4. Say ${var-default} more often than ${var:-default};
colon form is more recent invention, and we old-timers
tend to be more careful to consider the possibility
that, when a user says this variable is empty, the user
really means it.
5. We are still allowed to use $() form in preference to
``, because it is clearly superior (it can nest) and
should have been the way to spell it from the beginning.
-jc
next prev parent reply other threads:[~2005-08-12 16:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-12 9:41 [PATCH] fetch-pack: start multi-head pulling Junio C Hamano
2005-08-12 16:12 ` Linus Torvalds
2005-08-12 16:19 ` Johannes Schindelin
2005-08-12 16:43 ` Junio C Hamano [this message]
2005-08-13 3:25 ` Matthias Urlichs
2005-08-13 9:09 ` Junio C Hamano
2005-08-12 17:12 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vk6irumv3.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox