mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 04:18:08 +01:00
cli/show: consistently use format_sel for checking the format
The mixed use of the format pointer and the format selection variables is confusing. Add more clarity by using format_sel alone. No functional changes.
This commit is contained in:
parent
33944a559a
commit
1232584040
1 changed files with 4 additions and 2 deletions
|
@ -1122,7 +1122,8 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[])
|
||||||
/* Default is entire-thread = FALSE except for format=json and
|
/* Default is entire-thread = FALSE except for format=json and
|
||||||
* format=sexp. */
|
* format=sexp. */
|
||||||
if (entire_thread == ENTIRE_THREAD_DEFAULT) {
|
if (entire_thread == ENTIRE_THREAD_DEFAULT) {
|
||||||
if (format == &format_json || format == &format_sexp)
|
if (format_sel == NOTMUCH_FORMAT_JSON ||
|
||||||
|
format_sel == NOTMUCH_FORMAT_SEXP)
|
||||||
entire_thread = ENTIRE_THREAD_TRUE;
|
entire_thread = ENTIRE_THREAD_TRUE;
|
||||||
else
|
else
|
||||||
entire_thread = ENTIRE_THREAD_FALSE;
|
entire_thread = ENTIRE_THREAD_FALSE;
|
||||||
|
@ -1133,7 +1134,8 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[])
|
||||||
fprintf (stderr, "Warning: --body=false is incompatible with --part > 0. Disabling.\n");
|
fprintf (stderr, "Warning: --body=false is incompatible with --part > 0. Disabling.\n");
|
||||||
params.output_body = TRUE;
|
params.output_body = TRUE;
|
||||||
} else {
|
} else {
|
||||||
if (format != &format_json && format != &format_sexp)
|
if (format_sel != NOTMUCH_FORMAT_JSON &&
|
||||||
|
format_sel != NOTMUCH_FORMAT_SEXP)
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"Warning: --body=false only implemented for format=json and format=sexp\n");
|
"Warning: --body=false only implemented for format=json and format=sexp\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue