Functions to apply one patch and commit the last changes with a new commit message
Function to build the input for the hash of the next commit