[fix] Remove some redundant stuff and add stuff for macos
This commit is contained in:
13
config/fish/functions/ga.fish
Normal file
13
config/fish/functions/ga.fish
Normal file
@@ -0,0 +1,13 @@
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user