git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Try harder to find a remote when on a detached HEAD or non-tracking branch.

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 19, 2012, 22:26 UTC
Message-ID
<7vobofx7jp.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20120619220026.GA22852@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 29 quoted lines
> On Tue, Jun 19, 2012 at 02:58:38PM -0700, Junio C Hamano wrote:
>
>> Jeff King <peff@peff.net> writes:
>> 
>> > On Tue, Jun 19, 2012 at 05:43:03PM -0400, Marc Branchaud wrote:
>> >
>> >> I suggest git would be better off changing the way it finds the default
>> >> remote to:
>> >> 
>> >> 	Use the currently checked-out branch's remote;
>> >> 	or Use the remote specified in the original clone command[*];
>> >> 	or use "origin".
>> >> 
>> >> [*] With some strong mechanism for identifying this remote.
>> >
>> > Yes, that sounds like a much saner path. I think your [*] is just
>> > "record the different name in remote.default during the clone".
>> >
>> > Then we continue to use "origin" when that is not set (so existing repos
>> > without "-o" see no change at all). New repos cloned with "-o" would be
>> > fixed. Old repos cloned with "-o" are still broken, but there is at
>> > least a simple one-time workaround ("git config remote.default foo").
>> 
>> Yeah, I can certainly buy that.
>
> It is also a step towards defining remote.defaultFetch and
> remote.defaultPush if you wanted them to be different, something that
> has come up in conversation a few times (e.g., when you treat a
> read-only upstream as your origin, but publish elsewhere).
Yeah, we are on the same page on that one.
Previous: Jeff KingNext: Jens Lehmann
Message 16 of 20 in “Try harder to find a remote when on a detached HEAD or non-tracking branch.”
  1. Try harder to find a remote when on a detached HEAD or non-tracking branch.marcnarc@xiplink.com, Jun 18, 2012
  2. Junio C HamanoJun 18, 2012
  3. Marc BranchaudJun 18, 2012
  4. Junio C HamanoJun 18, 2012
  5. Marc BranchaudJun 19, 2012
  6. Junio C HamanoJun 19, 2012
  7. Heiko VoigtJun 19, 2012
  8. Marc BranchaudJun 19, 2012
  9. Heiko VoigtJun 20, 2012
  10. Jeff KingJun 19, 2012
  11. Junio C HamanoJun 19, 2012
  12. Marc BranchaudJun 19, 2012
  13. Jeff KingJun 19, 2012
  14. Junio C HamanoJun 19, 2012
  15. Jeff KingJun 19, 2012
  16. Junio C HamanoJun 19, 2012
  17. Jens LehmannJun 19, 2012
  18. Marc BranchaudJun 19, 2012
  19. Phil HordJun 20, 2012
  20. Arnaud LacombeJun 18, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.