From 14aceff96166e4b7cb416ca20ce543bb683b0ffd Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Mon, 12 Nov 2018 10:52:44 -0500 Subject: fix git dirty --- fish/.config/fish/functions/is_git_ahead.fish | 3 ++- fish/.config/fish/functions/is_git_dirty.fish | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'fish/.config') diff --git a/fish/.config/fish/functions/is_git_ahead.fish b/fish/.config/fish/functions/is_git_ahead.fish index 31b9ce7..64622fd 100644 --- a/fish/.config/fish/functions/is_git_ahead.fish +++ b/fish/.config/fish/functions/is_git_ahead.fish @@ -1,4 +1,5 @@ function is_git_ahead set -l revs (git rev-list origin/(git_branch)..HEAD ^/dev/null) -[ "$revs" != "" ] + [ "$revs" != "" ] end + diff --git a/fish/.config/fish/functions/is_git_dirty.fish b/fish/.config/fish/functions/is_git_dirty.fish index 8511943..87c2629 100644 --- a/fish/.config/fish/functions/is_git_dirty.fish +++ b/fish/.config/fish/functions/is_git_dirty.fish @@ -1,3 +1,3 @@ function is_git_dirty - is_git; and [ (git status | tail -n1) != "nothing to commit, working tree clean" ] + is_git; and git diff --cached --quiet end -- cgit 1.4.1