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

Re: [PATCH] git-rebase--interactive.sh: use printf instead of echo to print commit message

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jul 22, 2010, 20:08 UTC
Message-ID
<AANLkTinBvIE-nW__qN9XpbWiwhx1C6_FWylWQRLGd2BQ@mail.gmail.com>
In-Reply-To
<MoU2SrLLcYS4J28tNBJjfxYnqoLoX04XwHLgciB5KCUnhqJoXifmNFbSGHS4r8pboBurx-NhZWs@cipher.nrlssc.navy.mil>
On Thu, Jul 22, 2010 at 19:15, Brandon Casey <casey@nrlssc.navy.mil> wrote:
Show 15 quoted lines
> From: Brandon Casey <drafnel@gmail.com>
>
> On systems with an echo which defaults to the XSI-conformant behavior
> (Solaris, or others using Ksh), echo will interpret certain backslashed
> characters as control sequences.  This can cause a problem for interactive
> rebase when it is used to rebase commits whose commit "subject" (the first
> line) contains any of these backslashed sequences.  In this case, echo will
> substitute the control sequence for the backslashed characters and either
> the rebased commit message will differ from the original, or the rebase
> process will fail.  Neither is desirable.
>
> So work around this issue by replacing the echo statements used to print
> out portions of the commit message, with printf.
>
> Also, add a test to test for this breakage.
This looks good, especially the test for it:
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Previous: Jonathan Nieder
Message 3 of 3 in “git-rebase--interactive.sh: use printf instead of echo to print commit message”
  1. git-rebase--interactive.sh: use printf instead of echo to print commit messageBrandon Casey, Jul 22, 2010
  2. Jonathan NiederJul 22, 2010
  3. Ævar Arnfjörð BjarmasonJul 22, 2010

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.