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

git context diff does not recognize shell function name

From
WUWindl, Ulrich <u.windl@ukr.de>
Date
Nov 12, 2026, 13:39 UTC
Message-ID
<340dc2eef42f4f6690c58765a07621e1@ukr.de>
Hi!

In git 2.51.0 I found a minor issue: "git diff" did not show the corresponding shell function name. Admittedly I used a somewhat uncommon line-breaking:

The context in question looks like this:
---
...
run_query()
{
    local p_l_0="$1" LOG_BASE="$2" SUFFIX="$3" URL_BASE="$4" URL="$5" \
_COUNT="${6:-$COUNT}" RESPONSE_CHECKER="$7"
    local me="${FUNCNAME[0]}" m
...
---

The context diff looked like this: --- ...

@@ -193,6 +188,36 @@ get_params()
... 
run_query()
 {
@@ -201,10 +226,9 @@ _COUNT="${6:-$COUNT}" RESPONSE_CHECKER="$7"
     local me="${FUNCNAME[0]}" m
...
---
("..." is deleted lines)
So this may be a combination of unfortunate context sequencing and the first line of the new context being unusual.
The second chunk would still be the same context, namely "run_query()".

Kind regards,
Ulrich Windl
Next: Junio C Hamano
Message 1 of 4 in “git context diff does not recognize shell function name”
  1. Windl, UlrichNov 12, 2026
  2. Junio C HamanoNov 12, 2026
  3. Windl, UlrichNov 13, 2026
  4. Johannes SixtNov 14, 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.