Re: Why no git --depth=1 option for makepkg?

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



On 3/4/18, Eli Schwartz <eschwartz@xxxxxxxxxxxxx> wrote:
> On 03/04/2018 10:58 AM, Carsten Mattner wrote:
>> At least for GitHub remotes, don't they still support checking out
>> with SVN? If they do, this would be faster and use less space, too,
>> when we just need a certain revision and no history at all.
>>
>> Other than that, I'm "pretty sure" that a git depth of 10 commits
>> will work for most repositories when you clone normally, not
>> shallow. Should also work for tags. However, it's true that git's
>> limited depth clone isn't implemented fully. There are many unhandled
>> cases and surprises.
>>
>> All that being said, I can report that in CI of personal and company
>> projects, I haven't yet run into problems with depth=5. It speeds up
>> checking out the tree, even when it's a fast local network remote.
>
> depth=1 is perfectly okay for most travis cases, as you don't need any
> history at all unless your build system looks for it... this is a
> bizarre comparison.
>
> The point, is that PKGBUILDs do look for history, and make use of it --
> figuring out clever ways to avoid pulling history is completely missing
> the point that we, well, want history.

Interesting. What does PKGBUILD do with history of more than 10 revisions?
If we checkout a tag or specific commit (e.g. xf86-video-intel), what
does PKGBUILD need prior revisions for? I'm sure you're correct, I'd
like to know what it is, if you don't mind explaining.

> depth=10 will only work for tags that are present in the last ten
> commits, which unsurprisingly is exactly the opposite of most projects
> (which don't have tags at all and therefore require all history without
> exception in order to implement the pkgver() function) or even most
> projects with tags (which don't release stable releases on basically
> every other commit).

Eli, you certainly have more experience, so I'm trusting your word here.
However, I don't understand how depth=10 can fail when trying to checkout
a specific git tag. Wouldn't the tag be the HEAD in that case?


Checking out with SVN is a speedup trick, and I still think it can make
sense if depth limiting git clone is not possible. svn checkout is
basically just copying the tree of that revision (or branch/tag path)
specified.



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux