git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: David Abrahams <dave@boostpro.com>
Cc: git@vger.kernel.org
Subject: Re: git diff bug?
Date: Mon, 6 Apr 2009 11:53:04 -0400	[thread overview]
Message-ID: <20090406155303.GA3275@sigill.intra.peff.net> (raw)
In-Reply-To: <1BF9172A-BE91-4D1C-932A-EB9FD79BA402@boostpro.com>

On Mon, Apr 06, 2009 at 05:09:32AM -0400, David Abrahams wrote:

> Hmm, so I tried sticking this .gitattributes in my repo
>
>   *.el   diff=el
>   [diff "el"]
>         xfuncname = "^(\\(def[a-z]+ .+)$"
>
> and git diff barfed with

As Michael explained, the first line goes into .gitattributes, and the
second two go into your .git/config.

The reason is that the first line is describing a property of files
in the repo: "*.el is of type 'el' for diffing". And thus it makes sense
for it to be committed along with the content in the repo.

But the latter two lines are about preference: "here is how _I_ would
like to generate diffs for el files". So they go in your personal config
which is not shipped with the repo. And most likely you would want to
put them not in per-repo config, but in your user config:
$HOME/.gitconfig.

All of that being said, it is obviously a documentation failure if it
didn't explain in which files the various parts go. If you don't mind,
can you skim over the documentation you read one more time and point out
where it led you wrong?  Maybe we can make it a little clearer.

-Peff

  parent reply	other threads:[~2009-04-06 15:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-04  1:10 git diff bug? David Abrahams
2009-04-04  1:45 ` Jeff King
2009-04-04  1:52   ` Jeff King
2009-04-06  9:09   ` David Abrahams
2009-04-06 14:44     ` Michael J Gruber
2009-04-06 17:58       ` David Abrahams
2009-04-06 18:48         ` Jeff King
2009-04-06 15:53     ` Jeff King [this message]
2009-04-06 17:37       ` Matthieu Moy
2009-04-06 17:56         ` Junio C Hamano
2009-04-06 19:32           ` Matthieu Moy
2009-04-06 18:16       ` David Abrahams
2009-04-07 18:25     ` Antriksh Pany
  -- strict thread matches above, loose matches on Subject: below --
2013-06-06 21:26 Sarma Tangirala
2013-06-06 21:42 ` Célestin Matte
2013-06-06 22:17   ` Junio C Hamano
2013-06-07 16:01     ` Sarma Tangirala
2013-06-10 12:44       ` Célestin Matte
2013-06-10 14:41         ` Sarma Tangirala

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090406155303.GA3275@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=dave@boostpro.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.
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).