gotip: don't assume origin as the git remote name

When running "gotip download", we try to update the gotip working tree
by running several git commands with the hard-coded name "origin". The
name "origin" is the default in git, but this is configurable, so it's
not necessarily safe to assume that a remote named "origin" will always
exist.

We can, however, force the name "origin" when doing the initial clone,
so that later git operations that interact with the remote can safely
assume that the name "origin" exists. This isn't totally reliable,
because if a user manually renames the remote, the commands that assume
"origin" will still fail. This change, though, ensures that the default
configuration will work even if a user has set clone.defaultRemoteName
in their local git configuration.

Change-Id: I387bac2b8090f7070c1e4833dcc6362bf708c1f6
GitHub-Last-Rev: a7e2ce9ec0b8726dcabac718940e7658e1ff3d61
GitHub-Pull-Request: golang/dl#11
Reviewed-on: https://go-review.googlesource.com/c/dl/+/506696
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Bypass: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Commit-Queue: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
1 file changed
tree: 96f65e70d0862b65041f0bd9ad7b2bd7bbffc2d1
  1. go1.10/
  2. go1.10.1/
  3. go1.10.2/
  4. go1.10.3/
  5. go1.10.4/
  6. go1.10.5/
  7. go1.10.6/
  8. go1.10.7/
  9. go1.10.8/
  10. go1.10beta1/
  11. go1.10beta2/
  12. go1.10rc1/
  13. go1.10rc2/
  14. go1.11/
  15. go1.11.1/
  16. go1.11.10/
  17. go1.11.11/
  18. go1.11.12/
  19. go1.11.13/
  20. go1.11.2/
  21. go1.11.3/
  22. go1.11.4/
  23. go1.11.5/
  24. go1.11.6/
  25. go1.11.7/
  26. go1.11.8/
  27. go1.11.9/
  28. go1.11beta1/
  29. go1.11beta2/
  30. go1.11beta3/
  31. go1.11rc1/
  32. go1.11rc2/
  33. go1.12/
  34. go1.12.1/
  35. go1.12.10/
  36. go1.12.11/
  37. go1.12.12/
  38. go1.12.13/
  39. go1.12.14/
  40. go1.12.15/
  41. go1.12.16/
  42. go1.12.17/
  43. go1.12.2/
  44. go1.12.3/
  45. go1.12.4/
  46. go1.12.5/
  47. go1.12.6/
  48. go1.12.7/
  49. go1.12.8/
  50. go1.12.9/
  51. go1.12beta1/
  52. go1.12beta2/
  53. go1.12rc1/
  54. go1.13/
  55. go1.13.1/
  56. go1.13.10/
  57. go1.13.11/
  58. go1.13.12/
  59. go1.13.13/
  60. go1.13.14/
  61. go1.13.15/
  62. go1.13.2/
  63. go1.13.3/
  64. go1.13.4/
  65. go1.13.5/
  66. go1.13.6/
  67. go1.13.7/
  68. go1.13.8/
  69. go1.13.9/
  70. go1.13beta1/
  71. go1.13rc1/
  72. go1.13rc2/
  73. go1.14/
  74. go1.14.1/
  75. go1.14.10/
  76. go1.14.11/
  77. go1.14.12/
  78. go1.14.13/
  79. go1.14.14/
  80. go1.14.15/
  81. go1.14.2/
  82. go1.14.3/
  83. go1.14.4/
  84. go1.14.5/
  85. go1.14.6/
  86. go1.14.7/
  87. go1.14.8/
  88. go1.14.9/
  89. go1.14beta1/
  90. go1.14rc1/
  91. go1.15/
  92. go1.15.1/
  93. go1.15.10/
  94. go1.15.11/
  95. go1.15.12/
  96. go1.15.13/
  97. go1.15.14/
  98. go1.15.15/
  99. go1.15.2/
  100. go1.15.3/
  101. go1.15.4/
  102. go1.15.5/
  103. go1.15.6/
  104. go1.15.7/
  105. go1.15.8/
  106. go1.15.9/
  107. go1.15beta1/
  108. go1.15rc1/
  109. go1.15rc2/
  110. go1.16/
  111. go1.16.1/
  112. go1.16.10/
  113. go1.16.11/
  114. go1.16.12/
  115. go1.16.13/
  116. go1.16.14/
  117. go1.16.15/
  118. go1.16.2/
  119. go1.16.3/
  120. go1.16.4/
  121. go1.16.5/
  122. go1.16.6/
  123. go1.16.7/
  124. go1.16.8/
  125. go1.16.9/
  126. go1.16beta1/
  127. go1.16rc1/
  128. go1.17/
  129. go1.17.1/
  130. go1.17.10/
  131. go1.17.11/
  132. go1.17.12/
  133. go1.17.13/
  134. go1.17.2/
  135. go1.17.3/
  136. go1.17.4/
  137. go1.17.5/
  138. go1.17.6/
  139. go1.17.7/
  140. go1.17.8/
  141. go1.17.9/
  142. go1.17beta1/
  143. go1.17rc1/
  144. go1.17rc2/
  145. go1.18/
  146. go1.18.1/
  147. go1.18.10/
  148. go1.18.2/
  149. go1.18.3/
  150. go1.18.4/
  151. go1.18.5/
  152. go1.18.6/
  153. go1.18.7/
  154. go1.18.8/
  155. go1.18.9/
  156. go1.18beta1/
  157. go1.18beta2/
  158. go1.18rc1/
  159. go1.19/
  160. go1.19.1/
  161. go1.19.10/
  162. go1.19.11/
  163. go1.19.12/
  164. go1.19.13/
  165. go1.19.2/
  166. go1.19.3/
  167. go1.19.4/
  168. go1.19.5/
  169. go1.19.6/
  170. go1.19.7/
  171. go1.19.8/
  172. go1.19.9/
  173. go1.19beta1/
  174. go1.19rc1/
  175. go1.19rc2/
  176. go1.20/
  177. go1.20.1/
  178. go1.20.2/
  179. go1.20.3/
  180. go1.20.4/
  181. go1.20.5/
  182. go1.20.6/
  183. go1.20.7/
  184. go1.20.8/
  185. go1.20rc1/
  186. go1.20rc2/
  187. go1.20rc3/
  188. go1.21.0/
  189. go1.21.1/
  190. go1.21rc1/
  191. go1.21rc2/
  192. go1.21rc3/
  193. go1.21rc4/
  194. go1.5.4/
  195. go1.6.4/
  196. go1.7.6/
  197. go1.8/
  198. go1.8.1/
  199. go1.8.2/
  200. go1.8.3/
  201. go1.8.4/
  202. go1.8.5/
  203. go1.8.6/
  204. go1.8.7/
  205. go1.8beta1/
  206. go1.8beta2/
  207. go1.8rc1/
  208. go1.8rc2/
  209. go1.8rc3/
  210. go1.9/
  211. go1.9.1/
  212. go1.9.2/
  213. go1.9.3/
  214. go1.9.4/
  215. go1.9.5/
  216. go1.9.6/
  217. go1.9.7/
  218. go1.9beta1/
  219. go1.9beta2/
  220. go1.9rc1/
  221. go1.9rc2/
  222. gotip/
  223. internal/
  224. codereview.cfg
  225. CONTRIBUTING.md
  226. go.mod
  227. LICENSE
  228. PATENTS
  229. README.md
README.md

golang.org/dl

This repository holds the Go wrapper programs that run specific versions of Go, such as go install golang.org/dl/go1.10.3@latest and go install golang.org/dl/gotip@latest.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html. The main issue tracker for the net repository is located at https://github.com/golang/go/issues. Prefix your issue with “dl:” in the subject line, so it is easy to find.