Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for diffing .sqlite files with Git.
See development/sqlite3dump for more information.
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.sqlite diff=sqlite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
# Create a SQL dump of a SQLite database. | ||
# | ||
# This is used to provide diffs of .sqlite files when using Git. To set it up | ||
# add the following to your ~/.gitconfig or .git/config: | ||
# | ||
# [diff "sqlite"] | ||
# textconv = sqlite3dump | ||
# | ||
# And make sure this file is in your PATH. Now git log/git diff/gitk/tig/etc. | ||
# should show diffs of the .sqlite files. | ||
|
||
|
||
sqlite3 "$1" .dump |