"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: needless id serialization in match_logmsg
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Sat, 11 Jun 2022 12:17:46 +0200

Download raw body.

Thread
On Sat, Jun 11, 2022 at 11:19:37AM +0200, Omar Polo wrote:
> reading the thread about searching/filtering by commit author, I took a
> look at got.c' match_logmsg and spotted this (apparently) needless
> serialization of the commit id.
> 
> it's there since match_logmsg was introduced in 6841bf1 by kn@.  the log
> message says it was copied from tog' match_commit, but tog version also
> matches on the author, committer and commit id (hence why it needs the
> id string.)
> 
> 
> P.S.: somehow syncing the two functions maybe it's not a bad idea.  I'd
> like if it matched also the committer/author as hinted by stps@ in the
> other thread, but I'm not that sure matching commits ids is a useful
> feature.

Yes, got log -S should be made to match tog behaviour.

Matching the ID in both log message and meta-data makes sense.
Commit IDs are sometimes referred to in log messages. Being able to
match the original commit (which obviously cannot mention its own ID
in its own log message) is very useful in that case.