Rewrite build_url, use web_protocol for repo indicator.
Created by: dosire
Display HTTPS
as the repo clone indicator when that is the protocol.
Had to rewrite the build_url function since it was modifying the web_protocol variable.
Merge request reports
Activity
Unable to load the diff Created by: dosire
@randx Your concern is understandable, thank you for sharing it. However, the local variable
custom_port
will be initialized (with the value nil) even ifweb_custom_port?
is false or nil. From http://ruby.runpaint.org/variables about local variables: "It is initialized if it appears on the left‐hand side (before the equals sign (U+003D)) of an assignment expression, even if the expression does not actually execute. Variables of the latter sort have the value nil."By Administrator on 2012-10-21T13:48:45 (imported from GitLab project)
By Administrator on 2012-10-21T13:48:45 (imported from GitLab)
Unable to load the diff Unable to load the diff Created by: dosire
@randx Maybe you can let me know what you think about the suggestion above. We are running into a bug with the existing code.
raw_url = self.web_protocol
makes raw_url the same as self.web_protocol, when you modifyraw_url
after thatself.web_protocol
is also changed. This leads to errors such as https://github.com/dosire/gitlabhq/issues/58. You could either useraw_url = self.web_protocol.dup
or merge this PR to solve it.By Administrator on 2012-10-21T13:48:45 (imported from GitLab project)
By Administrator on 2012-10-21T13:48:45 (imported from GitLab)
Created by: dosire
@randx After our discussion I adapted the code to make the initialization obvious. Please pull this or give feedback since it fixes a bug.
By Administrator on 2012-10-18T14:04:31 (imported from GitLab project)
By Administrator on 2012-10-18T14:04:31 (imported from GitLab)
Created by: dosire
@randx Sorry, I can't see the merge status in this PR. I merged in the master again and tested with a PR on my own repo and it looks green: https://github.com/dosire/gitlabhq/pull/62 and https://travis-ci.org/#!/gitlabhq/gitlabhq/builds/2875236 I hope everything is ok now. If not let me know.
By Administrator on 2012-10-21T14:03:49 (imported from GitLab project)
By Administrator on 2012-10-21T14:03:49 (imported from GitLab)