From: Johannes Sixt <j6t@kdbg.org>
To: "Windl, Ulrich" <u.windl@ukr.de>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [EXT] Re: git context diff does not recognize shell function name
Date: Sat, 14 Nov 2026 09:49:42 +0100 [thread overview]
Message-ID: <080eb4e7-2885-4057-b063-2f114b99b883@kdbg.org> (raw)
In-Reply-To: <69690c3bd37448ff8116bf3497f151a9@ukr.de>
Am 13.11.26 um 08:09 schrieb Windl, Ulrich:
> The file
> name ends in ".sh", and there's also a "she-bang" at the start
> saying it's a BASH script.
Git does not activate diff drivers automatically for any type of file
(AFAIR), so all of these properties are ignored. You have to activate
the diff driver yourself, for example, by putting a line like
*.sh diff=bash
in your .git/info/attributes or a .gitattributes. Without this, the
default hunk header pattern is used, which picks up lines that begin
with a non-punctuation character.
-- Hannes
prev parent reply other threads:[~2026-11-14 8:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 13:39 git context diff does not recognize shell function name Windl, Ulrich
2026-11-12 20:51 ` Junio C Hamano
2026-11-13 7:09 ` [EXT] " Windl, Ulrich
2026-11-14 8:49 ` Johannes Sixt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=080eb4e7-2885-4057-b063-2f114b99b883@kdbg.org \
--to=j6t@kdbg.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=u.windl@ukr.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox