diff options
author | Elijah Newren <newren@gmail.com> | 2018-12-11 08:11:37 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-12-28 12:49:48 -0800 |
commit | 7b76ac664cbe68c64bf79bd37e8b5d5fe690ba29 (patch) | |
tree | d21143a89d5ec96712f29861d71d7a5d5d166bc3 /url.h | |
parent | git-rebase, sequencer: extend --quiet option for the interactive machinery (diff) | |
download | tgif-7b76ac664cbe68c64bf79bd37e8b5d5fe690ba29.tar.xz |
git-legacy-rebase: simplify unnecessary triply-nested if
The git-legacy-rebase.sh script previously had code of the form:
if git_am_opt:
if interactive:
if incompatible_opts:
show_error_about_interactive_and_am_incompatibilities
if rebase-merge:
if incompatible_opts
show_error_about_merge_and_am_incompatibilities
which was a triply nested if. However, the first conditional
(git_am_opt) and third (incompatible_opts) were somewhat redundant: the
latter condition was a strict subset of the former. Simplify this by
moving the innermost conditional to the outside, allowing us to remove
the test on git_am_opt entirely and giving us the following form:
if incompatible_opts:
if interactive:
show_error_about_interactive_and_am_incompatibilities
if rebase-merge:
show_error_about_merge_and_am_incompatibilities
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'url.h')
0 files changed, 0 insertions, 0 deletions