git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [EGIT PATCH] Enable diff=java for all *.java source files
@ 2008-08-15 15:40 Shawn O. Pearce
  2008-08-18  5:38 ` Robin Rosenberg
  0 siblings, 1 reply; 3+ messages in thread
From: Shawn O. Pearce @ 2008-08-15 15:40 UTC (permalink / raw)
  To: Robin Rosenberg; +Cc: git

This (usually) gets more reasonable function headers to
appear in the header line for a diff hunk.  Its slightly
better than the default C rules.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 .gitattributes |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 .gitattributes

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..f57840b
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+*.java diff=java
-- 
1.6.0.rc3.250.g8dd0

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

* Re: [EGIT PATCH] Enable diff=java for all *.java source files
  2008-08-15 15:40 [EGIT PATCH] Enable diff=java for all *.java source files Shawn O. Pearce
@ 2008-08-18  5:38 ` Robin Rosenberg
  2008-08-18  5:49   ` Shawn O. Pearce
  0 siblings, 1 reply; 3+ messages in thread
From: Robin Rosenberg @ 2008-08-18  5:38 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git

fredagen den 15 augusti 2008 17.40.22 skrev Shawn O. Pearce:
> This (usually) gets more reasonable function headers to
> appear in the header line for a diff hunk.  Its slightly
> better than the default C rules.
> 
> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
> ---
>  .gitattributes |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>  create mode 100644 .gitattributes
> 
> diff --git a/.gitattributes b/.gitattributes
> new file mode 100644
> index 0000000..f57840b
> --- /dev/null
> +++ b/.gitattributes
> @@ -0,0 +1 @@
> +*.java diff=java

Is there any reason this isn't the default in git?

-- robin

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

* Re: [EGIT PATCH] Enable diff=java for all *.java source files
  2008-08-18  5:38 ` Robin Rosenberg
@ 2008-08-18  5:49   ` Shawn O. Pearce
  0 siblings, 0 replies; 3+ messages in thread
From: Shawn O. Pearce @ 2008-08-18  5:49 UTC (permalink / raw)
  To: Robin Rosenberg; +Cc: git

Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
> > diff --git a/.gitattributes b/.gitattributes
> > new file mode 100644
> > index 0000000..f57840b
> > --- /dev/null
> > +++ b/.gitattributes
> > @@ -0,0 +1 @@
> > +*.java diff=java
> 
> Is there any reason this isn't the default in git?

Because uh.  Nobody submitted a patch to make it the default?

It does seem like it would be a good idea to make it the default.
Its unlikely the C function header pattern is ever going to produce a
more reasonable hunk header for a *.java file than the Java pattern.

-- 
Shawn.

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

end of thread, other threads:[~2008-08-18  5:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-15 15:40 [EGIT PATCH] Enable diff=java for all *.java source files Shawn O. Pearce
2008-08-18  5:38 ` Robin Rosenberg
2008-08-18  5:49   ` Shawn O. Pearce

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).