From: SZEDER Gábor Date: Tue, 26 Nov 2013 00:26:25 GMT Subject: Re: [PATCH] bash prompt: add option to disable for a repository Message-ID: <20131126002625.GA9061@goldbirke> In-Reply-To: <20131125234344.GA4212@google.com> 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 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. That would be a better interface, but the implementation must cope with colons in paths on Unixes, case insensitive file systems, and different path representations on Windows (C:\path\to\repo vs. /c/PaTh/To/RePo). I'm not sure we want to go there. Gábor