summaryrefslogtreecommitdiff
path: root/include/git2/rebase.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2014-07-14 15:19:19 -0400
committerEdward Thomson <ethomson@microsoft.com>2014-10-26 22:59:12 -0400
commit4fe84d624b42a1ef1b9b392483ddc43064b1180e (patch)
tree8fb3c5cbe317df03e17f45e46bfcc58810bcfc81 /include/git2/rebase.h
parentdaf395b795a6a56ff745b3cfe70a82a5290dabea (diff)
downloadlibgit2-4fe84d624b42a1ef1b9b392483ddc43064b1180e.tar.gz
Introduce git_rebase_abort
Abort an in-progress rebase and move the working directory and repository back to the ORIG_HEAD state.
Diffstat (limited to 'include/git2/rebase.h')
-rw-r--r--include/git2/rebase.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/git2/rebase.h b/include/git2/rebase.h
index 6eb279412..c760fbe74 100644
--- a/include/git2/rebase.h
+++ b/include/git2/rebase.h
@@ -68,6 +68,19 @@ GIT_EXTERN(int) git_rebase(
const git_signature *signature,
const git_rebase_options *opts);
+/**
+ * Aborts a rebase that is currently in progress, resetting the repository
+ * and working directory to their state before rebase began.
+ *
+ * @param repo The repository with the in-progress rebase
+ * @param signature The identity that is aborting the rebase
+ * @return Zero on success; GIT_ENOTFOUND if a rebase is not in progress,
+ * -1 on other errors.
+ */
+GIT_EXTERN(int) git_rebase_abort(
+ git_repository *repo,
+ const git_signature *signature);
+
/** @} */
GIT_END_DECL
#endif