aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Porada <porada@me.com>2012-08-31 16:19:11 +0300
committerMathias Bynens <mathias@qiwi.be>2012-08-31 15:51:05 +0200
commitbfa4d80970a1b0985c47cce9ee759aa4f48a55d9 (patch)
treeae1796c18c812cda2390d3d98977182a15d589aa
parent0e6b837e773f0d956b6807e0fb01a7dcd1a340df (diff)
downloaddotfiles-bfa4d80970a1b0985c47cce9ee759aa4f48a55d9.tar.gz
dotfiles-bfa4d80970a1b0985c47cce9ee759aa4f48a55d9.tar.bz2
dotfiles-bfa4d80970a1b0985c47cce9ee759aa4f48a55d9.zip
.gitconfig: Tweak `diff` aliases
-rw-r--r--.gitconfig3
1 files changed, 2 insertions, 1 deletions
diff --git a/.gitconfig b/.gitconfig
index 09e7dbe..4cb8777 100644
--- a/.gitconfig
+++ b/.gitconfig
@@ -4,7 +4,8 @@
# View the current working tree status using the short format
s = status -s
# Diff
- d = diff --patch-with-stat
+ d = !"git diff-index --quiet HEAD -- || clear; git diff --patch-with-stat"
+ di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
# Pull in remote changes for the current repository and all its submodules
p = !"git pull; git submodule foreach git pull origin master"
# Clone a repository including all submodules