Re: [PATCH 03/10] builtin/fsck: de-globalize option handling
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Aug 27, 2026, 10:05 UTC
- Message-ID
- <CAOLa=ZQoJotCEXWxbOz9sHs0+Xen=7NwW-3OcrNXFL461VEz1Q@mail.gmail.com>
- In-Reply-To
- <20260825-pks-odb-source-fsck-v1-3-b756de0bf24f@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 8 quoted lines
> In subsequent commits we're about to rework some of the option handling > in git-fsck(1) a bit. It is currently a bit of a mess though due to lots > of global state that makes it hard to see which flags are used where > exactly. > > Refactor the code by moving the fsck options into `cmd_fsck()`. This > allows us to convert some of the options into function-local variables. >
Nice. I was wondering how much work this would involve, but it seems like these variables are only used in `cmd_fsck()` anyway, so they didn't even have to be global. Good spotting.
[snip]