Repository navigation
pr-git-2470/CodeWithHusain/outreachy-microproject-v2
tagged this
03 Nov 08:33
From: Hussain Sitamouwala <husainsitamuwala21@gmail.com> The command parses its options by hand, comparing each argument against string literals. Use the parse-options API instead so that option handling is consistent with other builtins and the help output is generated from the option table. Keep the existing behavior: --print stays a hidden, deprecated synonym for --normalize, only --allow-onelevel can be negated, and parsing stops at the first non-option argument so that options after <refname> are still rejected. Drop the early show_usage_if_asked() call, so that -h is handled by parse_options(). Two minor differences come with parse_options(): unambiguous abbreviations of long options, such as --norm, are accepted, and "--" may now precede <refname>. Signed-off-by: Hussain Sitamouwala <husainsitamuwala21@gmail.com> Submitted-As: https://lore.kernel.org/git/pull.2470.v2.git.git.1793694813386.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.2470.git.git.1793298807397.gitgitgadget@gmail.com