Re: Push tag from shallow clone?

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

 



skillzero@xxxxxxxxx wrote:
> The documentation for git clone says that if you use --depth=1 to make
> a shallow clone that you can't push it. But I made a shallow clone,
> created a tag, then tried to push that tag and it worked. Am I just
> getting lucky or is it safe to push a tag with a shallow clone?

Yea, you are getting lucky.  The tag is easily identified as one
object head of the current branch on the remote, and the client is
able to produce the pack and send it.

If the remote branch gets modified in the interm, the builder may
not be able to deduce what it needs to send, and will attempt to
pack a lot more data, potentially finding the missing parents from
where it is shallow.

Why not just have a central area on the build server that keeps
full clones of everything, and use "git clone -s" or "git clone
--reference" in order to create the new work area for the builder?

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

  Powered by Linux