From: Zach Riggle <zachriggle@gmail.com>
To: git@vger.kernel.org
Subject: --function-context shows wrong function in chunk
Date: Fri, 10 Jul 2020 13:38:30 -0500 [thread overview]
Message-ID: <CAMP9c5k5kLSqhCh9400iLdZ=+-nKonavOYpBSs_NHdaVVJ_ycQ@mail.gmail.com> (raw)
When using --function-context, the function that is claimed at the top
of the diff does not match the actual function.
Note that the change exists in main, but the hunk header
(terminology?) shows other_routine.
$ git --version
git version 2.27.0
$ git diff -b --function-context
diff --git i/example.c w/example.c
index d87b59b..346e2a7 100644
--- i/example.c
+++ w/example.c
@@ -4,5 +4,5 @@ int other_routine() {
}
int main() {
-
+ puts("Hello, world!");
}
Zach Riggle
next reply other threads:[~2020-07-10 18:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-10 18:38 Zach Riggle [this message]
2020-07-10 20:12 ` --function-context shows wrong function in chunk Junio C Hamano
2020-07-10 20:14 ` Zach Riggle
2020-07-10 21:12 ` Junio C Hamano
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='CAMP9c5k5kLSqhCh9400iLdZ=+-nKonavOYpBSs_NHdaVVJ_ycQ@mail.gmail.com' \
--to=zachriggle@gmail.com \
--cc=git@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).