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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 19, 2012 at 02:58:38PM -0700, Junio C Hamano wrote:

> Jeff King <peff@xxxxxxxx> 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).

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]