The unified diff between revisions [a93b1376..] and [9b19e788..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'lua.cc'
#
#
# patch "lua.cc"
# from [78722201fdc513bfee248ce6b30b1b1ae593250e]
# to [8284c5010bee38f15141c3e60eeeeb7c288ee20c]
#
============================================================
--- lua.cc 78722201fdc513bfee248ce6b30b1b1ae593250e
+++ lua.cc 8284c5010bee38f15141c3e60eeeeb7c288ee20c
@@ -1,4 +1,5 @@
// -*- mode: C++; c-file-style: "gnu"; indent-tabs-mode: nil -*-
+// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:
// copyright (C) 2002, 2003 graydon hoare <graydon@pobox.com>
// all rights reserved.
// licensed to the public under the terms of the GNU GPL (>= 2)
@@ -1382,6 +1383,25 @@ lua_hooks::hook_get_linesep_conv(file_pa
return ll.ok();
}
+bool
+lua_hooks::hook_validate_commit_message(std::string const & message,
+ std::string const & new_manifest_text,
+ bool & validated,
+ std::string & reason)
+{
+ validated = true;
+ return Lua(st)
+ .func("validate_commit_message")
+ .push_str(message)
+ .push_str(new_manifest_text)
+ .call(2, 2)
+ .extract_str(reason)
+ // XXX When validated, the extra returned string is superfluous.
+ .pop()
+ .extract_bool(validated)
+ .ok();
+}
+
bool
lua_hooks::hook_note_commit(revision_id const & new_id,
revision_data const & rdat,