From 00ab7fcbad44f1d440b4c4e973dbd2adb159d9ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Thu, 12 May 2022 15:54:21 +0200 Subject: [PATCH] Remove git-pr-review bin util --- symlinks/bin/git-pr-review | 40 ------------------- .../fish/completions/git-pr-review.fish | 13 ------ symlinks/ideavimrc | 2 +- 3 files changed, 1 insertion(+), 54 deletions(-) delete mode 100755 symlinks/bin/git-pr-review delete mode 100644 symlinks/config/fish/completions/git-pr-review.fish diff --git a/symlinks/bin/git-pr-review b/symlinks/bin/git-pr-review deleted file mode 100755 index a67a3d0..0000000 --- a/symlinks/bin/git-pr-review +++ /dev/null @@ -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 diff --git a/symlinks/config/fish/completions/git-pr-review.fish b/symlinks/config/fish/completions/git-pr-review.fish deleted file mode 100644 index 5da44a0..0000000 --- a/symlinks/config/fish/completions/git-pr-review.fish +++ /dev/null @@ -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' diff --git a/symlinks/ideavimrc b/symlinks/ideavimrc index 795c0a5..01a171a 100644 --- a/symlinks/ideavimrc +++ b/symlinks/ideavimrc @@ -60,4 +60,4 @@ command! Warnings action ActivateProblemsViewToolWindow nmap vec :EditVimConfig nmap vep :EditVimConfig -nmap vrc :ReloadVimConfig +nmap vrc :ReloadVimConfig \ No newline at end of file