revision: small readability improvement for reading from stdin
commitaf37a209ad76ce760becc0d2c2fac63c2022e730
authorPatrick Steinhardt <ps@pks.im>
Thu, 15 Jun 2023 14:39:55 +0000 (15 16:39 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Jun 2023 19:09:31 +0000 (15 12:09 -0700)
treebba76db2a5b62069c14b68c7e0874b6ea94518bd
parentcc8045018d0ba6c9b94d3f0010f27c342d0d4111
revision: small readability improvement for reading from stdin

The code that reads lines from standard input manually compares whether
the read line matches "--", which is a bit awkward to read. Furthermore,
we're about to extend the code to also support reading pseudo-options
via standard input, requiring more elaborate handling of lines with a
leading dash.

Refactor the code by hoisting out the check for "--" outside of the
block that checks for a leading dash.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c