git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
SZEDER Gábor <szeder@ira.uka.de>
Date
Nov 26, 2013, 00:26 UTC
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:
Show 11 quoted lines
> 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
Previous: Jonathan NiederNext: Johannes Sixt
Message 5 of 9 in “bash prompt: add option to disable for a repository”
  1. bash prompt: add option to disable for a repositoryHeikki Hokkanen, Nov 23, 2013
  2. Johannes SixtNov 23, 2013
  3. Heikki HokkanenNov 23, 2013
  4. Jonathan NiederNov 25, 2013
  5. SZEDER GáborNov 26, 2013
  6. Johannes SixtNov 26, 2013
  7. Thomas RastNov 26, 2013
  8. SZEDER GáborNov 23, 2013
  9. Heikki HokkanenNov 25, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.