Reputation: 515
Is there a way to get a nicely formated listing of tags and commits per tag? The output I'm looking for would be something like:
TAG - DATE - Num of commits
------------------------------
v1.1.1 - 10/MAR/2020 - 12
v1.1.2 - 15/MAR/2020 - 15
...
Upvotes: 0
Views: 255
Reputation: 51850
I don't know of a one shot command to do this. However :
v
in version order :git tag --list v* --sort="v:refname"
git rev-list --count A..B
# example :
git rev-list --count v1.1.1..v1.1.2
# %ad for author date, %cd for committer date
$ git log -1 --format="%cd" v1.1.2
# you can tell git log to format the date using the --date option
$ git log -1 --format="%cd" v1.1.2
# you can tell git log to format the date using the --date option
$ git log -1 --date=short --format="%cd" v1.1.2
# you can use 'format:...' to specify a format for strftime() :
$ git log -1 --date="format:%Y/%b/%d" --format="%cd" v1.1.2
More details on the --date
option (full doc here) :
--date=short
shows only the date, but not the time, in YYYY-MM-DD format.[...]
--date=format:...
feeds the format...
to your systemstrftime
Using these bricks, you can write a script that produces the output you want.
Upvotes: 1