Re: [PATCH 2/3] http: try standard proxy env vars when http.proxy config option is not set
- From
- Nelson Benitez Leon <nelsonjesus.benitez@seap.minhap.es>
- Date
- Feb 29, 2012, 10:46 UTC
- Message-ID
- <4F4E01EB.3070707@seap.minhap.es>
- In-Reply-To
- <20120228193443.GB11725@sigill.intra.peff.net>
On 02/28/2012 08:34 PM, Jeff King wrote:
Show 22 quoted lines
> On Tue, Feb 28, 2012 at 11:27:41AM -0800, Sam Vilain wrote: > >> On 2/28/12 11:15 AM, Jeff King wrote: >>> Usually we would prefer environment variables to config. So that: >>> >>> $ git config http.proxy foo >>> $ HTTP_PROXY=bar git fetch >>> >>> would use "bar" as the proxy, not "foo". But your code above would >>> prefer "foo", right? >> >> Apparently I'm the author of the http.proxy feature, though I barely >> [snip] > > Good point. We sometimes follow this order: > > 1. git-specific environment variables (i.e., $GIT_HTTP_PROXY, if > it existed) > 2. git config files (i.e., http.proxy) > 3. generic system environment (i.e., $http_proxy). > > So thinking about it that way, the original patch makes more sense.
So, in PATCH 2/3, apart from expanding the commit message.. do we want to support HTTP_PROXY or only http_proxy ? HTTP_PROXY seems to not be very used by existent programs, but support it it's only a gentenv call..