Re: [PATCH] completion: suggest sequencer commands for revert
Junio C Hamano wrote: contrib/completion/git-completion.bash | 5 + 1 file changed, 5 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index bfc74e9..3c00acd 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -2282,6 +2282,11 @@ _git_reset () _git_revert () { + local dir=$(__gitdir) + if [ -f $dir/REVERT_HEAD ]; then + __gitcomp --continue --quit --abort + return + fi case $cur in --*) __gitcomp --edit --mainline --no-edit --no-commit --signoff This corresponds exactly to what we do for git-cherry-pick: local dir=$(__gitdir) if [ -f $dir/CHERRY_PICK_HEAD ]; then __gitcomp --continue --quit --abort return fi Perhaps _git_revert() and _git_cherry_pick() should call into the same function with different arguments. This looks fine though. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] completion: suggest sequencer commands for revert
Thomas Braun thomas.br...@virtuell-zuhause.de writes: Signed-off-by: Thomas Braun thomas.br...@virtuell-zuhause.de --- Hi, I added the sequencer commands for git revert. These are handy in case a git revert needs manual intervention. This looks OK from a cursory read to me; asking opinions from those who have touched the file in the recent past (Ram also happens to be one of the people who were heavily involved in sequencer work). Thanks. Thanks, Thomas contrib/completion/git-completion.bash | 5 + 1 file changed, 5 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index bfc74e9..3c00acd 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -2282,6 +2282,11 @@ _git_reset () _git_revert () { + local dir=$(__gitdir) + if [ -f $dir/REVERT_HEAD ]; then + __gitcomp --continue --quit --abort + return + fi case $cur in --*) __gitcomp --edit --mainline --no-edit --no-commit --signoff -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] completion: suggest sequencer commands for revert
Signed-off-by: Thomas Braun thomas.br...@virtuell-zuhause.de --- Hi, I added the sequencer commands for git revert. These are handy in case a git revert needs manual intervention. Thanks, Thomas contrib/completion/git-completion.bash | 5 + 1 file changed, 5 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index bfc74e9..3c00acd 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -2282,6 +2282,11 @@ _git_reset () _git_revert () { + local dir=$(__gitdir) + if [ -f $dir/REVERT_HEAD ]; then + __gitcomp --continue --quit --abort + return + fi case $cur in --*) __gitcomp --edit --mainline --no-edit --no-commit --signoff -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html