File tree Expand file tree Collapse file tree 5 files changed +12
-4
lines changed Expand file tree Collapse file tree 5 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 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 "
Original file line number Diff line number Diff line change @@ -28,14 +28,18 @@ test -z "$FILE" -o "$FILE" = '--help' && {
2828
2929# bail out with message to stderr and exit status 1
3030die () {
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
3739path=" $( basename $FILE ) "
38- cd " $( dirname $FILE ) "
40+
41+ # shellcheck disable=SC2046
42+ cd $( dirname " $FILE " )
3943while test ! -d .git ;
4044do
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
7580remote_url=$( git config --get remote.$remote .url)
7681repo=$( echo " $remote_url " | sed ' s/^.*:\(.*\)\.git/\1/' )
7782url=" http://github.com/$repo /blob/$branch /$path "
Original file line number Diff line number Diff line change 77# Examples
88#
99# git nuke add-git-nuke
10+
1011set -o errexit
1112
1213git branch -D " $1 "
Original file line number Diff line number Diff line change 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
2526REMOTES=" $@ "
2627
2728test -z " $REMOTES " &&
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ if [[ ! -d .git ]]; then
2121fi
2222
2323# remove all paths passed as arguments from the history of the repo
24+ # shellcheck disable=SC2124
2425files=$@
2526git filter-branch --index-filter " git rm -rf --cached --ignore-unmatch $files " HEAD
2627
You can’t perform that action at this time.
0 commit comments