This change affects both text and json formats. Now, text format
behaves as before commit
6dcb7592, but json format is changed.
Earlier, the empty search returned '[]', now it returns ''. The emacs
interface seems not to be affected by this change.
+ if (first_thread)
+ fputs (format->results_start, stdout);
+ else
fputs (format->item_sep, stdout);
thread = notmuch_threads_get (threads);
fputs (format->item_sep, stdout);
thread = notmuch_threads_get (threads);
notmuch_thread_destroy (thread);
}
notmuch_thread_destroy (thread);
}
+ if (! first_thread)
+ fputs (format->results_end, stdout);
+
{
message = notmuch_messages_get (messages);
{
message = notmuch_messages_get (messages);
+ if (first_message)
+ fputs (format->results_start, stdout);
+ else
fputs (format->item_sep, stdout);
if (output == OUTPUT_FILES) {
fputs (format->item_sep, stdout);
if (output == OUTPUT_FILES) {
notmuch_messages_destroy (messages);
notmuch_messages_destroy (messages);
+ if (! first_message)
+ fputs (format->results_end, stdout);
+
notmuch_query_set_sort (query, sort);
notmuch_query_set_sort (query, sort);
- fputs (format->results_start, stdout);
-
switch (output) {
default:
case OUTPUT_SUMMARY:
switch (output) {
default:
case OUTPUT_SUMMARY:
- fputs (format->results_end, stdout);
-
notmuch_query_destroy (query);
notmuch_database_close (notmuch);
notmuch_query_destroy (query);
notmuch_database_close (notmuch);