mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
![Jonathan Nieder](/assets/img/avatar_default.png)
The option to "git cherry-pick" and "git revert" to discard the sequencer state introduced by v1.7.8-rc0~141^2~6 (revert: Introduce --reset to remove sequencer state, 2011-08-04) has a confusing name. Change it now, while we still have the time. The new name for "cherry-pick, please get out of my way, since I've long forgotten about the sequence of commits I was cherry-picking when you wrote that old .git/sequencer directory" is --quit. Mnemonic: this is analagous to quiting a program the user is no longer using --- we just want to get out of the multiple-command cherry-pick procedure and not to reset HEAD or rewind any other old state. The "--reset" option is kept as a synonym to minimize the impact. We might consider dropping it for simplicity in a separate patch, though. Adjust documentation and tests to use the newly preferred name (--quit) instead of --reset. While at it, let's clarify the short descriptions of these operations in "-h" output. Before: --reset forget the current operation --continue continue the current operation After: --quit end revert or cherry-pick sequence --continue resume revert or cherry-pick sequence Noticed-by: Phil Hord <phil.hord@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
21 lines
560 B
C
21 lines
560 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"
|
|
|
|
/*
|
|
* 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
|
|
* '--quit' subcommand.
|
|
*/
|
|
void remove_sequencer_state(int aggressive);
|
|
|
|
#endif
|