On Mon, May 20, 2019 at 04:29:10PM +0200, Jakub Jelinek wrote:
> On Mon, May 20, 2019 at 04:26:45PM +0200, Andreas Schwab wrote:
> > On Mai 20 2019, Florian Weimer <fwei...@redhat.com> wrote:
> > 
> > > If GCC policy is to reject merge commits, a command similar to
> > > “git log --pretty=oneline | wc -l” gives something that is very
> > 
> > git rev-list HEAD | wc -l
> 
> That is still in the 1.3 seconds range, git rev-list --count HEAD | wc -l
> is in the 1 seconds range user time.

You can store the output of

  git rev-list <branch>

somewhere, this should be fully static (on official branches).  Use
--reverse if you want extra convenience ;-)


$ git rev-list --reverse $BRANCH | grep -n $HASH | sed 's/:.*//'


Segher

Reply via email to