fix POSIX compliance in sed expressions in 'g push'
This commit is contained in:
parent
048f842376
commit
4ad9256ee3
1 changed files with 2 additions and 2 deletions
4
bin/g
4
bin/g
|
|
@ -419,8 +419,8 @@ else
|
||||||
# Get local branch name
|
# Get local branch name
|
||||||
local_branch=$(git rev-parse --abbrev-ref HEAD)
|
local_branch=$(git rev-parse --abbrev-ref HEAD)
|
||||||
# Check for multiple remotes
|
# Check for multiple remotes
|
||||||
remote_count=$(git remote show | wc -l)
|
remote_count=$(git remote show | wc -l | sed 's/[[:space:]]*//g')
|
||||||
remotes=$(git remote show | tr '\n' ' ' | sed 's/\s*$//g')
|
remotes=$(git remote show | tr '\n' ' ' | sed 's/[[:space:]]*$//g')
|
||||||
if [ "$remote_count" = "0" ]; then
|
if [ "$remote_count" = "0" ]; then
|
||||||
echo "No remotes configured yet"
|
echo "No remotes configured yet"
|
||||||
exit
|
exit
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue