Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

Re: [PATCH] Per-path attribute based hunk header selection.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:20

Possibly related (same subject, not in this thread)

Linus Torvalds [off-list ref] writes:
In .gitattributes:

	*.java diff=java
	*.perl diff=perl
	*.doc diff=doc

In .git/config

	[diff "java"]
		command = internal
		funcname = ... # ugly and complicated regexp to override the built-in one.

	[diff "perl"]
		command = internal
		funcname = ...

	[diff "doc"]
		command = ms-doc-diff

Doesn't this make more sense and mesh much better with the already 
existing custom diff driver?

(And yeah, maybe we could instead of "command=internal" just have the rule 
that "internal" is the default, and you'd not have a command at all when 
you want to run the internal diff.

Just an idea. I don't have any code.
Yeah, I'd be lying if I said that this did not cross my mind
when I saw existing diff.*.command handling.

About the comment from Johannes regarding hunk_header vs
funcname, I would actually prefer hunk_header, since that is
what this is about ("funcname" and "find_func" were misnomer
from the beginning), but I'd rename hunk_header to funcname for
the sake of consistency and minimizing the diff.

Will find time to look at this over the weekend.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help