I've noticed the command `git --git-dir=<path> shortlog`

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

 



Hello everyone

OS: manjaro 20.2.1
git version: 2.30.0

I've noticed the command `git --git-dir=<path> shortlog`

It gives me some interesting output

$ git --git-dir=<path> shortlog --summary --email --numbered
--committer HEAD --end-of-options | wc -l

When run it, it will tell me how many committers on repo of <path>

But when run it on git repo dir, something interesting happened

$ git clone --bare https://github.com/gitlabhq/gitlabhq.git
$ git clone https://gitlab.com/gitlab-org/gitaly.git

$ git --git-dir=./gitlabhq.git shortlog --summary --email --numbered
--committer HEAD --end-of-options | wc -l
> 2592

Ok, we can known the gitlab have 2592 committers on HEAD (refs/heads/master) ref

Then something magical happened

$ cd gitaly
$ git --git-dir=../gitlabhq.git shortlog --summary --email --numbered
--committer HEAD --end-of-options | wc -l
> 2587

Obviously these two outputs are inconsistent, and the second command
was affected by the `gitaly repo`

Shouldn't I use `--git-dir` to point to a bare repo? Or something else
went wrong?

Thank u!



[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