Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function git_ahead -a ahead behind diverged none
- command git rev-list --count --left-right "@{upstream}...HEAD" ^ /dev/null | awk "
- /0\t0/ { print \"$none\" ? \"$none\" : \"+\"; exit 0 }
- /[0-9]+\t0/ { print \"$behind\" ? \"$behind\" : \"-\"; exit 0 }
- /0\t[0-9]+/ { print \"$ahead\" ? \"$ahead\" : \"+\"; exit 0 }
- // { print \"$diverged\" ? \"$diverged\" : \"±\"; exit 0 }
- "
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement