All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] completion: complete --move for git branch
@ 2016-06-06 13:16 Ville Skyttä
  2016-06-06 14:16 ` Remi Galan Alfonso
  0 siblings, 1 reply; 6+ messages in thread
From: Ville Skyttä @ 2016-06-06 13:16 UTC (permalink / raw)
  To: git

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
---
 contrib/completion/git-completion.bash | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 3402475..6918cc8 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -964,8 +964,8 @@ _git_branch ()
 	while [ $c -lt $cword ]; do
 		i="${words[c]}"
 		case "$i" in
-		-d|-m)	only_local_ref="y" ;;
-		-r)	has_r="y" ;;
+		-d|-m|--move)	only_local_ref="y" ;;
+		-r)		has_r="y" ;;
 		esac
 		((c++))
 	done
@@ -979,7 +979,7 @@ _git_branch ()
 			--color --no-color --verbose --abbrev= --no-abbrev
 			--track --no-track --contains --merged --no-merged
 			--set-upstream-to= --edit-description --list
-			--unset-upstream
+			--unset-upstream --move
 			"
 		;;
 	*)
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] completion: complete --move for git branch
  2016-06-06 13:16 [PATCH] completion: complete --move for git branch Ville Skyttä
@ 2016-06-06 14:16 ` Remi Galan Alfonso
  2016-06-06 16:19   ` Ville Skyttä
  0 siblings, 1 reply; 6+ messages in thread
From: Remi Galan Alfonso @ 2016-06-06 14:16 UTC (permalink / raw)
  To: Ville Skyttä; +Cc: git

Hi,

Ville Skyttä <ville.skytta@iki.fi> writes:
>          while [ $c -lt $cword ]; do
>                  i="${words[c]}"
>                  case "$i" in
> -                -d|-m)        only_local_ref="y" ;;
> -                -r)        has_r="y" ;;
> +                -d|-m|--move)        only_local_ref="y" ;;

"While you're at it" you might want to do the same thing for
`--delete`.

> +                -r)                has_r="y" ;;

You are introducing an additional tab here that you probably didn't
want.

>                  esac
>                  ((c++))
>          done
> @@ -979,7 +979,7 @@ _git_branch ()
>                          --color --no-color --verbose --abbrev= --no-abbrev
>                          --track --no-track --contains --merged --no-merged
>                          --set-upstream-to= --edit-description --list
> -                        --unset-upstream
> +                        --unset-upstream --move
>                          "
>                  ;;
>          *)

Thanks,
Rémi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] completion: complete --move for git branch
  2016-06-06 14:16 ` Remi Galan Alfonso
@ 2016-06-06 16:19   ` Ville Skyttä
  2016-06-07  9:16     ` Remi Galan Alfonso
  0 siblings, 1 reply; 6+ messages in thread
From: Ville Skyttä @ 2016-06-06 16:19 UTC (permalink / raw)
  To: Remi Galan Alfonso; +Cc: git

On Mon, Jun 6, 2016 at 5:16 PM, Remi Galan Alfonso
<remi.galan-alfonso@ensimag.grenoble-inp.fr> wrote:
>
> Hi,
>
> Ville Skyttä <ville.skytta@iki.fi> writes:
> >          while [ $c -lt $cword ]; do
> >                  i="${words[c]}"
> >                  case "$i" in
> > -                -d|-m)        only_local_ref="y" ;;
> > -                -r)        has_r="y" ;;
> > +                -d|-m|--move)        only_local_ref="y" ;;
>
> "While you're at it" you might want to do the same thing for
> `--delete`.

I'm afraid the "while I'm at it" would never end if I start looking
deeper into missing things there, so I'd prefer this self contained
one I keep running into myself applied first.

> > +                -r)                has_r="y" ;;
>
> You are introducing an additional tab here that you probably didn't
> want.

