Commit 82cab1f6 authored by Felipe Rodrigues de Almeida's avatar Felipe Rodrigues de Almeida Committed by Bruno Pinto

Showing the difference of commits on upstream

parent b9031f3e
......@@ -4,18 +4,19 @@ function _git_branch_name
end
function _git_vs_upstream
set -l count (command git rev-list --count --left-right "origin/$argv"...HEAD ^/dev/null)
set count (command git rev-list --count --left-right "origin/$argv"...HEAD ^/dev/null)
switch $count
case "" # no upstream
echo ''
case "0?0" # equal to upstream
echo ''
case "0??" # ahead of upstream
echo u+
echo 'u+'(echo $count | cut -f2)
case "??0" # behind upstream
echo u-
echo 'u-'(echo $count | cut -f1)
case '???' # diverged from upstream
echo u+-
echo 'u+'(echo $count | cut -f2)'-'(echo $count | cut -f1)
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment