public void set ( final String name , final String email , final Map < String , Map < String , ConfigPropertyValue > > data , final ConfigChangeMode changeMode , final String message ) { try { RepoHelper . write ( repo , name , email , data , changeMode , message ) ; } catch ( Exception e ) { try { RepoHelper . reset ( repo ) ; } catch ( Exception ee ) { throw new RuntimeException ( "Error writing updated repository, then could not reset work tree" , e ) ; } throw new RuntimeException ( "Error writing updated repository, work tree reset" , e ) ; } // Push the changes to the remote if ( hasRemote ) { try { RepoHelper . push ( repo , "origin" , credentials ) ; } catch ( Throwable t ) { throw new RuntimeException ( "Saved changes to the local repository but push to remote failed!" , t ) ; } } }
Create a new commit reflecting the provided properties