How can I tell the time difference between the git tag and the original commit

I searched for the time difference between the moments of fixation and fixation of fixation.

This is what I have so far, however the committerdate, which I think is the correct field, is null.

git for-each-ref --format='%(taggerdate) : %(committerdate) :  %(refname)' --sort=-taggerdate --count=10 refs/tags

Under the assumption that I am only looking for tags, although I cannot figure it out correctly. In an ideal world, this will show the difference between the times, but I can do it later if this is not possible.

+4
source share
1 answer

The documentationgit for-each-ref is misleading:

creatordate creator - committer tagger . .

, : %(creatordate) tagger . , , Git : , - committer?

, for-each-ref - . committer , , 1 . , , "", : *. 2

, :

git for-each-ref \
    --format='%(taggerdate) : %(*committerdate) :  %(refname)' \
    --sort=-taggerdate --count=10 refs/tags

1 ; , . , .

2 , , , ( blob), . , , , script ^{} ^{commit}. ( , ^{commit} , , ^{} blob.)

+3

Source: https://habr.com/ru/post/1657271/


All Articles