diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-03-25 14:22:38 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-25 14:22:38 -0700 |
| commit | ff071a3af442c691b5a46e200a4c023fc25ae4e3 (patch) | |
| tree | a4a0a6093a0cbadd5d99c1706b121993a1deb0e7 /sequencer.h | |
| parent | ce74208c2fa13943fffa58f168ac27a76d0eb789 (diff) | |
| parent | 2760ee49834953c0860fa5d7983a6af4d27cb6a9 (diff) | |
| download | git-ff071a3af442c691b5a46e200a4c023fc25ae4e3.tar.xz | |
Merge branch 'sa/replay-revert' into tc/replay-ref
* 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 */ |
