diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2017-11-17 11:34:47 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-18 12:38:10 +0900 |
commit | 0505d604c9c5a361ee027d155c7d1facaf326863 (patch) | |
tree | dd9f1ef8b862f5c98e868a0b2864c0aab445212b /sequencer.h | |
parent | d0aaa46fd3e53801346a4cadebf398f05d79780b (diff) | |
download | git-0505d604c9c5a361ee027d155c7d1facaf326863.tar.gz |
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.h | 4 |
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 |