threads / patch / 47251

patchbash completion: Add --autostash and --no-autostash to pull

Subject: [PATCH] bash completion: Add --autostash and --no-autostash to pull

## tl;dr

3 messages between Nov 20, 2017 and Nov 21, 2017. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Albert Astals Cid· Nov 20, 2017, 15:07 UTC · lore
Ideally we should only autocomplete if pull has --rebase since
they only work with it but could not figure out how to do that
and the error message of doing git pull --autostash points out
that you need --rebase so i guess it's good enough
---
 contrib/completion/git-completion.bash | 1 +
 1 file changed, 1 insertion(+)
Show changes to contrib/completion/git-completion.bash +1 −0
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-
completion.bash
index 539d7f84f..7ded58f38 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1923,6 +1923,7 @@ _git_pull ()
 	--*)
 		__gitcomp "
 			--rebase --no-rebase
+			--autostash --no-autostash
 			$__git_merge_options
 			$__git_fetch_options
 		"
-- 
2.15.0
Eric Sunshine· Nov 20, 2017, 23:14 UTC · re: Albert Astals Cid · lore

Re: [PATCH] bash completion: Add --autostash and --no-autostash to pull

On Mon, Nov 20, 2017 at 10:07 AM, Albert Astals Cid <albert.astals.cid@kdab.com> wrote:

> Ideally we should only autocomplete if pull has --rebase since
> they only work with it but could not figure out how to do that
> and the error message of doing git pull --autostash points out
> that you need --rebase so i guess it's good enough
Missing Signed-off-by:. See Documentation/SubmittingPatches. Thanks.
Show 14 quoted lines
> ---
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-
> completion.bash
> index 539d7f84f..7ded58f38 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1923,6 +1923,7 @@ _git_pull ()
>         --*)
>                 __gitcomp "
>                         --rebase --no-rebase
> +                       --autostash --no-autostash
>                         $__git_merge_options
>                         $__git_fetch_options
>                 "
Albert Astals Cid· Nov 21, 2017, 14:39 UTC · re: Eric Sunshine · lore

Re: [PATCH] bash completion: Add --autostash and --no-autostash to pull

El dimarts, 21 de novembre de 2017, a les 0:14:24 CET, Eric Sunshine va escriure:

Show 9 quoted lines
> On Mon, Nov 20, 2017 at 10:07 AM, Albert Astals Cid
> 
> <albert.astals.cid@kdab.com> wrote:
> > Ideally we should only autocomplete if pull has --rebase since
> > they only work with it but could not figure out how to do that
> > and the error message of doing git pull --autostash points out
> > that you need --rebase so i guess it's good enough
> 
> Missing Signed-off-by:. See Documentation/SubmittingPatches. Thanks.
Added.
Cheers,
  Albert
Show 21 quoted lines
> 
> > ---
> > diff --git a/contrib/completion/git-completion.bash
> > b/contrib/completion/git- completion.bash
> > index 539d7f84f..7ded58f38 100644
> > --- a/contrib/completion/git-completion.bash
> > +++ b/contrib/completion/git-completion.bash
> > @@ -1923,6 +1923,7 @@ _git_pull ()
> > 
> >         --*)
> >         
> >                 __gitcomp "
> >                 
> >                         --rebase --no-rebase
> > 
> > +                       --autostash --no-autostash
> > 
> >                         $__git_merge_options
> >                         $__git_fetch_options
> >                 
> >                 "
-- 
Albert Astals Cid | albert.astals.cid@kdab.com | Software Engineer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel: Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - The Qt, C++ and OpenGL Experts

← back to recent threads