[v2 0/3] Avoid empty thread names if possible

Subject: [v2 0/3] Avoid empty thread names if possible

Date: Wed, 29 Oct 2014 16:51:42 -0400

To: notmuch@notmuchmail.org

Cc:

From: Jesse Rosenthal


This is the second go at avoiding empty thread names. The differences
from the first version are:

  * Compare empty strings by checking for '\0' in first character
    (using a macro) as suggested by Tomi Ollila.

  * Make sure that threads are titled correctly regardless of sorting
    order. In this version we only add change the subject in
    _thread_set_subject_from_message if the subject (after cleaning
    "Re:") is non-empty. This is necessary for
    oldest-first. newest-first works the same as before.

  * Add tests. This means that we have to force the test suite to
    accept a non-empty header. I called the dummy subject
    `@FORCE_EMPTY` to differentiate from a normal string, but not
    invoke any special shell-ness. 

Jesse Rosenthal (3):
  thread.cc: Avoid empty thread names if possible.
  test-lib: Add dummy subject to force empty subject
  thread-naming test: Test empty subject names.

 lib/thread.cc              | 16 +++++++++++-----
 test/T200-thread-naming.sh | 32 ++++++++++++++++++++++++++++++++
 test/test-lib.sh           |  2 ++
 3 files changed, 45 insertions(+), 5 deletions(-)

-- 
2.1.2


Thread: