git context diff does not recognize shell function name
- From
- Windl, 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