From 1cbd20809693417c4e25276d5dd10ac6b01d4623 Mon Sep 17 00:00:00 2001 From: nicoulaj Date: Sun, 19 Feb 2017 19:26:03 +0100 Subject: [PATCH] Fix VCS_INFO outputing messages to stderr VCS_INFO invokes `git diff --no-ext-diff --ignore-submodules=dirty --quiet --exit-code`, which can output messages to stderr (for instance if a committed file cannot be read by the current user). --- Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git index 192b0a10d6..f3dd95dcbd 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git @@ -156,7 +156,7 @@ if (( querystaged || queryunstaged )) && \ [[ "$(${vcs_comm[cmd]} rev-parse --is-inside-work-tree 2> /dev/null)" == 'true' ]] ; then # Default: off - these are potentially expensive on big repositories if (( queryunstaged )) ; then - ${vcs_comm[cmd]} diff --no-ext-diff --ignore-submodules=dirty --quiet --exit-code || + ${vcs_comm[cmd]} diff --no-ext-diff --ignore-submodules=dirty --quiet --exit-code 2> /dev/null || gitunstaged=1 fi if (( querystaged )) ; then