encode commit