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

Re: [PATCH] apply: fix new-style empty context line triggering incomplete-line check

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 18, 2026, 17:12 UTC
Message-ID
<xmqq341xgiyw.fsf@gitster.g>
In-Reply-To
<CALnO6CDNwa8Ez4Ug0f8zNyxF1n3C_j8mLRbH7wChVioNoC5QVw@mail.gmail.com>
"D. Ben Knoble" <ben.knoble@gmail.com> writes:
> I think braces { test_writes lines … && printf … ; } would have
> sufficed for the second example

Nobody complained about them ever since they were written. More importantly, we have plenty of them that nobody complained and bothered to uglify so far [*].

;-)
$ git grep -e '(.*) >' master -- t/t[0-9]\*.sh | grep -v -e '\$(' -e 'cd ' | wc -l
60
$ git grep -e '(.*) >' master -- t/t[0-9]\*.sh | grep -v -e '\$(' -e 'cd ' |
  head -n 20
master:t/t3050-subprojects-fetch.sh:	(git rev-parse HEAD && git ls-files -s) >expected &&
master:t/t3050-subprojects-fetch.sh:		(git rev-parse HEAD && git ls-files -s) >../actual
master:t/t3050-subprojects-fetch.sh:	(git rev-parse HEAD && git ls-files -s) >expected &&
master:t/t3050-subprojects-fetch.sh:		(git rev-parse HEAD && git ls-files -s) >../actual
master:t/t3402-rebase-merge.sh:	(echo "0 $T" && cat original) >renamed &&
master:t/t3900-i18n-commit.sh:		(sed "1,/^$/d" raw | iconv -f $new -t utf-8) >actual &&
master:t/t4001-diff-rename.sh:	(cat path1 && echo new) >new-path &&
master:t/t4015-diff-whitespace.sh:	(echo foo && echo baz | tr -d "\012") >x &&
master:t/t4015-diff-whitespace.sh:	(echo bar && echo baz | tr -d "\012") >x &&
master:t/t4019-diff-wserror.sh:if (grep "$blue_grep" <check-grep | grep "$blue_grep") >/dev/null 2>&1
master:t/t4019-diff-wserror.sh:elif (grep -a "$blue_grep" <check-grep | grep -a "$blue_grep") >/dev/null 2>&1
master:t/t4024-diff-optimize-common.sh:		( zs $n && echo a ) >file-a$n &&
master:t/t4024-diff-optimize-common.sh:		( echo b && zs $n && echo ) >file-b$n &&
master:t/t4024-diff-optimize-common.sh:		( printf c && zs $n ) >file-c$n &&
master:t/t4024-diff-optimize-common.sh:		( echo d && zs $n ) >file-d$n &&
master:t/t4024-diff-optimize-common.sh:		( zs $n && echo A ) >file-a$n &&
master:t/t4024-diff-optimize-common.sh:		( echo B && zs $n && echo ) >file-b$n &&
master:t/t4024-diff-optimize-common.sh:		( printf C && zs $n ) >file-c$n &&
master:t/t4024-diff-optimize-common.sh:		( echo D && zs $n ) >file-d$n &&
master:t/t4101-apply-nonl.sh:(echo a; echo b) >frotz.0
[Footnote]
 * I personally find that we need ';' immediately before '}'
   intolerably ugly.
Previous: Eric SunshineNext: Junio C Hamano
Message 6 of 7 in “apply: fix new-style empty context line triggering incomplete-line check”
  1. apply: fix new-style empty context line triggering incomplete-line checkJunio C Hamano, Mar 17, 2026
  2. Eric SunshineMar 17, 2026
  3. Junio C HamanoMar 17, 2026
  4. D. Ben KnobleMar 18, 2026
  5. Eric SunshineMar 18, 2026
  6. Junio C HamanoMar 18, 2026
  7. Junio C HamanoMar 31, 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.