[FIX] odoo-shippable: Fix slow prompt in big git workdir
Currently the script to get git status
to set the color of the branch in the prompt (red or green) is very slow with bigger git directories.
I used follow gist: https://gist.github.com/sindresorhus/3898739 to fix performance. This script work very similar but faster.
Example:
With changes in versioned file:
With changes in unversioned file: Here the difference: We have a green branch with unversioned files.
When you execute a git add
then now is red:
This is a disadvantage but IMHO the performance issue is a greater problem.