From: martin f. krafft Date: Mon, 5 May 2008 19:14:39 +0000 (+0100) Subject: no error when outside git tree X-Git-Url: https://git.madduck.net/etc/zsh.git/commitdiff_plain/56bf0738ba62a40206ad3cd2cebb73303c7a2801 no error when outside git tree --- diff --git a/.zsh/zshrc/85_git_prompt b/.zsh/zshrc/85_git_prompt index 7e445b0..626b4c3 100644 --- a/.zsh/zshrc/85_git_prompt +++ b/.zsh/zshrc/85_git_prompt @@ -15,7 +15,7 @@ _get_git_cur_branch() { } _is_git_repo() { - [ "$(git rev-parse --is-inside-work-tree)" = true ] + [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = true ] } _set_git_psvar() {