Re: Feature Request git clone shallow-include

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

 



That is correct.  What you suggest is actually what I tried (using
sha-1 syntax).  For my purposes, excluding the tag's parent's but
including the tag is sufficient, but if is fairly straightforward to
extend support to the other use cases I'm sure someone would find is
useful.

Joe


On Tue, Feb 19, 2019 at 7:22 PM Duy Nguyen <pclouds@xxxxxxxxx> wrote:
>
> On Wed, Feb 20, 2019 at 7:07 AM Joe Enzminger
> <joe.enzminger@xxxxxxxxxxxxxxxxx> wrote:
> >
> > Currently, git clone supports shallow-exclude=<tag-name>.  The client
> > will clone up to, but not including, the commit with the tag.
> >
> > It would be useful to have the ability to include the commit with the
> > tag.  The suggestion would be to add a "shallow-include" options to
> > clone to support this behavior.
>
> So exclude the tag's parents and everything before, but keep the tag, correct?
>
> I think if we support --shallow-exclude=<tag>^ then it should work the
> way you want (if the tag is a normal merge you may need to add
> --shallow-exclude=<tag>^2 as well). And you can do even fancier thing
> like --shallow-exclude=<tag>~3 (i.e. exclude the  grand grand parent
> of the tag, but keep the tag and grand parents). We will need to
> restrict extended SHA-1 syntax to a safe subset of course.
>
> > I have tried to use shallow-exclude with a follow on git fetch
> > --deepen=1, but it always returns "fatal: error in object; unshallow
> > <sha1>"
> --
> Duy



[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