mirror of
https://github.com/samsonjs/bin.git
synced 2026-03-25 07:55:47 +00:00
Fix running git-update without any args
This commit is contained in:
parent
8cb24aa2eb
commit
f9062c25cb
1 changed files with 2 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e # bail on errors
|
||||
set -euo pipefail
|
||||
|
||||
function current_branch() {
|
||||
git rev-parse --abbrev-ref HEAD | sed -e 's/^heads\///'
|
||||
|
|
@ -13,7 +13,7 @@ if [[ "$ORIG_BRANCH" = "HEAD" ]]; then
|
|||
echo "Cannot update in a detached HEAD state"
|
||||
exit 1
|
||||
fi
|
||||
if [[ -z "$2" ]]; then
|
||||
if [[ -z "${2:-}" ]]; then
|
||||
BRANCHES="$ORIG_BRANCH"
|
||||
else
|
||||
if [[ "$1" = "$REMOTE" ]]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue