From: Lucas Seiki Oshiro Date: Mon, 01 Sep 2025 13:50:03 GMT Subject: Re: [GSoC PATCH v2 1/2] repo: add the flag -z as an alias for --format=nul Message-ID: In-Reply-To: > Putting the devil's advocate hat on, "--format=" was an > attempt to avoid needless proliferation of options (e.g. presense of > "-z" would tempt people into add "--json" when they introduce > "--format=json"), so it may not be unconditionally a good idea to > mimic these older commands where there are only two output formats. Yeah, I understand... > You'd probably need to define a parseopt callback function for > "format" and "-z", and remember the one that you saw the last. So > giving "-z --format=nul --format=text" would first set an internal > "format" to FORMAT_NUL_TERMINATED (due to "-z"), and then to the > same FORMAT_NUL_TERMINATED again (due to "--format=nul"), and then > finally to FORMAT_TEXT (due to "--format=text"), or something like > that, which would give the familiar "the last one wins" semantics. Ok, accepted! I'll also replace the tests and the documentation in order to match this behavior. Thanks!