From 39999fa946b7d2b3ca6906db717d78b9e9d349a6 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Tue, 8 Nov 2022 20:00:52 -0500 Subject: [PATCH] Correct the ahead/behind in prompt for git. --- tcshrc.prompt.final | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tcshrc.prompt.final b/tcshrc.prompt.final index d38e683..04c024a 100644 --- a/tcshrc.prompt.final +++ b/tcshrc.prompt.final @@ -265,9 +265,9 @@ if( 0 == ${__res} ) then set __res=$? #echo "Got: ${git_counts}" if( 0 == ${__res} ) then - #set git_behind_count=`echo ${git_counts} | awk '{print $1}'` - echo "Got: ${git_behind_count}" - set git_ahead_count=`echo ${git_counts} | awk '{print $2}'` + set git_behind_count=`git rev-list --count --right-only HEAD..\@\{upstream\}` + #echo "Got: ${git_behind_count}" + set git_ahead_count=`git rev-list --count --right-only \@\{upstream\}..HEAD` #echo "Got: ${git_ahead_count}" if( 0 != ${git_behind_count} ) then set git_tracking_stat=" -${git_behind_count}"