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:47 +0300
committerJunio C Hamano <gitster@pobox.com>2017-11-18 06:38:10 +0300
commit0505d604c9c5a361ee027d155c7d1facaf326863 (patch)
treedd9f1ef8b862f5c98e868a0b2864c0aab445212b /sequencer.h
parentd0aaa46fd3e53801346a4cadebf398f05d79780b (diff)
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 82e57713a2..81a2098e90 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