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

Re: [PATCH] completion: use git rev-parse to detect bare repos

From
Shawn O. Pearce <spearce@spearce.org>
Date
May 20, 2009, 22:54 UTC
Message-ID
<20090520225430.GU30527@spearce.org>
In-Reply-To
<1242663870-11895-1-git-send-email-giuseppe.bilotta@gmail.com>
Giuseppe Bilotta <giuseppe.bilotta@gmail.com> wrote:
> Its check is more robust than a config check for core.bare
Trivially-Acked-by: Shawn O. Pearce <spearce@spearce.org>
Show 16 quoted lines
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index ba13c49..0c8bb53 100755
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -132,7 +132,7 @@ __git_ps1 ()
>  		local c
>  
>  		if [ "true" = "$(git rev-parse --is-inside-git-dir 2>/dev/null)" ]; then
> -			if [ "true" = "$(git config --bool core.bare 2>/dev/null)" ]; then
> +			if [ "true" = "$(git rev-parse --is-bare-repository 2>/dev/null)" ]; then
>  				c="BARE:"
>  			else
>  				b="GIT_DIR!"
> -- 
> 1.6.3.1.137.g29aa
> 
-- 
Shawn.
Previous: Giuseppe Bilotta
Message 2 of 2 in “completion: use git rev-parse to detect bare repos”
  1. completion: use git rev-parse to detect bare reposGiuseppe Bilotta, May 18, 2009
  2. Shawn O. PearceMay 20, 2009

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.