diff --git a/bin/git-delete-tag b/bin/git-delete-tag index e4222a2d6..14c050779 100755 --- a/bin/git-delete-tag +++ b/bin/git-delete-tag @@ -2,4 +2,4 @@ # # Delete a tag, both locally and from the origin remote -git tag -d "$1" && git push origin ":refs/tags/$1" +exec git tag -d "$1" && git push origin ":refs/tags/$1" diff --git a/bin/git-github-open b/bin/git-github-open index 1d8e25832..51da21e3a 100755 --- a/bin/git-github-open +++ b/bin/git-github-open @@ -28,14 +28,18 @@ test -z "$FILE" -o "$FILE" = '--help' && { # bail out with message to stderr and exit status 1 die() { - echo "$(basename $0):" "$@" 1>&2 - exit 1 + # shellcheck disable=SC2086 + echo "$(basename $0):" "$@" 1>&2 + exit 1 } # figure out relative path to the file from the root # of the work tree +# shellcheck disable=SC2086 path="$(basename $FILE)" -cd "$(dirname $FILE)" + +# shellcheck disable=SC2046 +cd $(dirname "$FILE") while test ! -d .git ; do test "$(pwd)" = / && { @@ -72,6 +76,7 @@ die "you're not tracking a remote branch" # at this point we're in root of the work tree and $path is # the relative path to file. +# shellcheck disable=SC2086 remote_url=$(git config --get remote.$remote.url) repo=$(echo "$remote_url" | sed 's/^.*:\(.*\)\.git/\1/') url="http://github.com/$repo/blob/$branch/$path" diff --git a/bin/git-nuke b/bin/git-nuke index 1ab33b501..45559afa1 100755 --- a/bin/git-nuke +++ b/bin/git-nuke @@ -7,6 +7,7 @@ # Examples # # git nuke add-git-nuke + set -o errexit git branch -D "$1" diff --git a/bin/git-pruneall b/bin/git-pruneall index 0266691e4..56b606af9 100755 --- a/bin/git-pruneall +++ b/bin/git-pruneall @@ -22,6 +22,7 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. +# shellcheck disable=SC2124 REMOTES="$@" test -z "$REMOTES" && diff --git a/bin/git-purge-from-history b/bin/git-purge-from-history index c23764acf..0b8f07f3c 100755 --- a/bin/git-purge-from-history +++ b/bin/git-purge-from-history @@ -21,6 +21,7 @@ if [[ ! -d .git ]]; then fi # remove all paths passed as arguments from the history of the repo +# shellcheck disable=SC2124 files=$@ git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch $files" HEAD