Example usage for org.eclipse.jgit.lib Constants LOGS

List of usage examples for org.eclipse.jgit.lib Constants LOGS

Introduction

In this page you can find the example usage for org.eclipse.jgit.lib Constants LOGS.

Prototype

String LOGS

To view the source code for org.eclipse.jgit.lib Constants LOGS.

Click Source Link

Document

Logs folder name

Usage

From source file:it.com.atlassian.labs.speakeasy.util.jgit.WalkRemoteObjectDatabase.java

License:Eclipse Distribution License

/**
 * Delete a reflog from the remote repository.
 *
 * @param name//from  w w w .  j  a v  a 2 s  .  c  o m
 *            name of the ref within the ref space, for example
 *            <code>refs/heads/pu</code>.
 * @throws IOException
 *             deletion is not supported, or deletion failed.
 */
void deleteRefLog(final String name) throws IOException {
    deleteFile(ROOT_DIR + Constants.LOGS + "/" + name);
}

From source file:org.eclipse.egit.ui.internal.actions.SwitchToMenuTest.java

License:Open Source License

@Test
public void selectionWithProj1AndReflog() throws Exception {
    File gitDir = createProjectAndCommitToRepository();

    // create additional reflog entries
    Git git = new Git(lookupRepository(gitDir));
    git.checkout().setName("stable").call();
    git.checkout().setName("master").call();

    selectionWithProj1Common();/*from   ww  w.j a v  a2s.com*/

    // delete reflog again to not confuse other tests
    new File(gitDir, Constants.LOGS + "/" + Constants.HEAD).delete();
}