Remove git-pr-review bin util
parent
9df988ef28
commit
00ab7fcbad
|
@ -1,40 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Missing origin branch. Pass in the branch to compare as the first parameter!"
|
||||
exit 1
|
||||
fi
|
||||
ORIGIN_BRANCH="$1"
|
||||
|
||||
if [ "${1}" = "${1#origin/}" ]; then
|
||||
read -p "Origin branch does not seem to be from the 'origin/' remote. Proceed? [y/n]" ANSWER
|
||||
if [ ! "$ANSWER" = "y" ]; then
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
TARGET_BRANCH="$2"
|
||||
if [ -z "$2" ]; then
|
||||
TARGET_BRANCH="origin/main"
|
||||
echo "Missing target branch. Assuming $TARGET_BRANCH!"
|
||||
fi
|
||||
if [ "${TARGET_BRANCH}" = "${TARGET_BRANCH#origin/}" ]; then
|
||||
read -p "Target branch does not seem to be from the 'origin/' remote. Proceed? [y/n]" ANSWER
|
||||
if [ ! "$ANSWER" = "y" ]; then
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then
|
||||
echo "Not inside a git repository."
|
||||
exit 128
|
||||
fi
|
||||
|
||||
echo "Updating origin..."
|
||||
git fetch
|
||||
|
||||
git checkout $ORIGIN_BRANCH
|
||||
echo "You are now checked out to the PR branch. Feel free to build the project and test it out."
|
||||
git difftool $TARGET_BRANCH
|
|
@ -1,13 +0,0 @@
|
|||
set -l needs_fetch 1
|
||||
function __fish-git-pr-review-fetch
|
||||
git fetch &
|
||||
set -l needs_fetch 0
|
||||
return 1
|
||||
end
|
||||
|
||||
function __fish-git-pr-review-in-git-repo
|
||||
git rev-parse --is-inside-work-tree 2>/dev/null
|
||||
end
|
||||
|
||||
complete -c git-pr-review -f
|
||||
complete -c git-pr-review -n '__fish-git-pr-review-in-git-repo; and __fish-git-pr-review-fetch' -w 'git branch'
|
|
@ -60,4 +60,4 @@ command! Warnings action ActivateProblemsViewToolWindow
|
|||
|
||||
nmap <leader>vec :EditVimConfig<CR>
|
||||
nmap <leader>vep :EditVimConfig<CR>
|
||||
nmap <leader>vrc :ReloadVimConfig<CR>
|
||||
nmap <leader>vrc :ReloadVimConfig<CR>
|
Loading…
Reference in New Issue