diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-04-03 13:01:09 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-04-03 13:01:09 -0700 |
| commit | e0613d24f9902a581b6a1cf0aa39b517db1e3f2f (patch) | |
| tree | 16ed0d60d123a86a07682df15c05037d894639f6 /sequencer.h | |
| parent | 05ddb9ee8a4c619fbb0e7309fe291bff5cd7c987 (diff) | |
| parent | 2760ee49834953c0860fa5d7983a6af4d27cb6a9 (diff) | |
| download | git-e0613d24f9902a581b6a1cf0aa39b517db1e3f2f.tar.xz | |
Merge branch 'sa/replay-revert'
"git replay" (experimental) learns, in addition to "pick" and
"replay", a new operating mode "revert".
* sa/replay-revert:
replay: add --revert mode to reverse commit changes
sequencer: extract revert message formatting into shared function
Diffstat (limited to 'sequencer.h')
| -rw-r--r-- | sequencer.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sequencer.h b/sequencer.h index bea20da085..a6fa670c7c 100644 --- a/sequencer.h +++ b/sequencer.h @@ -274,4 +274,17 @@ int sequencer_determine_whence(struct repository *r, enum commit_whence *whence) */ int sequencer_get_update_refs_state(const char *wt_dir, struct string_list *refs); +/* + * Format a revert commit message with appropriate 'Revert "<subject>"' or + * 'Reapply "<subject>"' prefix and 'This reverts commit <ref>.' body. + * When use_commit_reference is set, <ref> is an abbreviated hash with + * subject and date; otherwise the full hex hash is used. + */ +void sequencer_format_revert_message(struct repository *r, + const char *subject, + const struct commit *commit, + const struct commit *parent, + bool use_commit_reference, + struct strbuf *message); + #endif /* SEQUENCER_H */ |
