Am 21.11.2009 19:07 schrieb Björn Steinbrink:
On 2009.11.21 17:40:14 +0100, Dirk Süsserott wrote:
is there a way to tell "git diff-index" to ignore some special
patterns, such that /^-- Dump completed on .*$/ is NOT recognized as
a difference and "git diff-index" returns 0 if that's the only
difference?
If you don't mind losing that line, you could use a clean filter via
.gitattributes:
echo '*.sql filter=mysql_dump' >> .gitattributes
git config filter.mysql_dump.clean "sed -e '/^-- Dump completed on .*$/d'"
That way, git will filter all *.sql paths through that sed command
before storing them as blobs, dropping that "Dump completed" line from
the data stored in the repo.
Björn
Thank you Björn and Michael,
Your suggestions were really helpful. I decided to use Björn's 'clean
filter' approach. It works great.
-- Dirk
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html