|
|
@ -5,7 +5,7 @@ |
|
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com> |
|
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com> |
|
|
|
# |
|
|
|
# |
|
|
|
|
|
|
|
|
|
|
|
local remote branches branch current_branch url |
|
|
|
local remote branches branch current_branch file url |
|
|
|
|
|
|
|
|
|
|
|
remote="${1:-origin}" |
|
|
|
remote="${1:-origin}" |
|
|
|
url=$( |
|
|
|
url=$( |
|
|
@ -18,6 +18,7 @@ branches=($( |
|
|
|
)) |
|
|
|
)) |
|
|
|
current_branch="$(git-branch)" |
|
|
|
current_branch="$(git-branch)" |
|
|
|
branch="${2:-master}" |
|
|
|
branch="${2:-master}" |
|
|
|
|
|
|
|
file="$3" |
|
|
|
|
|
|
|
|
|
|
|
if [[ -z "$2" ]]; then |
|
|
|
if [[ -z "$2" ]]; then |
|
|
|
if (( $branches[(I)$current_branch] != 0 )); then |
|
|
|
if (( $branches[(I)$current_branch] != 0 )); then |
|
|
@ -28,7 +29,7 @@ if [[ -z "$2" ]]; then |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if [[ -n "$url" ]]; then |
|
|
|
if [[ -n "$url" ]]; then |
|
|
|
url="${url}/tree/${branch}" |
|
|
|
url="${url}/tree/${branch}/${file}" |
|
|
|
|
|
|
|
|
|
|
|
if (( $+commands[$BROWSER] )); then |
|
|
|
if (( $+commands[$BROWSER] )); then |
|
|
|
"$BROWSER" "$url" |
|
|
|
"$BROWSER" "$url" |
|
|
|