It was intentionally added it to keep "only_local_ref" and "has_r"
tab-aligned the way they already were.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] completion: complete --move for git branch
  2016-06-06 16:19   ` Ville Skyttä
@ 2016-06-07  9:16     ` Remi Galan Alfonso
  2016-08-09  9:34       ` [PATCH v2] completion: complete --delete, --move, and --remotes " Ville Skyttä
  0 siblings, 1 reply; 6+ messages in thread
From: Remi Galan Alfonso @ 2016-06-07  9:16 UTC (permalink / raw)
  To: Ville Skyttä; +Cc: git

Ville Skyttä <ville.skytta@iki.fi> writes:
> On Mon, Jun 6, 2016 at 5:16 PM, Remi Galan Alfonso
> <remi.galan-alfonso@ensimag.grenoble-inp.fr> wrote:
> >
> > Hi,
> >
> > Ville Skyttä <ville.skytta@iki.fi> writes:
> > >          while [ $c -lt $cword ]; do
> > >                  i="${words[c]}"
> > >                  case "$i" in
> > > -                -d|-m)        only_local_ref="y" ;;
> > > -                -r)        has_r="y" ;;
> > > +                -d|-m|--move)        only_local_ref="y" ;;
> >
> > "While you're at it" you might want to do the same thing for
> > `--delete`.
> 
> I'm afraid the "while I'm at it" would never end if I start looking
> deeper into missing things there, so I'd prefer this self contained
> one I keep running into myself applied first.

I understand, though adding `--delete` here makes sense since there is
already the short-hand `-d` that is tested (like you added `--move`
since the short-hand `-m` is tested).
However adding it here means that we should also add it in completion
list below. Thinking about it, it might be better to have it in a
separate patch, so no further objections with this patch.

> 
> > > +                -r)                has_r="y" ;;
> >
> > You are introducing an additional tab here that you probably didn't
> > want.
> 
> It was intentionally added it to keep "only_local_ref" and "has_r"
> tab-aligned the way they already were.

Ah indeed, my bad, I didn't see it.

Thanks,
Rémi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] completion: complete --delete, --move, and --remotes for git branch
  2016-06-07  9:16     ` Remi Galan Alfonso
@ 2016-08-09  9:34       ` Ville Skyttä
  2016-08-09 18:30         ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Ville Skyttä @ 2016-08-09  9:34 UTC (permalink / raw)
  To: git; +Cc: remi.galan-alfonso

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
---
 contrib/completion/git-completion.bash | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 6a187bc..76abbd1 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1008,8 +1008,8 @@ _git_branch ()
 	while [ $c -lt $cword ]; do
 		i="${words[c]}"
 		case "$i" in
-		-d|-m)	only_local_ref="y" ;;
-		-r)	has_r="y" ;;
+		-d|--delete|-m|--move)	only_local_ref="y" ;;
+		-r|--remotes)		has_r="y" ;;
 		esac
 		((c++))
 	done
@@ -1023,7 +1023,7 @@ _git_branch ()
 			--color --no-color --verbose --abbrev= --no-abbrev
 			--track --no-track --contains --merged --no-merged
 			--set-upstream-to= --edit-description --list
-			--unset-upstream
+			--unset-upstream --delete --move --remotes
 			"
 		;;
 	*)
-- 
2.5.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] completion: complete --delete, --move, and --remotes for git branch
  2016-08-09  9:34       ` [PATCH v2] completion: complete --delete, --move, and --remotes " Ville Skyttä
@ 2016-08-09 18:30         ` Junio C Hamano
  0 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2016-08-09 18:30 UTC (permalink / raw)
  To: Ville Skyttä; +Cc: git, remi.galan-alfonso

Ville Skyttä <ville.skytta@iki.fi> writes:

> Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
> ---
>  contrib/completion/git-completion.bash | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 6a187bc..76abbd1 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1008,8 +1008,8 @@ _git_branch ()
>  	while [ $c -lt $cword ]; do
>  		i="${words[c]}"
>  		case "$i" in
> -		-d|-m)	only_local_ref="y" ;;
> -		-r)	has_r="y" ;;
> +		-d|--delete|-m|--move)	only_local_ref="y" ;;
> +		-r|--remotes)		has_r="y" ;;
>  		esac
>  		((c++))
>  	done

Sounds sensible; we already had "-d" but not its fully-spelled
variant, and you are adding it (together with its friends).

Will queue.

> @@ -1023,7 +1023,7 @@ _git_branch ()
>  			--color --no-color --verbose --abbrev= --no-abbrev
>  			--track --no-track --contains --merged --no-merged
>  			--set-upstream-to= --edit-description --list
> -			--unset-upstream
> +			--unset-upstream --delete --move --remotes
>  			"
>  		;;
>  	*)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-09 18:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-06 13:16 [PATCH] completion: complete --move for git branch Ville Skyttä
2016-06-06 14:16 ` Remi Galan Alfonso
2016-06-06 16:19   ` Ville Skyttä
2016-06-07  9:16     ` Remi Galan Alfonso
2016-08-09  9:34       ` [PATCH v2] completion: complete --delete, --move, and --remotes " Ville Skyttä
2016-08-09 18:30         ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.