From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Olga Telezhnaya <olyatelezhnaya@gmail.com>,
Christian Couder <christian.couder@gmail.com>,
Elijah Newren <newren@gmail.com>,
Thomas Gummerer <t.gummerer@gmail.com>,
Matheus Tavares Bernardino <matheus.bernardino@usp.br>
Subject: Re: Git in Outreachy December 2019?
Date: Thu, 26 Sep 2019 11:47:23 +0200 [thread overview]
Message-ID: <20190926094723.GE2637@szeder.dev> (raw)
In-Reply-To: <20190923180649.GA2886@szeder.dev>
On Mon, Sep 23, 2019 at 08:07:09PM +0200, SZEDER Gábor wrote:
> Here is one more idea for microprojects:
>
> Find a group of related preprocessor constants and turn them into an
> enum. Also find where those constants are stored in variables and
> in structs and passed around as function parameters, and change the
> type of those variables, fields and parameters to the new enum.
Peff thought elsewhere in the thread that this is a good idea, so I
wanted to try out how this microproject would work in practice, and to
add a commit that we can show as a good example, and therefore set out
to convert 'cache_entry->ce_flags' to an enum... and will soon send
out a RFH patch, because I hit a snag, and am not sure what to do
about it :) Anyway:
- Finding a group of related preprocessor constants is trivial: the
common prefixes and vertically aligned values of related constants
stand out in output of 'git grep #define'. Converting them to an
enum is fairly trivial as well.
- Converting various integer types of variables, struct fields, and
function parameters to the new enum is... well, I wouldn't say
that it's hard, but it's tedious (but 'ce_flags' with about 20
related constants is perhaps the biggest we have). OTOH, it's all
fairly mechanical, and doesn't require any understanding of Git
internals. Overall I think that this is indeed a micro-sized
microproject, but...
- The bad news is that I expect that reviewing the variable, etc.
type conversions will be just as tedious, and it's quite easy to
miss a conversion or three, so I'm afraid that several rerolls
will be necessary.
next prev parent reply other threads:[~2019-09-26 9:47 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 5:17 Git in Outreachy December 2019? Jeff King
2019-08-31 7:58 ` Christian Couder
2019-08-31 19:44 ` Olga Telezhnaya
2019-09-04 19:41 ` Jeff King
2019-09-05 7:24 ` Christian Couder
2019-09-05 19:39 ` Emily Shaffer
2019-09-06 11:55 ` Carlo Arenas
2019-09-07 6:39 ` Jeff King
2019-09-07 10:13 ` Carlo Arenas
2019-09-07 6:36 ` Jeff King
2019-09-08 14:56 ` Pratyush Yadav
2019-09-09 17:00 ` Jeff King
2019-09-23 18:07 ` SZEDER Gábor
2019-09-26 9:47 ` SZEDER Gábor [this message]
2019-09-26 19:32 ` Johannes Schindelin
2019-09-26 21:54 ` SZEDER Gábor
2019-09-26 11:42 ` Johannes Schindelin
2019-09-13 20:03 ` Jonathan Tan
2019-09-13 20:51 ` Jeff King
2019-09-16 18:42 ` Emily Shaffer
2019-09-16 21:33 ` Eric Wong
2019-09-16 21:44 ` SZEDER Gábor
2019-09-16 23:13 ` Jonathan Nieder
2019-09-17 0:59 ` Jeff King
2019-09-17 11:23 ` Johannes Schindelin
2019-09-17 12:02 ` SZEDER Gábor
2019-09-23 12:47 ` Johannes Schindelin
2019-09-23 16:58 ` SZEDER Gábor
2019-09-26 11:04 ` Johannes Schindelin
2019-09-26 13:28 ` SZEDER Gábor
2019-09-26 19:39 ` Johannes Schindelin
2019-09-26 21:44 ` SZEDER Gábor
2019-09-27 22:18 ` Jeff King
2019-10-09 17:25 ` SZEDER Gábor
2019-10-11 6:34 ` Jeff King
2019-09-23 18:19 ` Jeff King
2019-09-24 14:30 ` Johannes Schindelin
2019-09-17 15:10 ` Christian Couder
2019-09-23 12:50 ` Johannes Schindelin
2019-09-23 19:30 ` Jeff King
2019-09-23 18:07 ` Jeff King
2019-09-24 14:25 ` Johannes Schindelin
2019-09-24 15:33 ` Jeff King
2019-09-28 3:56 ` Junio C Hamano
2019-09-24 0:55 ` Eric Wong
2019-09-26 12:45 ` Johannes Schindelin
2019-09-30 8:55 ` Eric Wong
2019-09-28 4:01 ` Junio C Hamano
2019-09-20 17:04 ` Jonathan Tan
2019-09-21 1:47 ` Emily Shaffer
2019-09-23 14:23 ` Christian Couder
2019-09-23 19:40 ` Jeff King
2019-09-23 22:29 ` Philip Oakley
2019-10-22 21:16 ` Emily Shaffer
2019-09-23 11:49 ` Christian Couder
2019-09-23 17:58 ` Jonathan Tan
2019-09-23 19:27 ` Jeff King
2019-09-23 20:48 ` Jonathan Tan
2019-09-23 19:15 ` Jeff King
2019-09-23 20:38 ` Jonathan Tan
2019-09-23 21:28 ` Jeff King
2019-09-24 17:07 ` Jonathan Tan
2019-09-26 7:09 ` Jeff King
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=20190926094723.GE2637@szeder.dev \
--to=szeder.dev@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=matheus.bernardino@usp.br \
--cc=newren@gmail.com \
--cc=olyatelezhnaya@gmail.com \
--cc=peff@peff.net \
--cc=t.gummerer@gmail.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.