Re: Cloning into an existing, non-empty directory?

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

 



On Mon, Apr 25, 2011 at 03:59:13AM -0500, Jonathan Nieder wrote:

> who wonders where his origin/HEAD symref came from and if
> "git remote set-head --auto origin" was ever automatic

It is created by "clone", but not by "git remote add". The "auto" in
remote's "set-head" means "right now, look up the HEAD on the remote and
set our $remote/HEAD based on it". Not anything about being set up or
tracked automatically.

Perhaps "git remote add" should automatically do "set-head --auto", just
as if you had cloned. I think the main reason against it is that doing
so requires hitting the network, which "remote add" (without "-f") does
not otherwise need to do.

Certainly if we are doing "-f", it would not be a big deal. In other
cases, we could perhaps fill in the value on the first "fetch", but we
may need infrastructure to know when we are on the first fetch (and it
is not simply the case that the user deleted $remote/HEAD themselves).

-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]