File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,7 @@ remote=${1:-$default_remote}
4949remote=${remote:- $tracked_remote }
5050remote=${remote:- " origin" }
5151
52- # @TODO ls-remote will also expand "insteadOf" items `giturl=$(git ls-remote --get-url $remote)``
53- giturl=$( git config --get " remote.${remote} .url" )
52+ giturl=$( git ls-remote --get-url " $remote " )
5453
5554if [[ -z " $giturl " ]]; then
5655 echo " Git remote is not set for $remote " 1>&2
Original file line number Diff line number Diff line change @@ -35,6 +35,18 @@ setup() {
3535 assert_output --partial " usage: git open"
3636}
3737
38+ # #
39+ # # url handling
40+ # #
41+
42+ @test " url: insteadOf handling" {
43+ git config --global url.http://example.com/.insteadOf ex:
44+ git remote set-url origin ex:example.git
45+ git checkout -B master
46+ run ../git-open
47+ assert_output " http://example.com/example"
48+ }
49+
3850# #
3951# # GitHub
4052# #
You can’t perform that action at this time.
0 commit comments