mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-28 07:35:40 +03:00
Ignore submodules for detect local changes
This commit is contained in:
parent
0b517e036f
commit
46624d95b8
@ -9,6 +9,7 @@ import org.eclipse.jgit.api.Status;
|
|||||||
import org.eclipse.jgit.lib.ObjectId
|
import org.eclipse.jgit.lib.ObjectId
|
||||||
import org.eclipse.jgit.lib.Repository
|
import org.eclipse.jgit.lib.Repository
|
||||||
import org.eclipse.jgit.lib.StoredConfig
|
import org.eclipse.jgit.lib.StoredConfig
|
||||||
|
import org.eclipse.jgit.submodule.SubmoduleWalk;
|
||||||
import org.eclipse.jgit.revwalk.RevCommit
|
import org.eclipse.jgit.revwalk.RevCommit
|
||||||
import org.eclipse.jgit.revwalk.RevWalk
|
import org.eclipse.jgit.revwalk.RevWalk
|
||||||
import org.eclipse.jgit.storage.file.FileRepositoryBuilder
|
import org.eclipse.jgit.storage.file.FileRepositoryBuilder
|
||||||
@ -58,10 +59,8 @@ class GitVersioner {
|
|||||||
// check uncommited changes
|
// check uncommited changes
|
||||||
static boolean getUncommittedChanges(Repository repo) {
|
static boolean getUncommittedChanges(Repository repo) {
|
||||||
Git git = new Git(repo);
|
Git git = new Git(repo);
|
||||||
Status status = git.status().call();
|
Status status = git.status().setIgnoreSubmodules(SubmoduleWalk.IgnoreSubmoduleMode.ALL).call();
|
||||||
|
if (!status.getUncommittedChanges().isEmpty()) {
|
||||||
Set<String> uncommittedChanges = status.getUncommittedChanges();
|
|
||||||
for(String uncommitted : uncommittedChanges) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user