Re: git with custom diff for commits
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Dec 17, 2007, 23:01 UTC
- Message-ID
- <Pine.LNX.4.64.0712172300510.9446@racer.site>
- In-Reply-To
- <60687a7d0712171456p14328817y5aa229f0df23c02f@mail.gmail.com>
Hi,
On Mon, 17 Dec 2007, Gerald Gutierrez wrote:
Show 12 quoted lines
> I do a nightly mysqldump of a database and check it into a git > repository. mysqldump generates a timestamp as part of that output which > is causing git to think that the file changes every night when it really > doesn't. The timestamp is simply in an SQL comment. > > So what I'd like to do is teach git to ignore that particular SQL > timestamp comment. I've tried to set up an external diff script that > runs diff -I "<<sql timestamp comment>>" that effectively ignores the > timestamp. While this works with "git diff", it seems when git commits, > it still sees the differences. > > How do I properly teach git to ignore these types of differences?
You might be interested in reading Documentation/gitattributes.txt, look for "diff driver".
Hth, Dscho