Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2017-11-17 14:34:48 +0300
committerJunio C Hamano <gitster@pobox.com>2017-11-18 06:38:10 +0300
commita87a6f3c98ea80740fa31d2559b78f75f8138132 (patch)
tree7eb2ddf2897d262bb299c72dff5bc7b85cafd2ba /sequencer.h
parent0505d604c9c5a361ee027d155c7d1facaf326863 (diff)
commit: move post-rewrite code to libgit
Move run_rewrite_hook() from bulitin/commit.c to sequencer.c so it can be shared with other commands and add a new function commit_post_rewrite() based on the code in builtin/commit.c that encapsulates rewriting notes and running the post-rewrite hook. Once the sequencer learns how to create commits without forking 'git commit' these functions will be used when squashing commits. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.h')
-rw-r--r--sequencer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sequencer.h b/sequencer.h
index 81a2098e90..ec13b679c4 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -73,4 +73,6 @@ int update_head_with_reflog(const struct commit *old_head,
const struct object_id *new_head,
const char *action, const struct strbuf *msg,
struct strbuf *err);
+void commit_post_rewrite(const struct commit *current_head,
+ const struct object_id *new_head);
#endif