org.eclipse.jgit.api.errors.NoFilepatternException Java Examples

The following examples show how to use org.eclipse.jgit.api.errors.NoFilepatternException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SequencerCollector.java    From repairnator with MIT License 5 votes vote down vote up
protected void commitAndPushDiffs() throws NoFilepatternException, GitAPIException {
    diffsRepo.add().addFilepattern(".").call();
    diffsRepo.commit().setMessage("diff files").call();
    
    String OAUTH_TOKEN = System.getenv("OAUTH_TOKEN");
    
    RefSpec spec = new RefSpec("master:master");
    diffsRepo.push()
        .setRemote("origin")
        .setRefSpecs(spec)
        .setCredentialsProvider(new UsernamePasswordCredentialsProvider(OAUTH_TOKEN, ""))
        .call();
}
 
Example #2
Source File: TagBasedVersionFactoryTest.java    From gradle-gitsemver with Apache License 2.0 5 votes vote down vote up
@Test
public void testStableIsDirty() throws NoFilepatternException, IOException,
        GitAPIException {
    tag("0.1.0");
    dirtyRepo();
    Assert.assertEquals(
            "0.1.0+dirty",
            versionFactory.createVersion(repo, null).toString());
}
 
Example #3
Source File: GitControl.java    From juneau with Apache License 2.0 4 votes vote down vote up
public void cloneRepo() throws IOException, NoFilepatternException, GitAPIException {
	Git.cloneRepository().setURI(remotePath).setDirectory(new File(localPath)).call();
}
 
Example #4
Source File: GitControl.java    From juneau with Apache License 2.0 4 votes vote down vote up
public void addToRepo() throws IOException, NoFilepatternException, GitAPIException {
	AddCommand add = git.add();
	add.addFilepattern(".").call();
}
 
Example #5
Source File: TagBasedVersionFactoryTest.java    From gradle-gitsemver with Apache License 2.0 4 votes vote down vote up
private void dirtyRepo() throws IOException, NoFilepatternException,
        GitAPIException {
    new File(repo.getDirectory().getParent(), "hello.txt").createNewFile();
    git.add().addFilepattern("hello.txt").call();
}