From f3d33dabbe8265276cafeb6d17b4adf81577e216 Mon Sep 17 00:00:00 2001 From: jimmywan Date: Wed, 6 May 2015 12:00:10 -0500 Subject: [PATCH] Update git status to use porcelain pyenv-update was failing for me with the following errors, even though I had no local changes: $ pyenv update Updating /home/vagrant/.pyenv... pyenv-update: /home/vagrant/.pyenv is not clean Updating /home/vagrant/.pyenv/plugins/pyenv-doctor... pyenv-update: /home/vagrant/.pyenv/plugins/pyenv-doctor is not clean Updating /home/vagrant/.pyenv/plugins/pyenv-pip-rehash... pyenv-update: /home/vagrant/.pyenv/plugins/pyenv-pip-rehash is not clean Updating /home/vagrant/.pyenv/plugins/pyenv-update... pyenv-update: /home/vagrant/.pyenv/plugins/pyenv-update is not clean Updating /home/vagrant/.pyenv/plugins/pyenv-virtualenvwrapper... pyenv-update: /home/vagrant/.pyenv/plugins/pyenv-virtualenvwrapper is not clean Updating /home/vagrant/.pyenv/plugins/pyenv-which-ext... pyenv-update: /home/vagrant/.pyenv/plugins/pyenv-which-ext is not clean I've updated the script to use --porcelain instead of --short. From the man page: " --porcelain Give the output in an easy-to-parse format for scripts. This is similar to the short output, but will remain stable across Git versions and regardless of user configuration. See below for details." --- bin/pyenv-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/pyenv-update b/bin/pyenv-update index 1f7044c..496229d 100755 --- a/bin/pyenv-update +++ b/bin/pyenv-update @@ -20,7 +20,7 @@ verify_repo_branch() { } verify_repo_clean() { - ! ( cd "$1" && git status --short ) | grep -q -v '^[!?][!?]' + ! ( cd "$1" && git status --porcelain ) | grep -q -v '^[!?][!?]' } verify_repo() {