]> git.cworth.org Git - notmuch/blob - debian/patches/debian-changes
Commit Debian 3.0 (quilt) metadata
[notmuch] / debian / patches / debian-changes
1 This is an autogenerated patch header for a single-debian-patch file. The
2 delta against upstream is either kept as a single patch, or maintained
3 in some VCS, and exported as a single patch instead of more manageable
4 atomic patches.
5
6 --- notmuch-0.31.4.orig/lib/add-message.cc
7 +++ notmuch-0.31.4/lib/add-message.cc
8 @@ -407,14 +407,17 @@ static notmuch_status_t
9  _notmuch_database_link_message (notmuch_database_t *notmuch,
10                                 notmuch_message_t *message,
11                                 notmuch_message_file_t *message_file,
12 -                               bool is_ghost)
13 +                               bool is_ghost,
14 +                               bool is_new)
15  {
16      void *local = talloc_new (NULL);
17      notmuch_status_t status;
18      const char *thread_id = NULL;
19  
20      /* Check if the message already had a thread ID */
21 -    if (notmuch->features & NOTMUCH_FEATURE_GHOSTS) {
22 +    if (! is_new) {
23 +       thread_id = notmuch_message_get_thread_id (message);
24 +    } else if (notmuch->features & NOTMUCH_FEATURE_GHOSTS) {
25         if (is_ghost)
26             thread_id = notmuch_message_get_thread_id (message);
27      } else {
28 @@ -539,7 +542,7 @@ notmuch_database_index_file (notmuch_dat
29         }
30  
31         ret = _notmuch_database_link_message (notmuch, message,
32 -                                             message_file, is_ghost);
33 +                                             message_file, is_ghost, is_new);
34         if (ret)
35             goto DONE;
36  
37 --- notmuch-0.31.4.orig/test/T357-index-decryption.sh
38 +++ notmuch-0.31.4/test/T357-index-decryption.sh
39 @@ -112,12 +112,10 @@ test_expect_equal \
40      "$expected"
41  
42  # try inserting it with decryption, should appear as a single copy
43 -# (note: i think thread id skips 4 because of duplicate message-id
44 -# insertion, above)
45  test_begin_subtest "message cleartext is present with insert --decrypt=true"
46  notmuch insert --folder=sent --decrypt=true <<<"$contents"
47 -output=$(notmuch search wumpus)
48 -expected='thread:0000000000000005   2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (encrypted inbox unread)'
49 +output=$(notmuch search wumpus | notmuch_search_sanitize)
50 +expected='thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (encrypted inbox unread)'
51  test_expect_equal \
52      "$output" \
53      "$expected"
54 @@ -127,9 +125,9 @@ test_expect_equal \
55  test_begin_subtest 'tagging all messages'
56  test_expect_success 'notmuch tag +blarney "encrypted message"'
57  test_begin_subtest "verify that tags have not changed"
58 -output=$(notmuch search tag:blarney)
59 -expected='thread:0000000000000001   2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 001 (blarney encrypted inbox)
60 -thread:0000000000000005   2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (blarney encrypted inbox unread)'
61 +output=$(notmuch search tag:blarney | notmuch_search_sanitize)
62 +expected='thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 001 (blarney encrypted inbox)
63 +thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (blarney encrypted inbox unread)'
64  test_expect_equal \
65      "$output" \
66      "$expected"
67 @@ -138,14 +136,14 @@ test_expect_equal \
68  test_begin_subtest 'reindex old messages'
69  test_expect_success 'notmuch reindex --decrypt=true tag:encrypted and not property:index.decryption=success'
70  test_begin_subtest "reindexed encrypted message, including cleartext"
71 -output=$(notmuch search wumpus)
72 +output=$(notmuch search wumpus | notmuch_search_sanitize)
73  test_expect_equal \
74      "$output" \
75      "$expected"
76  
77  # and the same search, but by property ($expected is untouched):
78  test_begin_subtest "emacs search by property for both messages"
79 -output=$(notmuch search property:index.decryption=success)
80 +output=$(notmuch search property:index.decryption=success | notmuch_search_sanitize)
81  test_expect_equal \
82      "$output" \
83      "$expected"
84 @@ -154,7 +152,7 @@ test_expect_equal \
85  test_begin_subtest 'reindex in auto mode'
86  test_expect_success 'notmuch reindex tag:encrypted and property:index.decryption=success'
87  test_begin_subtest "reindexed encrypted messages, should not have changed"
88 -output=$(notmuch search wumpus)
89 +output=$(notmuch search wumpus | notmuch_search_sanitize)
90  test_expect_equal \
91      "$output" \
92      "$expected"
93 @@ -188,9 +186,9 @@ test_expect_equal \
94  
95  # ensure that the tags remain even when we are dropping the cleartext.
96  test_begin_subtest "verify that tags remain without cleartext"
97 -output=$(notmuch search tag:blarney)
98 -expected='thread:0000000000000001   2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 001 (blarney encrypted inbox)
99 -thread:0000000000000005   2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (blarney encrypted inbox unread)'
100 +output=$(notmuch search tag:blarney | notmuch_search_sanitize)
101 +expected='thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 001 (blarney encrypted inbox)
102 +thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (blarney encrypted inbox unread)'
103  test_expect_equal \
104      "$output" \
105      "$expected"
106 @@ -199,7 +197,7 @@ test_begin_subtest "index cleartext with
107  test_expect_success "notmuch reindex --decrypt=nostash tag:blarney"
108  
109  test_begin_subtest "Ensure that the indexed terms are present"
110 -output=$(notmuch search wumpus)
111 +output=$(notmuch search wumpus | notmuch_search_sanitize)
112  test_expect_equal \
113      "$output" \
114      "$expected"
115 --- notmuch-0.31.4.orig/test/T670-duplicate-mid.sh
116 +++ notmuch-0.31.4/test/T670-duplicate-mid.sh
117 @@ -6,6 +6,19 @@ add_message '[id]="duplicate"' '[subject
118  add_message '[id]="duplicate"' '[subject]="message 2" [filename]=copy2'
119  
120  add_message '[id]="duplicate"' '[subject]="message 0" [filename]=copy0'
121 +
122 +test_begin_subtest 'at most 1 thread-id per xapian document'
123 +db=${MAIL_DIR}/.notmuch/xapian
124 +for doc in $(xapian-delve -1 -t '' "$db" | grep '^[1-9]'); do
125 +    xapian-delve -1 -r "$doc" "$db" | grep -c '^G'
126 +done > OUTPUT.raw
127 +sort -u < OUTPUT.raw > OUTPUT
128 +cat <<EOF > EXPECTED
129 +0
130 +1
131 +EOF
132 +test_expect_equal_file EXPECTED OUTPUT
133 +
134  test_begin_subtest 'search: first indexed subject preserved'
135  cat <<EOF > EXPECTED
136  thread:XXX   2001-01-05 [1/1(3)] Notmuch Test Suite; message 1 (inbox unread)