mirror of
https://github.com/git/git.git
synced 2026-03-16 19:50:09 +01:00
Parse the instruction sheet in '.git/sequencer/todo' as a list of (action, operand) pairs, instead of assuming that all instructions use the same action. Now you can do: pick fdc0b12 picked revert 965fed4 anotherpick For cherry-pick and revert, this means that a 'git cherry-pick --continue' can continue an ongoing revert operation and viceversa. This patch lays the foundation for extending the parser to support more actions so 'git rebase -i' can reuse this machinery in the future. While at it, also improve the error messages reported by the insn sheet parser. Helped-by: Jonathan Nieder <jrnider@gmail.com> Acked-by: Jonathan Nieder <jrnider@gmail.com> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
29 lines
728 B
C
29 lines
728 B
C
#ifndef SEQUENCER_H
|
|
#define SEQUENCER_H
|
|
|
|
#define SEQ_DIR "sequencer"
|
|
#define SEQ_OLD_DIR "sequencer-old"
|
|
#define SEQ_HEAD_FILE "sequencer/head"
|
|
#define SEQ_TODO_FILE "sequencer/todo"
|
|
#define SEQ_OPTS_FILE "sequencer/opts"
|
|
|
|
enum replay_action { REPLAY_REVERT, REPLAY_PICK };
|
|
|
|
struct replay_insn_list {
|
|
enum replay_action action;
|
|
struct commit *operand;
|
|
struct replay_insn_list *next;
|
|
};
|
|
|
|
/*
|
|
* Removes SEQ_OLD_DIR and renames SEQ_DIR to SEQ_OLD_DIR, ignoring
|
|
* any errors. Intended to be used by 'git reset'.
|
|
*
|
|
* With the aggressive flag, it additionally removes SEQ_OLD_DIR,
|
|
* ignoring any errors. Inteded to be used by the sequencer's
|
|
* '--reset' subcommand.
|
|
*/
|
|
void remove_sequencer_state(int aggressive);
|
|
|
|
#endif
|