git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 0/2] completion: sequencer commands

From
Thomas Braun <thomas.braun@virtuell-zuhause.de>
Date
May 30, 2015, 15:57 UTC
Message-ID
<1433001452.5113.4.camel@virtuell-zuhause.de>
In-Reply-To
<CALkWK0m9Fj_3AnJcENL-kAFSbYjW4fKpN76Tftrt672hQj4qww@mail.gmail.com>
Ramkumar Ramachandra wrote:
Show 34 quoted lines
> 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.

Good idea. I created a new function __git_complete_sequencer which is now used to complete all commands with active sequencer.

Previous: Ramkumar RamachandraNext: Thomas Braun
Message 4 of 10 in “completion: suggest sequencer commands for revert”
  1. completion: suggest sequencer commands for revertThomas Braun, May 25, 2015
  2. Junio C HamanoMay 29, 2015
  3. Ramkumar RamachandraMay 29, 2015
  4. 0/2 completion: sequencer commandsThomas Braun, May 30, 2015
  5. 2/2 completion: suggest sequencer commands for revertThomas Braun, May 30, 2015
  6. 1/2 completion: Add sequencer functionThomas Braun, May 30, 2015
  7. SZEDER GáborMay 30, 2015
  8. Junio C HamanoJun 1, 2015
  9. SZEDER GáborJun 1, 2015
  10. 1/2 completion: Add sequencer functionThomas Braun, May 30, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.