diff options
author | Steven Schmid <stevschmid@gmail.com> | 2013-10-01 18:08:15 +0200 |
---|---|---|
committer | Steven Schmid <stevschmid@gmail.com> | 2013-10-01 18:08:15 +0200 |
commit | 05b3ea342ad581d02ed652a4bbe29786026a5b50 (patch) | |
tree | c4d11cf0fcb965c6eb020976602be772d4a85117 | |
parent | 61e3951e4be2f496d8ce8022afc58817c06e5dee (diff) | |
download | zsh-05b3ea342ad581d02ed652a4bbe29786026a5b50.tar.gz zsh-05b3ea342ad581d02ed652a4bbe29786026a5b50.tar.bz2 zsh-05b3ea342ad581d02ed652a4bbe29786026a5b50.zip |
Fix work_in_progress in empty git repos
I noticed that the function ``work_in_progress``, which is used in the "gallois"-theme, would print ``fatal: bad default revision 'HEAD'`` in a new folder after ``git init``.
This is the fix.
-rw-r--r-- | plugins/git/git.plugin.zsh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index d8ea3ae0c..14172b881 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -138,7 +138,7 @@ compdef _git glp=git-log # # This function return a warning if the current branch is a wip function work_in_progress() { - if $(git log -n 1 | grep -q -c wip); then + if $(git log -n 1 2>/dev/null | grep -q -c wip); then echo "WIP!!" fi } |