sequencer: plug memory leaks for the option values
[git] / sequencer.h
1 #ifndef SEQUENCER_H
2 #define SEQUENCER_H
3
4 const char *git_path_seq_dir(void);
5
6 #define APPEND_SIGNOFF_DEDUP (1u << 0)
7
8 enum replay_action {
9         REPLAY_REVERT,
10         REPLAY_PICK
11 };
12
13 enum replay_subcommand {
14         REPLAY_NONE,
15         REPLAY_REMOVE_STATE,
16         REPLAY_CONTINUE,
17         REPLAY_ROLLBACK
18 };
19
20 struct replay_opts {
21         enum replay_action action;
22         enum replay_subcommand subcommand;
23
24         /* Boolean options */
25         int edit;
26         int record_origin;
27         int no_commit;
28         int signoff;
29         int allow_ff;
30         int allow_rerere_auto;
31         int allow_empty;
32         int allow_empty_message;
33         int keep_redundant_commits;
34
35         int mainline;
36
37         char *gpg_sign;
38
39         /* Merge strategy */
40         char *strategy;
41         char **xopts;
42         size_t xopts_nr, xopts_alloc;
43
44         /* Only used by REPLAY_NONE */
45         struct rev_info *revs;
46 };
47 #define REPLAY_OPTS_INIT { -1, -1 }
48
49 int sequencer_pick_revisions(struct replay_opts *opts);
50
51 extern const char sign_off_header[];
52
53 void append_signoff(struct strbuf *msgbuf, int ignore_footer, unsigned flag);
54 void append_conflicts_hint(struct strbuf *msgbuf);
55
56 #endif