Re: [PATCH] bash prompt: add option to disable for a repository
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Nov 25, 2013, 23:43 UTC
- Message-ID
- <20131125234344.GA4212@google.com>
- In-Reply-To
- <CAOpY_XvN9GJw592MpbcZZ2hzUvSvTHNLebwMmQBK+N-Ez4xM_Q@mail.gmail.com>
Heikki Hokkanen wrote:
> If running git config on each prompt seems too expensive, do you have > any better ideas?
Perhaps a GIT_PS1_NOT_FOR_THESE_REPOS=repo1:repo2:repo3 setting would work.
__git_ps1 would do the one 'git rev-parse --git-dir --...' to find the repo corresponding to the cwd and then could match against the configured list to decide whether to return early.
Hope that helps, Jonathan