arl / tmux-gitbar

Git in your tmux status bar
GNU General Public License v3.0
169 stars 16 forks source link

Still read Git status when .tmgbignore #57

Closed arl closed 6 years ago

arl commented 6 years ago

Opening this problem reported on #40 by @rbuckley:

@rbuckley:

What does the ignore actually do? I've put it in a large repo because it was causing me issues (taking several seconds to print the prompt because update_gitbar was running).

When I put .tmgbignore in the directory, the status on my tmux bar goes away, but I still see update_gitbar taking several seconds before the prompt is printed.

Thanks.

@arl:

Hi

Thanks for reporting!

.tmgbignore obviously should not do that, it should early exit as soon as possible, just after clearing tmux git status.

Out of curiosity, how large is your repo?

Could you post the output of:

time git status --porcelain -uall

If possible with and without tmux git bar. To disable, unexport PROMPT_COMMAND in a shell.

@rbuckley:

Hi, thanks for the quick response.

It is a large Android repo, about 28GB.

time outputs:

With tmux gitbar
real 0m4.564s
user 0m1.396s
sys 0m1.622s

After unexporting PROMPT_COMMAND

real 0m3.629s
user 0m1.190s
sys 0m1.660s