Week 2: Reading
Last week, I had sent out the patch series duplicating the signature
atom from pretty
into ref-filter
. Christian, Junio, Eric and Oswald
left a few comments. One interesting change has been to the way we check
for the version of GPG
in the prereq GPG2
. How I originally wrote
it was
case "$(gpg_version)" in
!"gpg (GnuPG) 2."*)
say "This test requires a GPG version >= v2.0.0"
exit 1
;;
Now this seems absurd because if we ever see a GPG v3 or v4 or so on, this
won’t work. This can be overcome with
"gpg (GnuPG) 0."* | "gpg (GnuPG) 1."*)
which Christian suggested and Eric suggested an improved version
"gpg (GnuPG) "[01].*)
which makes use of glob patterns and was something that I did not even
think of.
There have also been style changes pointed out by Oswald, which led me
to think a bit more and I came up with the changes where we replace the
use of if-else
with switch
when checking for signature
options.
This has the advantage of being more readable when compared to the
previous construct.
All of these changes have been sent out and can be seen on v3. As of the
“What’s cooking in git.git” email sent out by Junio yesterday, these
commits are on “seen”.
What’s cooking in my fork?
Apart from replying and amending the patch series according to the
reviews, I have been reading through ref-filter
and pretty
.
Hariom came up with the idea of experimenting with a bridge between
both the formats. Something like
if atom exists for pretty arg:
use ref-filter format
else
use pretty format
which is great for testing ref-filter formats. So I began tweaking some
code and making changes. Nothing has been pushed yet though. I have also
been reading through log and making sense of things. Parts of code has
changed since Hariom and others worked on the project (which is obvious)
and it has become even more simpler to write good and efficient code and
to build on top of their code. It becomes even more apparent, day after
day, the power that git log
and git blame
hold.
Apart from this, I’m thinking about working on other pretty
formats
which can be re-implemented in ref-filter
. Specifically those which
make the most sense in ref-filter
. This should be fun.
‘til next time,
Kousik