Skip to content

Commit 352d330

Browse files
committed
chore: Use /usr/bin/env bash for Bash shebang
1 parent 371f308 commit 352d330

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+46
-46
lines changed

git-addsub

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# This script makes it much easier to add new submodules
44

git-addtree

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
git subtree add --prefix $1 ext/$(basename $1) master --squash

git-all-objects

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -e
33
shopt -s nullglob extglob
44

git-already-merged

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# From https://railsware.com/blog/git-housekeeping-tutorial-clean-up-outdated-branches-in-local-and-remote-repositories/
44

git-archive-all

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Super basic tool to export repo and all submodules
44
# as a single zip file

git-branch-done

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# git branch-done <branch>
33

44
# destination branch as parameter - depends on merge strategy, typically master

git-build

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
git clean -f -x -d
44
git checkout $1

git-children-of

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
commit=$1
44
branch=$2

git-clone.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# this script clones a repository, including all its remote branches
44
# Author: julianromera

git-cmpdir

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
stat=false
44
if [[ "$1" == "--stat" ]]; then

git-current

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
if [[ -z "$1" ]]; then
44
ancestor=master

git-current-branch

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
git rev-parse --abbrev-ref HEAD

git-diff-directory

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
stat=true
44
if [[ "$1" == "-p" ]]; then

git-discover-large-blobs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#set -x
33

44
# Shows you the largest objects in your repo's pack file.

git-each

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -e
33

44
DIRS="."

git-every

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
exec find . -name .git -type d -exec git --git-dir="{}" "$@" \;

git-fetch-github

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
REMOTE=${1:-origin}
33
git config remote.${REMOTE}.fetch "+refs/pull/*:refs/remotes/${REMOTE}/pr/*"

git-find-children

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
if [[ $# == 0 ]]; then
44
echo usage: git find-children REFS...

git-find-fetch

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# usage: git-find-fetch [--mirror] [--repack] DIRS...
44
#

git-find-useful-dangling-trees

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
depth=${1:-all} # 'all' or number of depth
33

44
for i in $(git fsck --unreachable | egrep 'tree|commit' | cut -d\ -f3)

git-fix-wt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
find . -name config -type f -print0 \
44
| xargs -0 perl -i -ne 'print unless /worktree =/;'

git-fixws

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# If you are using MacPorts, you'll need to install 'patchutils'
44

git-hunt-and-seek

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
for hash in $(grep ^commit | awk '{print $2}'); do
44
git diff-directory $1 $hash

git-ignore-wizard

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# take a file/directory as arg1, to be added to ignore rules.
33
# the user selects which ignore rules using dmenu
44
# in the .gitconfig case, we should probably allow the user to edit it,

git-interactive-merge

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
if [ -z "$1" -o -z "$2" ]
33
then
44
echo "usage: $0 <from> <to>" >&2

git-link-upstream

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
BRANCH=$(git-current-branch)
44

git-master

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
git stash
33
git co master
44
git stash pop

git-merge-to

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# git merge-to <branch>
33

44
# destination branch as parameter - depends on merge strategy, typically release

git-publish

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
SERVER=$1
44
PATHNAME=$2

git-pulltree

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
git subtree pull --prefix $1 ext/$(basename $1) master --squash

git-pushtree

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
git subtree push --prefix $1 fork/$(basename $1) master

git-rebase-master

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -e
33
git checkout master
44
git pull --ff-only

git-rebranch

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -e
33
newbranch=$1
44
remote=${2:-origin/master}

git-release

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# git release <branch>
33

44
# destination branch as parameter - depends on merge strategy, typically release

git-remote-in-sync.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# checks if the specified remote(s) are in sync with what we have
33
# in other words: do we have anything which is not at the remote?
44
# Any commit, tag, branch, dirty WC/index or stashed state?

git-remove-empty-commits

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
git filter-branch --commit-filter 'if [ z$1 = z`git rev-parse $3^{tree}` ]; then skip_commit "$@"; else git commit-tree "$@"; fi' "$@"

git-rm-conflicts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# git-rm-conflicts, version 1.3
44
#

git-save

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# To be used with the git-save-* scripts @ https://github.com/jwiegley/git-scripts
44
mypath=$(dirname $0)

git-signed-tag

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
git tag -s -m "$1" $1 $2

git-smerge

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
current=$(git symbolic-ref HEAD | sed 's%refs/heads/%%')
44
branch=$1

git-stale-branches

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
if ! git config --get-all remote.origin.fetch | grep -q '/pr/'; then
44
git config --add remote.origin.fetch '+refs/pull/*:refs/remotes/origin/pr/*'

git-sync

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
DIRS="$@"
44
if [[ -z "$DIRS" ]]; then

git-tag-diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Show the differences between local tags and ones on the remote, if any
33
# (defaults to origin, but another remote may be specified on the commandline)
44

git-touch-repos

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
export GIT_DIR
44

git-undo

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
cmd=$1
44
shift 1

git-working-tree

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Set contents of the working tree equal to TREEISH
44

0 commit comments

Comments
 (0)