Files
dotfiles/config/fish/functions/ga.fish
2022-11-21 16:30:05 +05:30

14 lines
380 B
Fish

function ga --argument-names source target --description "Check how much ahead a git branch is from another"
if test -z "$source"
echo "Usage: ga source target"
return 1
end
if test -z "$target"
set target (git rev-parse --abbrev-ref HEAD)
end
echo "$source"\t"$target"
git rev-list --left-right --count "$source"..."$target"
end