Jgit add "-A" like git [message #1719190] |
Wed, 06 January 2016 04:17 |
Anurag Jain Messages: 1 Registered: January 2016 |
Junior Member |
|
|
Does Jgit have a "-A" option like git?
We are currently executing:
AddCommand addCmd = git().add();
addCmd.addFilepattern(".");
DirCache retVal = addCmd.call();
CommitCommand commitCmd = git().commit();
final boolean includeDeleted = true;
commitCmd.setAll(includeDeleted);
commitCmd.setMessage(message);
final RevCommit commitResult = commitCmd.call();
String retVal = commitResult.getId().name();
In above, AddCommand is executed twice, first (by us) to account for new files or changed files and second by commit to include deleted files.
AddCommand loops over the Git repo. Based on above, we are looping twice over the repo. That is proving to be costly for us. Can we do any better w.r.t. AddCommand such that it stages new, modified, deleted files in the repo in one loop?
Any other suggestions to improve performance are invited.
Thanks!
[Updated on: Thu, 07 January 2016 05:33] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02768 seconds