All of lore.kernel.org
 help / color / mirror / Atom feed
* git diff annoyance / feature request
@ 2011-08-25 19:14 Boaz Harrosh
  2011-08-25 20:00 ` Jeff King
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Boaz Harrosh @ 2011-08-25 19:14 UTC (permalink / raw)
  To: git discussion list


git diff has this very annoying miss-fixture where it will state
as hunk header the closest label instead of the function name.

So I get:
@@ -675,9 +670,23 @@ try_again:
 	}
 
 	if (flag) {
-		foo();
+		bazz();
 	}
 
 
Instead of what I'd like:
@@ -563,12 +563,7 @@ static int write_exec(struct page_collect *pcol)
 	}
 
 	if (flag) {
-		foo();
+		bazz();
 	}
 

I mean. The label "try_again" is not at all unique in my file. As a
reader I would like to see where is that code going to. The function
name is a unique file identifier that tells me exactly where the change
is going. The label is not. (It's not freaking BASIC)

I bet all this was just inherited from diff. Would it be accepted if
I send a patch to fix it? What you guys think a goto label makes any
sense at all?

Thanks
Boaz

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

end of thread, other threads:[~2011-08-27  5:14 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-25 19:14 git diff annoyance / feature request Boaz Harrosh
2011-08-25 20:00 ` Jeff King
2011-08-25 20:40   ` [RFC/PATCH] attr: map builtin userdiff drivers to well-known extensions Jeff King
2011-08-25 21:00     ` Eric Sunshine
2011-08-25 21:06       ` Jeff King
2011-08-25 22:01         ` Boaz Harrosh
2011-08-25 23:44         ` Eric Sunshine
2011-08-26  2:39           ` Jeff King
2011-08-25 22:29     ` Brandon Casey
2011-08-26  2:45       ` Jeff King
2011-08-26  3:58         ` Eric Sunshine
2011-08-26 15:33         ` Brandon Casey
2011-08-25 22:57     ` Junio C Hamano
2011-08-26  2:59       ` Jeff King
2011-08-26  5:52         ` Junio C Hamano
2011-08-26  9:44     ` Thomas Rast
2011-08-27  5:14     ` Alexey Shumkin
2011-08-25 20:27 ` git diff annoyance / feature request Junio C Hamano
2011-08-25 21:58   ` Boaz Harrosh
2011-08-26  9:08     ` Miles Bader
2011-08-26 21:16 ` René Scharfe
2011-08-26 21:37   ` Boaz Harrosh
2011-08-26 21:52     ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.