]> git.notmuchmail.org Git - notmuch/commit
add_message: Use sha-1 in place of overly long message ID.
authorCarl Worth <cworth@cworth.org>
Sun, 22 Nov 2009 03:03:49 +0000 (04:03 +0100)
committerCarl Worth <cworth@cworth.org>
Sun, 22 Nov 2009 03:03:49 +0000 (04:03 +0100)
commit5d56e931b99d575dbb0b936d24aae5e9903861ad
tree037cf7d61cb0a7dffef719fea88eabf44b11da98
parentf336ee034be3c9518883dfb34db27529f4a4b83b
add_message: Use sha-1 in place of overly long message ID.

Since Xapian has a limit on the maximum length of a term, we have
to check for that before trying to add the message ID as a term.

This fixes the bug reported by Mike Hommey here:

<20091120132625.GA19246@glandium.org>

I've also constructed 20 files with a range of message ID lengths
centered around the Xapian term-length limit which I'll use to seed a
new test suite soon.
lib/database.cc