diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2014-04-25 14:50:12 +0200 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2014-04-25 14:50:12 +0200 |
commit | 9b626a966d30c45262b554129f90e14788f3f5d3 (patch) | |
tree | 34bfe5c51ead4d85857651d0e3d1e14cfb7c7547 | |
parent | 362deef625b1b5c5bd9cc8353e4c27d750aedeeb (diff) | |
download | dotfiles-9b626a966d30c45262b554129f90e14788f3f5d3.tar.gz dotfiles-9b626a966d30c45262b554129f90e14788f3f5d3.tar.xz dotfiles-9b626a966d30c45262b554129f90e14788f3f5d3.zip |
Git config: su: do not "show" when nothing eligible
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r-- | .gitconfig | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -20,7 +20,8 @@ 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!\";\ + test $2 -eq 0 || git show -$2;\ + test $1 -eq 0 || echo \"also $1 behind!\";\ }; git_su" pd = "!git_pd() {\ git diff --color \"$@\" | subdiff | ${PAGER};\ |