From: SZEDER Gábor <hidden> Date: 2016-06-15 22:46:52
Since e5dd864a (completion: Better __git_ps1 support when not in
working directory, 2009-02-11) the git prompt becomes empty, if we hit
a merge conflict during a rebase.
e5dd864a added an if statement at the end of __git_ps1 to only display
anything in the prompt, if the branch name is not empty. This caused
the empty prompt in the "merge conflict during rebase" case, because
in this case we display neither the branch name nor the abbreviated
SHA1, the ongoing rebase is identified.
This patch removes that check, so the git prompt is displayed even if
the branch name is empty.
Signed-off-by: SZEDER Gábor <redacted>
---
contrib/completion/git-completion.bash | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
From: SZEDER Gábor <hidden> Date: 2016-06-15 22:46:52
On Thu, May 28, 2009 at 06:17:21PM +0200, SZEDER Gábor wrote:
Since e5dd864a (completion: Better __git_ps1 support when not in
working directory, 2009-02-11) the git prompt becomes empty, if we hit
a merge conflict during a rebase.
e5dd864a added an if statement at the end of __git_ps1 to only display
anything in the prompt, if the branch name is not empty. This caused
the empty prompt in the "merge conflict during rebase" case, because
in this case we display neither the branch name nor the abbreviated
SHA1, the ongoing rebase is identified.
From: SZEDER Gábor <hidden> Date: 2016-06-15 22:46:52
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 <redacted>
---
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(-)
From: Shawn O. Pearce <hidden> Date: 2016-06-15 22:46:52
SZEDER G??bor [off-list ref] wrote:
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 <redacted>
---
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 [off-list ref]
--
Shawn.