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

The following examples show how to use org.eclipse.jgit.api.errors.NoFilepatternException. These examples are extracted from open source projects. 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 Project: repairnator   Source File: SequencerCollector.java    License: 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
@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 Project: juneau   Source File: GitControl.java    License: 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 Project: juneau   Source File: GitControl.java    License: 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
private void dirtyRepo() throws IOException, NoFilepatternException,
        GitAPIException {
    new File(repo.getDirectory().getParent(), "hello.txt").createNewFile();
    git.add().addFilepattern("hello.txt").call();
}