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

Re: [PATCH v3] builtin/pull.c: teach run_merge() to honor rebase.autostash config

From
Taylor Blau <me@ttaylorr.com>
Date
Jan 6, 2022, 19:36 UTC
Message-ID
<YddEpUEA9Hnxqam+@nand.local>
In-Reply-To
<xmqqee5kemxj.fsf@gitster.g>
On Thu, Jan 06, 2022 at 10:31:04AM -0800, Junio C Hamano wrote:
Show 19 quoted lines
> Taylor Blau <me@ttaylorr.com> writes:
>
> >> +	git clone src dst &&
> >> +	test_commit -C src --printf "more_content" file "more content\ncontent\n" &&
> >
> > Same note here, but I think the `--printf` is unnecessary. Running
> > `echo` with "\n" characters in its argument is fine, so this could be
> > shortened to:
> >
> >     test_commit -C src blah file "more\ncontent"
>
> Is that true for everybody's shell, or just dash?
>
> $ bash -c 'echo "a\nb\nc"'
> a\nb\nc
> $ dash -c 'echo "a\nb\nc"'
> a
> b
> c

Ah, of course: thanks for the reminder. Do ignore my comment about `--printf` being unnecessary, since it is quite necessary depending on your shell.

In either case, I still think the quoting around "more_content" is unnecessary (but the same is not true for the string containing newlines).

Thanks, Taylor

Previous: Junio C Hamano
Message 5 of 5 in “builtin/pull.c: teach run_merge() to honor rebase.autostash config”
  1. builtin/pull.c: teach run_merge() to honor rebase.autostash configJohn Cai, Jan 6, 2022
  2. Taylor BlauJan 6, 2022
  3. Taylor BlauJan 6, 2022
  4. Junio C HamanoJan 6, 2022
  5. Taylor BlauJan 6, 2022

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.