[LEDE-DEV] [PATCH] scripts/getver.sh: use --count for git rev-list to count commits

Rafał Miłecki zajec5 at gmail.com
Thu Nov 17 03:17:19 PST 2016


On 17 November 2016 at 10:56, Jonas Gorski <jonas.gorski at gmail.com> wrote:
> On 17 November 2016 at 10:10, Rafał Miłecki <zajec5 at gmail.com> wrote:
>> On 17 November 2016 at 10:05, Rafał Miłecki <zajec5 at gmail.com> wrote:
>>> On 17 November 2016 at 09:57, Jo-Philipp Wich <jo at mein.io> wrote:
>>>> do you happen to know whether rev-list --count is available in all Git
>>>> versions?
>>>
>>> I found it mentioned in various posts from 2012 so it should be well settled.
>>
>> More reliable source: it's first documented in 1.8.0:
>> https://git-scm.com/docs/git-rev-list/1.8.0
>> which was released in 2012.
>
> We currently only require 1.7[1], and some of the buildbots still use
> that. --count was actually used in the first version, and removed
> because it broke the build on some buildbots / LTS distributions [2].

OK, thanks for catching this.

I guess it's not that important for LEDE with its small commits:
> time git rev-list HEAD~30000..HEAD | wc -l
30000

real    0m0.352s
user    0m0.325s
sys     0m0.052s

-- 
Rafał



More information about the Lede-dev mailing list