git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] fetch-pack: start multi-head pulling.

From
Junio C Hamano <junkio@cox.net>
Date
Aug 12, 2005, 16:43 UTC
Message-ID
<7vk6irumv3.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0508121818230.26488@wgmdd8.biozentrum.uni-wuerzburg.de>
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
Previous: Johannes SchindelinNext: Matthias Urlichs
Message 4 of 7 in “fetch-pack: start multi-head pulling.”
  1. fetch-pack: start multi-head pulling.Junio C Hamano, Aug 12, 2005
  2. Linus TorvaldsAug 12, 2005
  3. Johannes SchindelinAug 12, 2005
  4. Junio C HamanoAug 12, 2005
  5. Matthias UrlichsAug 13, 2005
  6. Junio C HamanoAug 13, 2005
  7. Linus TorvaldsAug 12, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.