Skip to content

Commit 56188b9

Browse files
committed
gitlab wrapper: remove --local from git config query command
Indicate on multiple remotes error message, that remote can be configured using git-config
1 parent c5128ca commit 56188b9

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

git-gitlab.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ instance_name() {
2323
grep -B 5 "^\s*url\s*=\s*http\(s\)*://$host" ~/.python-gitlab.cfg | grep "^\[" | tail -n 1 | sed -e 's#\[\(.\+\)\]#\1#'
2424
}
2525

26-
remote=$(git config --local gitlab.remote)
26+
remote=$(git config gitlab.remote)
2727
[ -n "$remote" ] || remote=$(git remote)
2828
if [ "x$1" = "x--remote" ]; then
2929
remote=$2
@@ -34,7 +34,11 @@ if [ -z "$remote" ]; then
3434
exit 1
3535
fi
3636
if [ $(echo $remote | wc -w) -gt 1 ]; then
37-
echo "Multiple remotes found, specify a remote using --remote REMOTE"
37+
echo <<EOF
38+
Multiple remotes found, specify a remote using '--remote REMOTE' argument
39+
Alternatively, you can configure your git repository using the command:
40+
git config --local gitlab.remote REMOTE"
41+
EOF
3842
exit 1
3943
fi
4044

0 commit comments

Comments
 (0)