diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2014-02-14 15:43:19 +0100 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2014-02-14 15:43:19 +0100 |
commit | 7afda1f08683cc2bc8400d91cdce3a6ea8ba2ff3 (patch) | |
tree | 088d42a1fbf1f2d4df620fce5e742a53817c876f | |
parent | a94b94789042c9ac0e0dd4c0e1afe41b445cb0e0 (diff) | |
download | dotfiles-7afda1f08683cc2bc8400d91cdce3a6ea8ba2ff3.tar.gz dotfiles-7afda1f08683cc2bc8400d91cdce3a6ea8ba2ff3.tar.xz dotfiles-7afda1f08683cc2bc8400d91cdce3a6ea8ba2ff3.zip |
Git config: add "su" show unpushed (updated)
Partly based on http://stackoverflow.com/questions/2969214
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r-- | .gitconfig | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -16,6 +16,10 @@ dh = diff HEAD wd = diff --word-diff swd = show --word-diff + su = "!git_su() {\ + set -- $(git rev-list --left-right --count @{u}...HEAD);\ + git show -$2; test $1 -eq 0 || echo \"also $1 behind!\";\ + }; git_su" pd = "!git_pd() {\ git diff --color \"$@\" | subdiff | ${PAGER};\ }; git_pd" |