diff options
author | Kevin Sawicki <kevin@github.com> | 2012-03-21 10:50:16 -0700 |
---|---|---|
committer | Chris Aniszczyk <zx@twitter.com> | 2012-03-21 14:16:14 -0700 |
commit | b37b7e69cd3857b1c4463008a034b78870007497 (patch) | |
tree | fa901526a945d6f5c78992feccb5f427d5b0550d /org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java | |
parent | bbfa4c9b2c1df1471b48bed5a130d1d97aecb82e (diff) | |
download | jgit-b37b7e69cd3857b1c4463008a034b78870007497.tar.gz jgit-b37b7e69cd3857b1c4463008a034b78870007497.zip |
Add command support for dropping a stashed commit
This extracts the logic for writing to the reflog from
RefDirectory into a new ReflogWriter class. This class
creates a public API for writing reflog entries similar
to ReflogReader for reading reflog entries.
The new command supports rewriting the stash's log to remove
a configured entry followed by updating the stash ref to
the value at the bottom of the newly written log.
Change-Id: Icfcbc70e838666769a742a94196eb8dc9c7efcc7
Signed-off-by: Chris Aniszczyk <zx@twitter.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java index 6c44d955f2..f52358633f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java @@ -591,6 +591,15 @@ public class Git { } /** + * Returns a command object used to drop a stashed commit + * + * @return a {@link StashDropCommand} + */ + public StashDropCommand stashDrop() { + return new StashDropCommand(repo); + } + + /** * Returns a command object to execute a {@code apply} command * * @see <a |