# # patch "ChangeLog" # from [57d565f3778c1c511828115215cbd8fd7e2555d7] # to [cc172b1034bf45c6a5a48cf35d12ba257e3bd457] # # patch "diff_patch.cc" # from [e798174667fdbb10359025f4b050b0b1c017705c] # to [c080a1bd6428d24243c0fc224414be6eb0fb7949] # --- ChangeLog +++ ChangeLog @@ -1,3 +1,8 @@ +2005-04-15 Olivier Andrieu + + * diff_patch.cc(guess_binary): do not use '\x00' as first + character of a C string ... + 2005-04-15 Matt Johnston * change_set.cc (confirm_proper_tree): use bitsets rather than maps @@ -2750,7 +2755,7 @@ * AUTHORS: Mention Wojciech and Neil. * revision.cc (calculate_ancestors_from_graph): Make non-recursive. -2005-01-17 Wojciech Miłkowski +2005-01-17 Wojciech Miłkowski * std_hooks.lua: Teach about meld. --- diff_patch.cc +++ diff_patch.cc @@ -25,7 +25,8 @@ { // these do not occur in ASCII text files // FIXME: this heuristic is (a) crap and (b) hardcoded. fix both these. - if (s.find_first_of("\x00\x01\x02\x03\x04\x05\x06\x0e\x0f" + if (s.find_first_of('\x00') != string::npos || + s.find_first_of("\x01\x02\x03\x04\x05\x06\x0e\x0f" "\x10\x11\x12\x13\x14\x15\x16\x17\x18" "\x19\x1a\x1c\x1d\x1e\x1f") != string::npos) return true;