git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* --function-context shows wrong function in chunk
@ 2020-07-10 18:38 Zach Riggle
  2020-07-10 20:12 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Zach Riggle @ 2020-07-10 18:38 UTC (permalink / raw)
  To: git

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-10 21:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10 18:38 --function-context shows wrong function in chunk Zach Riggle
2020-07-10 20:12 ` Junio C Hamano
2020-07-10 20:14   ` Zach Riggle
2020-07-10 21:12     ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).