Re: fatal: Not a valid object name HEAD

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

 



"Bence Ferdinandy" <bence@xxxxxxxxxxxxxx> writes:

> I think the correct way to handle this would be to check if the remote has
> `mirror=true` set, and if we're running in a bare repository we should overwrite
> HEAD and if it's not a mirror we should instead set up
> `refs/remotes/nonmirrorremote/HEAD`. (I think a remote can be a mirror without
> the repository being bare, I'm not sure.)

A non-bare repository can technically be a mirror but such a thing
is only useful when (1) it never fetches from anywhere afterwards,
(2) it stays on a branch that never changes by convention, or (3) it
stays on a detached HEAD.  Otherwise "git fetch" in it would almost
always fail.

Practically (1) and (2) are not all that useful---such a static
checkout does not even have to be a Git repository but a tarball
extract.  If you overwrite HEAD upon fetch, you will render the last
remaining useful usage, (3), also useless.

Thanks.





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

  Powered by Linux