update commit json init to be able to parse a branch commit