Skip to content

Commit c983ec8

Browse files
committed
Fix current_remote function.
1 parent 1f3c2e0 commit c983ec8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/gg

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ current_remote() {
129129
remote=$(git rev-parse --abbrev-ref $(current_branch)@{upstream})
130130
remote=(${remote//\// })
131131

132-
echo ${remote[0]}
132+
if [ "${remote[0]}" = "remotes" ]; then
133+
echo ${remote[1]}
134+
else
135+
echo ${remote[0]}
136+
fi
133137
}
134138

135139
current_remote_url() {

0 commit comments

Comments
 (0)