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

Re: git hard-codes use of /bin/sh for aliases

From
TGThorsten Glaser <tglaser@b1-systems.de>
Date
May 11, 2026, 22:46 UTC
Message-ID
<9f279637-c0fe-c88b-24de-3a00b957ae3b@b1-systems.de>
In-Reply-To
<agJaS0xuMaLm6UZv@fruit.crustytoothpaste.net>
On Mon, 11 May 2026, brian m. carlson wrote:
>On Linux, I have mksh, but my work machine on macOS does not, so
>specifying `core.sh = /bin/mksh` would not work on all my systems.  If

But it could be made possible by pointing it to ~/.etc/bin/mksh on the Macintosh…

>I'll also note that Git doesn't handle aliases specially.  Git has a
>with-shell and a without-shell mode for running commands, and we use the
>former for aliases.
Ah, okay.
I was merely wondering that it was not configurable for aliases.

When looking at the aliases in detail, I found that I already invoked mksh -c '…' in those that used mksh-specific code, and that the one that failed merely uses a recent POSIX sh construct that /bin/sh on a customer system does not yet implement and I could reword it.

bye, //Thorsten

-- 
Thorsten Glaser
Linux / Unix Developer
Tel.: +49 160 91168501
E-Mail: tglaser@b1-systems.de

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / https://www.b1-systems.de/
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt, HRB 3537
Previous: brian m. carlson
Message 3 of 3 in “git hard-codes use of /bin/sh for aliases”
  1. Thorsten GlaserMay 11, 2026
  2. brian m. carlsonMay 11, 2026
  3. Thorsten GlaserMay 11, 2026

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.