git-bug-pull.fish
1function git-bug-pull
2 set -l remote (test -n "$argv[1]"; and echo $argv[1]; or git rev-parse --abbrev-ref --symbolic-full-name @{u} | cut -d'/' -f1)
3 echo "fetching bugs from '$remote' remote..." >&2
4 git fetch $remote "refs/bugs/*:refs/bugs/*" "refs/identities/*:refs/identities/*"
5
6 set git_dir (git rev-parse --git-dir)
7 test -d $git_dir/git-bug/cache/; and rm -rf $git_dir/git-bug/cache/
8end