|
ticket id 000006 |
status open |
priority ??? |
assigned to NOBODY |
Reported by: Component: |
This is using versium-git. When I create a new ticket, or a node within a collection, I get a stacktrace like this:
Sputnik ran but failed due to an unexpected error.
Error details:
/usr/share/lua/5.1/sputnik/init.lua:625: assertion failed!
stack traceback:
[C]: in function 'assert'
/usr/share/lua/5.1/sputnik/init.lua:625: in function 'get_uid'
/usr/local/share/lua/5.1/sputnik/actions/tickets.lua:84: in function </usr/local/share/lua/5.1/sputnik/actions/tickets.lua:82>
(tail call): ?
/usr/share/lua/5.1/sputnik/init.lua:786: in function </usr/share/lua/5.1/sputnik/init.lua:727>
It turns out that git adds some extra linefeeds to a commit message, so getuid always fails when comparing the hash value. One fix to this is to cause getuid to strip whitespace from the commit message before comparing with the stored hash. i.e.:
function Sputnik:get_uid(namespace, type)
...
-- Find our specific hash in the history
for i=1,#history do
local comment = string.gsub(history[i].comment, '%s', '') -- strip whitespace
if comment == hash then
...