mbox series

[v4,0/1] ref-filter: add new "signature" atom

Message ID 20230116173814.11338-1-nsengiyumvawilberforce@gmail.com (mailing list archive)
Headers show
Series ref-filter: add new "signature" atom | expand

Message

Nsengiyumva Wilberforce Jan. 16, 2023, 5:38 p.m. UTC
This patch is not different from previous version(3), this is because
the previous version(3) could not show the difference from version(2)
of the patch. I will explain every change from the first version
<https://public-inbox.org/git/pull.1452.git.1672102523902.gitgitgadget@gmail.com/> 
to version 3
<https://public-inbox.org/git/20230110005251.10539-1-nsengiyumvawilberforce@gmail.com/>
because I first had a big trouble in transitioning from gitgitgadget
to using git send-mail

***THE FOLLOWING ARE THE CHANGES***
a) From the first version to version 2
<https://public-inbox.org/git/pull.1428.git.git.1673254961028.gitgitgadget@gmail.com/>
Version 2 addresses all Junio's comments for version 1, the comments are
here.
<https://public-inbox.org/git/xmqqo7rpvb83.fsf@gitster.g/>
->summary of the changes
i) I changed the commit message to detail more about the feature I am
introducing.
ii) Introduced a new helper function in ref-filter.c called
parse_signature_option() and handled !arg case first.
iii) Used the above helper function to eliminate the repetition that
was in grab_signature() for checking different signature option.
iv) I also moved check_commit_signature(commit, &sigc) out of the
to avoid running GPG twice.still this change is in grab_signature()
in ref-filter.c.
v) add a new test in t6300 to test bare signature atom(%(signature))
since I had missed it

NB: I did not change the parser function name as he suggested, I
think my commit message was misleading.

b) from version 2 to version 3
<https://public-inbox.org/git/20230110005251.10539-2-nsengiyumvawilberforce@gmail.com/>

->summary of changes
i) Got rid of test for bare signature atom. This is because the test was
passing for some CI tests(different machines) and some others were
failing.

Best Regards,
Wilberforce

Nsengiyumva Wilberforce (1):
  ref-filter: add new "signature" atom

 Documentation/git-for-each-ref.txt |  27 +++++++
 ref-filter.c                       | 101 +++++++++++++++++++++++++
 t/t6300-for-each-ref.sh            | 116 +++++++++++++++++++++++++++++
 3 files changed, 244 insertions(+)

Range-diff against v3:
1:  ce51d8e79e = 1:  ce51d8e79e ref-filter: add new "signature" atom

Comments

Junio C Hamano Jan. 26, 2023, 9:07 p.m. UTC | #1
Nsengiyumva Wilberforce <nsengiyumvawilberforce@gmail.com> writes:

> iv) I also moved check_commit_signature(commit, &sigc) out of the
> to avoid running GPG twice.still this change is in grab_signature()
> in ref-filter.c.

Is there some code to avoid calling check_commit_signature() or
grab_signature() itself when no %(signature) atoms is used?  When
nobody asked to use signature atom at all, calling GPG once is
already once too many.

Thanks.