Re: [PATCH] bash prompt: add option to disable for a repository

2013-11-26 Thread Thomas Rast
Heikki Hokkanen writes: > On Sat, Nov 23, 2013 at 4:42 PM, Johannes Sixt wrote: >> Gah! This adds a fork+exec each time the prompt is shown. Not good, >> particularly on Windows. >> >> Since your intent is to disable the prompt in the home directory, >> wouldn't that mean that most of the time y

Re: [PATCH] bash prompt: add option to disable for a repository

2013-11-25 Thread Johannes Sixt
Am 11/26/2013 0:43, schrieb Jonathan Nieder: > 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. Yeah, but... I find the wish to show the bash pr

Re: [PATCH] bash prompt: add option to disable for a repository

2013-11-25 Thread SZEDER Gábor
On Mon, Nov 25, 2013 at 03:43:44PM -0800, Jonathan Nieder wrote: > 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

Re: [PATCH] bash prompt: add option to disable for a repository

2013-11-25 Thread Jonathan Nieder
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

Re: [PATCH] bash prompt: add option to disable for a repository

2013-11-25 Thread Heikki Hokkanen
Hello, On Sat, Nov 23, 2013 at 6:35 PM, SZEDER Gábor wrote: > Hm, strange. I wonder what can cause performance problems in big > repositories. > > Sure, there are status indicators that can be expensive, in particular > the indicators for dirty index/worktree, untracked files, and > divergence f

Re: [PATCH] bash prompt: add option to disable for a repository

2013-11-23 Thread SZEDER Gábor
Hi, On Sat, Nov 23, 2013 at 03:18:23PM +0200, Heikki Hokkanen wrote: > If bash.prompt is set to false, disable the prompt. This is useful > for huge repositories like the home directory. > > Signed-off-by: Heikki Hokkanen > --- > git-prompt.sh performance seems to be quite bad for big repositori

Re: [PATCH] bash prompt: add option to disable for a repository

2013-11-23 Thread Heikki Hokkanen
On Sat, Nov 23, 2013 at 4:42 PM, Johannes Sixt wrote: > Gah! This adds a fork+exec each time the prompt is shown. Not good, > particularly on Windows. > > Since your intent is to disable the prompt in the home directory, > wouldn't that mean that most of the time you *don't* want the prompt? > Wou

Re: [PATCH] bash prompt: add option to disable for a repository

2013-11-23 Thread Johannes Sixt
Am 23.11.2013 14:18, schrieb Heikki Hokkanen: > If bash.prompt is set to false, disable the prompt. This is useful > for huge repositories like the home directory. > > Signed-off-by: Heikki Hokkanen > --- > git-prompt.sh performance seems to be quite bad for big repositories, so > without a way t

[PATCH] bash prompt: add option to disable for a repository

2013-11-23 Thread Heikki Hokkanen
If bash.prompt is set to false, disable the prompt. This is useful for huge repositories like the home directory. Signed-off-by: Heikki Hokkanen --- git-prompt.sh performance seems to be quite bad for big repositories, so without a way to disable it selectively for repositories, it becomes unusab