I need some guidance on how use jgit to implement the following methods:
/**
* Rolls back all uncommitted changes so Index and worspace are
rolled to committed state in HEAD version.
* Functionally equivalent to "git reset --hard HEAD"
*
*/
public void rollback() {
}
/**
* Undoes the last commit.
* Functionally equivalent to "git revert HEAD"
*
* @param versionNameToRevertTo Version of Commit to revert to
*/
public void revert(String versionNameToRevertTo) {
}
It seems that I will have to walk the Tree and check status of each file
to decide what to do with it. The TreeWalk api is not obvious from the
javadoc.
TIA for any guidance you can provide.
--
Regards,
Farrukh Najmi
Web: http://www.wellfleetsoftware.com
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html