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

Re: [PATCH] bash: remove always true if statement from __git_ps1()

From
Shawn O. Pearce <spearce@spearce.org>
Date
May 29, 2009, 15:03 UTC
Message-ID
<20090529150319.GC30527@spearce.org>
In-Reply-To
<1243598436-2207-1-git-send-email-szeder@ira.uka.de>
SZEDER G??bor <szeder@ira.uka.de> wrote:
Show 16 quoted lines
> The recent commits 8763dbb1 (completion: fix PS1 display during a
> merge on detached HEAD, 2009-05-16), ff790b6a (completion: simplify
> "current branch" in __git_ps1(), 2009-05-10), and d7107ca6
> (completion: fix PS1 display during an AM on detached HEAD,
> 2009-05-26) ensure that the branch name in __git_ps1() is always set
> to something sensible.  Therefore, the condition for checking the
> non-empty branch name is always fulfilled, and can be removed.
> 
> Signed-off-by: SZEDER G??bor <szeder@ira.uka.de>
> ---
> 
> The patch is the same, but the commit message is different, because
> Junio's d7107ca6 has fixed the issue.
>
>  contrib/completion/git-completion.bash |   10 ++++------
>  1 files changed, 4 insertions(+), 6 deletions(-)
Yay, code reduction is good.  :-)
Trivially-Acked-by: Shawn O. Pearce <spearce@spearce.org>
-- 
Shawn.
Previous: SZEDER Gábor
Message 4 of 4 in “bash: display git prompt in case of merge conflict during rebase”
  1. bash: display git prompt in case of merge conflict during rebaseSZEDER Gábor, May 28, 2009
  2. SZEDER GáborMay 28, 2009
  3. bash: remove always true if statement from __git_ps1()SZEDER Gábor, May 29, 2009
  4. Shawn O. PearceMay 29, 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.