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}
49
49
remote=${remote:- $tracked_remote }
50
50
remote=${remote:- " origin" }
51
51
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 " )
54
53
55
54
if [[ -z " $giturl " ]]; then
56
55
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() {
35
35
assert_output --partial " usage: git open"
36
36
}
37
37
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
+
38
50
# #
39
51
# # GitHub
40
52
# #
You can’t perform that action at this time.
0 commit comments