[PATCH v6 24/28] prompt: parse cherry-pick rebase mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
---
 contrib/completion/git-prompt.sh | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index a81ef5a..a7bde16 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -313,12 +313,18 @@ __git_ps1 ()
 	local total=""
 	if [ -d "$g/rebase-merge" ]; then
 		read b 2>/dev/null <"$g/rebase-merge/head-name"
-		read step 2>/dev/null <"$g/rebase-merge/msgnum"
-		read total 2>/dev/null <"$g/rebase-merge/end"
-		if [ -f "$g/rebase-merge/interactive" ]; then
-			r="|REBASE-i"
+		if [ -f "$g/rebase-merge/cherrypick" ]; then
+			read total 2>/dev/null <"$g/sequencer/total"
+			read step 2>/dev/null <"$g/sequencer/step"
+			r="|REBASE"
 		else
-			r="|REBASE-m"
+			read step 2>/dev/null <"$g/rebase-merge/msgnum"
+			read total 2>/dev/null <"$g/rebase-merge/end"
+			if [ -f "$g/rebase-merge/interactive" ]; then
+				r="|REBASE-i"
+			else
+				r="|REBASE-m"
+			fi
 		fi
 	else
 		if [ -d "$g/rebase-apply" ]; then
-- 
1.8.4-fc

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]