File tree 2 files changed +20
-1
lines changed
2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,7 @@ function getConfig() {
168
168
169
169
domain=$( getConfig " domain" )
170
170
protocol=$( getConfig " protocol" )
171
+ forge=$( getConfig " forge" )
171
172
172
173
# Remote ref to open
173
174
remote_ref=${upstream_branch:- ${branch:- $(git describe --tags --exact-match 2>/ dev/ null || git rev-parse HEAD)} }
@@ -183,7 +184,11 @@ else
183
184
# Make # and % characters url friendly
184
185
# github.com/paulirish/git-open/pull/24
185
186
remote_ref=${remote_ref//%/% 25} remote_ref=${remote_ref//#/% 23}
186
- providerBranchRef=" /tree/$remote_ref "
187
+ if [[ $forge == ' gitea' ]]; then
188
+ providerBranchRef=" /src/branch/$remote_ref "
189
+ else
190
+ providerBranchRef=" /tree/$remote_ref "
191
+ fi
187
192
fi
188
193
189
194
if [[ " $domain " == ' bitbucket.org' ]]; then
Original file line number Diff line number Diff line change @@ -118,6 +118,20 @@ git config open.default.remote upstream
118
118
This is equivalent to always typing ` git open upstream ` .
119
119
120
120
121
+ ### Gitea options
122
+
123
+ To configure Gitea support you need to set the following option.
124
+
125
+ ` open.[gitdomain].forge `
126
+ The git forge present at the git domain. This only needs to be set for Gitea because it uses another branch URL format.
127
+
128
+ ** Example**
129
+
130
+ ``` sh
131
+ git config [--global] " open.https://gitea.internal.biz.forge" " gitea"
132
+ ```
133
+
134
+
121
135
### GitLab options
122
136
123
137
To configure GitLab support (or other unique hosting situations) you may need to set some options.
You can’t perform that action at this time.
0 commit comments