From: Christian Couder <email@example.com> To: Hariom verma <firstname.lastname@example.org> Cc: git <email@example.com>, Heba Waly <firstname.lastname@example.org> Subject: Re: [RFC] ref-filter: add new atom `signature` Date: Wed, 1 Jul 2020 11:52:52 +0200 Message-ID: <CAP8UFD2qbtoXay1AgwrdaJ8XgVkq=NqBTa=KptUTop19xzUVuQ@mail.gmail.com> (raw) In-Reply-To: <CA+CkUQ_-_Rzu00w1L7QeMxT73a_MsD=8kY0+wtuRmze4z+1_AA@mail.gmail.com> Hi, On Sun, Jun 28, 2020 at 12:05 PM Hariom verma <email@example.com> wrote: > > Hi, > > In ref-filter, we have a bunch of atoms which serves as a formatting > option for `git for-each-ref`. Ok. > Despite of having 'subject' as an argument to 'contents' [i.e > `%(contents:subject)`], we still have 'subject' as an atom [i.e > `%(subject)`]. > Likewise for `%(contents:signature)`, we can have 'signature' as an atom too. Ok. Some things are available in different ways perhaps because of historical reasons and backward compatibility. > Currently, `%(contents:signature)` internally uses `parse_signature()` > that only works for signed tag objects. I plan to expand the scope of > `signature` by defining it as an atom and will make it work for > commits too. Didn't you say already that "we can have 'signature' as an atom too", so isn't it already defined as an atom? Does `%(contents:signature)` work for commits while '%(signature)' doesn't? And what happens when it doesn't work? > Also, thinking of adding `signer`, `key`, `fingerprint`, > `primarykeyfingerprint`, `trustlevel` and `grade`[print 'G' for good, > 'B' for bad...] as arguments to "signature". Ok, I guess all the above arguments would be new. > This change will also help me in using ref-filter's logic in pretty.c > for formatting options like "GG", "G?", etc. To know more about these > formatting options, you can take a look here. > > If curious about what approach I'm taking for using ref-filter logic > in pretty.c, see > > Would love hear your thoughts on it. Any suggestions will also be appreciated. It would be nice to see, at least for the atoms or arguments that you are planning to, or have already, worked on, a list showing how each formatting option in pretty.c maps to one or more atoms possibly with arguments. For example something like: %GS: show the name of the signer for a signed commit maps to: %(signature:signer) status: yet to be implemented Thanks, Christian.
next prev parent reply index Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-28 10:05 Hariom verma 2020-07-01 9:52 ` Christian Couder [this message] 2020-07-01 11:55 ` Hariom verma
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CAP8UFD2qbtoXay1AgwrdaJ8XgVkq=NqBTa=KptUTop19xzUVuQ@mail.gmail.com' \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Mailing List Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/git/0 git/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 git git/ https://lore.kernel.org/git \ firstname.lastname@example.org public-inbox-index git Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.git AGPL code for this site: git clone https://public-inbox.org/public-inbox.git