what is differnce between git filters on UI and git rev-list command

74 views Asked by At

I am trying to analyse the number of commits done on my master branch. I found two ways, one is on applying filters on git UI and other via git CLI. I got the different output by both the commands. The outputs are as-

ON UI-
is:pr is:merged merged:>=2018-05-20

I got output as 81 Total. And when I try to get the output via CLI using the below command-

Using git CLI-
git rev-list --count HEAD --since="Sep 05 2018"

o/p is- 230 total.

As per my understanding both of these commands should produce same output. Or is there any difference between them ??
Note:- No direct commit on master is allowed.

1

There are 1 answers

1
LeGEC On

rev-list has a whole bunch of filtering options, one of them is :

--merges
    Print only merge commits. This is exactly the same as --min-parents=2.

My guess is this is what is:merged applies.


note : do not forget the 's', --merge also exists, and does not do the same thing at all :

--merge
    After a failed merge, show refs that touch files having a conflict and
    don’t exist on all heads to merge.

Thinking about it : github's pull requests are not represented in the git repo, I imagine is:pr would list those ; in that case, is:merged could also filter based on a flag in github's database, and not be something you could check easily through git rev-list.

Among your git merges, do you see some which obviously do not match a PR ?