Skip to content

Commit 5e3629f

Browse files
authored
Merge pull request #51 from unixorn/more-codeclimate-cleanup
More codeclimate cleanup
2 parents 7c5441d + a16e712 commit 5e3629f

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

bin/git-delete-tag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
#
33
# Delete a tag, both locally and from the origin remote
44

5-
git tag -d "$1" && git push origin ":refs/tags/$1"
5+
exec git tag -d "$1" && git push origin ":refs/tags/$1"

bin/git-github-open

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,18 @@ test -z "$FILE" -o "$FILE" = '--help' && {
2828

2929
# bail out with message to stderr and exit status 1
3030
die() {
31-
echo "$(basename $0):" "$@" 1>&2
32-
exit 1
31+
# shellcheck disable=SC2086
32+
echo "$(basename $0):" "$@" 1>&2
33+
exit 1
3334
}
3435

3536
# figure out relative path to the file from the root
3637
# of the work tree
38+
# shellcheck disable=SC2086
3739
path="$(basename $FILE)"
38-
cd "$(dirname $FILE)"
40+
41+
# shellcheck disable=SC2046
42+
cd $(dirname "$FILE")
3943
while test ! -d .git ;
4044
do
4145
test "$(pwd)" = / && {
@@ -72,6 +76,7 @@ die "you're not tracking a remote branch"
7276

7377
# at this point we're in root of the work tree and $path is
7478
# the relative path to file.
79+
# shellcheck disable=SC2086
7580
remote_url=$(git config --get remote.$remote.url)
7681
repo=$(echo "$remote_url" | sed 's/^.*:\(.*\)\.git/\1/')
7782
url="http://github.com/$repo/blob/$branch/$path"

bin/git-nuke

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# Examples
88
#
99
# git nuke add-git-nuke
10+
1011
set -o errexit
1112

1213
git branch -D "$1"

bin/git-pruneall

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2323
# IN THE SOFTWARE.
2424

25+
# shellcheck disable=SC2124
2526
REMOTES="$@"
2627

2728
test -z "$REMOTES" &&

bin/git-purge-from-history

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ if [[ ! -d .git ]]; then
2121
fi
2222

2323
# remove all paths passed as arguments from the history of the repo
24+
# shellcheck disable=SC2124
2425
files=$@
2526
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch $files" HEAD
2627

0 commit comments

Comments
 (0)