summaryrefslogtreecommitdiff
path: root/sequencer.h
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2017-11-17 11:34:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-11-18 03:38:10 (GMT)
commit0505d604c9c5a361ee027d155c7d1facaf326863 (patch)
treedd9f1ef8b862f5c98e868a0b2864c0aab445212b /sequencer.h
parentd0aaa46fd3e53801346a4cadebf398f05d79780b (diff)
downloadgit-0505d604c9c5a361ee027d155c7d1facaf326863.zip
git-0505d604c9c5a361ee027d155c7d1facaf326863.tar.gz
git-0505d604c9c5a361ee027d155c7d1facaf326863.tar.bz2
Add a function to update HEAD after creating a commit
Add update_head_with_reflog() based on the code that updates HEAD after committing in builtin/commit.c that can be called by 'git commit' and other commands. 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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sequencer.h b/sequencer.h
index 82e5771..81a2098 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -69,4 +69,8 @@ int message_is_empty(const struct strbuf *sb,
enum commit_msg_cleanup_mode cleanup_mode);
int template_untouched(const struct strbuf *sb, const char *template_file,
enum commit_msg_cleanup_mode cleanup_mode);
+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);
#endif