Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 352e86e

Browse files
committed
Merge branch 'rr/prompt-rebase-breakage-fix'
* rr/prompt-rebase-breakage-fix: prompt: squelch error output from cat
2 parents 1a22bd3 + 2847cae commit 352e86e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

contrib/completion/git-prompt.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -347,20 +347,20 @@ __git_ps1 ()
347347
local step=""
348348
local total=""
349349
if [ -d "$g/rebase-merge" ]; then
350-
b="$(cat "$g/rebase-merge/head-name")"
351-
step=$(cat "$g/rebase-merge/msgnum")
352-
total=$(cat "$g/rebase-merge/end")
350+
b="$(cat "$g/rebase-merge/head-name" 2>/dev/null)"
351+
step=$(cat "$g/rebase-merge/msgnum" 2>/dev/null)
352+
total=$(cat "$g/rebase-merge/end" 2>/dev/null)
353353
if [ -f "$g/rebase-merge/interactive" ]; then
354354
r="|REBASE-i"
355355
else
356356
r="|REBASE-m"
357357
fi
358358
else
359359
if [ -d "$g/rebase-apply" ]; then
360-
step=$(cat "$g/rebase-apply/next")
361-
total=$(cat "$g/rebase-apply/last")
360+
step=$(cat "$g/rebase-apply/next" 2>/dev/null)
361+
total=$(cat "$g/rebase-apply/last" 2>/dev/null)
362362
if [ -f "$g/rebase-apply/rebasing" ]; then
363-
b="$(cat "$g/rebase-apply/head-name")"
363+
b="$(cat "$g/rebase-apply/head-name" 2>/dev/null)"
364364
r="|REBASE"
365365
elif [ -f "$g/rebase-apply/applying" ]; then
366366
r="|AM"

0 commit comments

Comments
 (0)