* [PATCH] completion: remove use of dashed git commands
@ 2008-04-20 17:28 Dan McGee
2008-04-20 17:28 ` [PATCH] completion: allow 'git remote' subcommand completion Dan McGee
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Dan McGee @ 2008-04-20 17:28 UTC (permalink / raw)
To: spearce; +Cc: git, Dan McGee
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
---
contrib/completion/git-completion.bash | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 4d81963..3f78630 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -152,7 +152,7 @@ __git_heads ()
done
return
fi
- for i in $(git-ls-remote "$1" 2>/dev/null); do
+ for i in $(git ls-remote "$1" 2>/dev/null); do
case "$is_hash,$i" in
y,*) is_hash=n ;;
n,*^{}) is_hash=y ;;
@@ -173,7 +173,7 @@ __git_tags ()
done
return
fi
- for i in $(git-ls-remote "$1" 2>/dev/null); do
+ for i in $(git ls-remote "$1" 2>/dev/null); do
case "$is_hash,$i" in
y,*) is_hash=n ;;
n,*^{}) is_hash=y ;;
@@ -200,7 +200,7 @@ __git_refs ()
done
return
fi
- for i in $(git-ls-remote "$dir" 2>/dev/null); do
+ for i in $(git ls-remote "$dir" 2>/dev/null); do
case "$is_hash,$i" in
y,*) is_hash=n ;;
n,*^{}) is_hash=y ;;
@@ -223,7 +223,7 @@ __git_refs2 ()
__git_refs_remotes ()
{
local cmd i is_hash=y
- for i in $(git-ls-remote "$1" 2>/dev/null); do
+ for i in $(git ls-remote "$1" 2>/dev/null); do
case "$is_hash,$i" in
n,refs/heads/*)
is_hash=y
--
1.5.5
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH] completion: allow 'git remote' subcommand completion
2008-04-20 17:28 [PATCH] completion: remove use of dashed git commands Dan McGee
@ 2008-04-20 17:28 ` Dan McGee
2008-04-20 19:22 ` Shawn O. Pearce
2008-04-20 17:43 ` [PATCH] completion: remove use of dashed git commands Johannes Schindelin
2008-04-20 19:20 ` Shawn O. Pearce
2 siblings, 1 reply; 11+ messages in thread
From: Dan McGee @ 2008-04-20 17:28 UTC (permalink / raw)
To: spearce; +Cc: git, Dan McGee
After typing 'git prune ', the subcommand options were not shown. Fix it.
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
---
contrib/completion/git-completion.bash | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 3f78630..6012047 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1052,6 +1052,7 @@ _git_remote ()
local subcommands="add rm show prune update"
local subcommand="$(__git_find_subcommand "$subcommands")"
if [ -z "$subcommand" ]; then
+ __gitcomp "$subcommands"
return
fi
--
1.5.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] completion: allow 'git remote' subcommand completion
2008-04-20 17:28 ` [PATCH] completion: allow 'git remote' subcommand completion Dan McGee
@ 2008-04-20 19:22 ` Shawn O. Pearce
2008-04-20 19:34 ` Dan McGee
0 siblings, 1 reply; 11+ messages in thread
From: Shawn O. Pearce @ 2008-04-20 19:22 UTC (permalink / raw)
To: Dan McGee; +Cc: git
Dan McGee <dpmcgee@gmail.com> wrote:
> After typing 'git prune ', the subcommand options were not shown. Fix it.
That's not really what this change does. It fixes the subcommands
for 'git remote ', which were broken without this __gitcomp call
in this location.
Acked-by: Shawn O. Pearce <spearce@spearce.org>
but I'd like to see a more accurate commit message for this fix.
> Signed-off-by: Dan McGee <dpmcgee@gmail.com>
> ---
> contrib/completion/git-completion.bash | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 3f78630..6012047 100755
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1052,6 +1052,7 @@ _git_remote ()
> local subcommands="add rm show prune update"
> local subcommand="$(__git_find_subcommand "$subcommands")"
> if [ -z "$subcommand" ]; then
> + __gitcomp "$subcommands"
> return
> fi
>
> --
> 1.5.5
>
--
Shawn.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] completion: allow 'git remote' subcommand completion
2008-04-20 19:22 ` Shawn O. Pearce
@ 2008-04-20 19:34 ` Dan McGee
0 siblings, 0 replies; 11+ messages in thread
From: Dan McGee @ 2008-04-20 19:34 UTC (permalink / raw)
To: git; +Cc: Dan McGee
After typing 'git remote ', the subcommand options were not shown. Fix it
by adding the missing __gitcomp call.
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
---
Resubmit per Shawn's comments- duh. I was just thinking backwards since
remote has a prune subcommand.
contrib/completion/git-completion.bash | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 3f78630..6012047 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1052,6 +1052,7 @@ _git_remote ()
local subcommands="add rm show prune update"
local subcommand="$(__git_find_subcommand "$subcommands")"
if [ -z "$subcommand" ]; then
+ __gitcomp "$subcommands"
return
fi
--
1.5.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] completion: remove use of dashed git commands
2008-04-20 17:28 [PATCH] completion: remove use of dashed git commands Dan McGee
2008-04-20 17:28 ` [PATCH] completion: allow 'git remote' subcommand completion Dan McGee
@ 2008-04-20 17:43 ` Johannes Schindelin
2008-04-20 17:49 ` Dan McGee
2008-04-20 17:51 ` Junio C Hamano
2008-04-20 19:20 ` Shawn O. Pearce
2 siblings, 2 replies; 11+ messages in thread
From: Johannes Schindelin @ 2008-04-20 17:43 UTC (permalink / raw)
To: Dan McGee; +Cc: spearce, git
Hi,
On Sun, 20 Apr 2008, Dan McGee wrote:
> [no commit message]
I would like to deprecate dashed form _officially_ first (as in
ReleaseNotes), before doing something that could lead to quite some
surprised users.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] completion: remove use of dashed git commands
2008-04-20 17:43 ` [PATCH] completion: remove use of dashed git commands Johannes Schindelin
@ 2008-04-20 17:49 ` Dan McGee
2008-04-20 17:54 ` Johannes Schindelin
2008-04-20 17:51 ` Junio C Hamano
1 sibling, 1 reply; 11+ messages in thread
From: Dan McGee @ 2008-04-20 17:49 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: spearce, git
On Sun, Apr 20, 2008 at 12:43 PM, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Sun, 20 Apr 2008, Dan McGee wrote:
>
> > [no commit message]
>
> I would like to deprecate dashed form _officially_ first (as in
> ReleaseNotes), before doing something that could lead to quite some
> surprised users.
Now you've confused me. From Documentation/RelNotes-1.5.4.txt, it
seems fairly clear that dashed command forms are deprecated.
This patch was rather non-intrusive- it only updated the bash
completion script to use the non-dashed forms. I'm not sure how this
leads to surprised users at all.
-Dan
(Sorry for the double send, forgot the reply-all the first time. Looks
like I need another Sunday cup of coffee.)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] completion: remove use of dashed git commands
2008-04-20 17:49 ` Dan McGee
@ 2008-04-20 17:54 ` Johannes Schindelin
2008-04-20 17:58 ` Dan McGee
2008-04-20 18:53 ` Matthieu Moy
0 siblings, 2 replies; 11+ messages in thread
From: Johannes Schindelin @ 2008-04-20 17:54 UTC (permalink / raw)
To: Dan McGee; +Cc: spearce, git
Hi,
On Sun, 20 Apr 2008, Dan McGee wrote:
> On Sun, Apr 20, 2008 at 12:43 PM, Johannes Schindelin
> <Johannes.Schindelin@gmx.de> wrote:
>
> > On Sun, 20 Apr 2008, Dan McGee wrote:
> >
> > > [no commit message]
> >
> > I would like to deprecate dashed form _officially_ first (as in
> > ReleaseNotes), before doing something that could lead to quite some
> > surprised users.
>
> Now you've confused me. From Documentation/RelNotes-1.5.4.txt, it
> seems fairly clear that dashed command forms are deprecated.
Oh, I must have missed that. Nevertheless, I think it should be
synchronised with when the dashed commands vanish from the default
installation.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] completion: remove use of dashed git commands
2008-04-20 17:54 ` Johannes Schindelin
@ 2008-04-20 17:58 ` Dan McGee
2008-04-20 18:53 ` Matthieu Moy
1 sibling, 0 replies; 11+ messages in thread
From: Dan McGee @ 2008-04-20 17:58 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: spearce, git
On Sun, Apr 20, 2008 at 12:54 PM, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Sun, 20 Apr 2008, Dan McGee wrote:
>
> > On Sun, Apr 20, 2008 at 12:43 PM, Johannes Schindelin
> > <Johannes.Schindelin@gmx.de> wrote:
> >
>
> > > On Sun, 20 Apr 2008, Dan McGee wrote:
> > >
> > > > [no commit message]
> > >
> > > I would like to deprecate dashed form _officially_ first (as in
> > > ReleaseNotes), before doing something that could lead to quite some
> > > surprised users.
> >
> > Now you've confused me. From Documentation/RelNotes-1.5.4.txt, it
> > seems fairly clear that dashed command forms are deprecated.
>
> Oh, I must have missed that. Nevertheless, I think it should be
> synchronised with when the dashed commands vanish from the default
> installation.
>From the RelNotes:
Users are strongly encouraged to adjust their habits and scripts now
to prepare for this change.
It seems like setting a good example would be prudent, so I attempted
to do that here. If adding a commit message referencing the
documentation would have helped, then I'm sorry for that, but I've
submitted patches like this in the past (22fa97) without near as much
hassle as I'm getting for this small change.
-Dan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] completion: remove use of dashed git commands
2008-04-20 17:54 ` Johannes Schindelin
2008-04-20 17:58 ` Dan McGee
@ 2008-04-20 18:53 ` Matthieu Moy
1 sibling, 0 replies; 11+ messages in thread
From: Matthieu Moy @ 2008-04-20 18:53 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Dan McGee, spearce, git
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Oh, I must have missed that. Nevertheless, I think it should be
> synchronised with when the dashed commands vanish from the default
> installation.
I think you missed the point of the patch.
It removes _uses_ of dashed-form in the completion script, but doesn't
remove completion for dashed forms. That could be made clear in the
commit message to avoid confusion.
--
Matthieu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] completion: remove use of dashed git commands
2008-04-20 17:43 ` [PATCH] completion: remove use of dashed git commands Johannes Schindelin
2008-04-20 17:49 ` Dan McGee
@ 2008-04-20 17:51 ` Junio C Hamano
1 sibling, 0 replies; 11+ messages in thread
From: Junio C Hamano @ 2008-04-20 17:51 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Dan McGee, spearce, git
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Hi,
>
> On Sun, 20 Apr 2008, Dan McGee wrote:
>
>> [no commit message]
>
> I would like to deprecate dashed form _officially_ first (as in
> ReleaseNotes), before doing something that could lead to quite some
> surprised users.
I'd share your distaste against an empty log message to justify the
changes, but I do not see where those "quite some surprised users" would
come from.
At least people know "git foo" form is and has been supported, so if
somebody changes "git-ls-files" to "git ls-files", nobody would go "gee, I
did not know I can write it without dash" these days...
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] completion: remove use of dashed git commands
2008-04-20 17:28 [PATCH] completion: remove use of dashed git commands Dan McGee
2008-04-20 17:28 ` [PATCH] completion: allow 'git remote' subcommand completion Dan McGee
2008-04-20 17:43 ` [PATCH] completion: remove use of dashed git commands Johannes Schindelin
@ 2008-04-20 19:20 ` Shawn O. Pearce
2 siblings, 0 replies; 11+ messages in thread
From: Shawn O. Pearce @ 2008-04-20 19:20 UTC (permalink / raw)
To: Dan McGee; +Cc: git
Dan McGee <dpmcgee@gmail.com> wrote:
> Signed-off-by: Dan McGee <dpmcgee@gmail.com>
> ---
> contrib/completion/git-completion.bash | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Despite Dscho's remarks, this is a change that is harmless and
should be happening before we officially remove the dashed forms
from the user's path.
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 4d81963..3f78630 100755
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -152,7 +152,7 @@ __git_heads ()
> done
> return
> fi
> - for i in $(git-ls-remote "$1" 2>/dev/null); do
> + for i in $(git ls-remote "$1" 2>/dev/null); do
> case "$is_hash,$i" in
> y,*) is_hash=n ;;
> n,*^{}) is_hash=y ;;
> @@ -173,7 +173,7 @@ __git_tags ()
> done
> return
> fi
> - for i in $(git-ls-remote "$1" 2>/dev/null); do
> + for i in $(git ls-remote "$1" 2>/dev/null); do
> case "$is_hash,$i" in
> y,*) is_hash=n ;;
> n,*^{}) is_hash=y ;;
> @@ -200,7 +200,7 @@ __git_refs ()
> done
> return
> fi
> - for i in $(git-ls-remote "$dir" 2>/dev/null); do
> + for i in $(git ls-remote "$dir" 2>/dev/null); do
> case "$is_hash,$i" in
> y,*) is_hash=n ;;
> n,*^{}) is_hash=y ;;
> @@ -223,7 +223,7 @@ __git_refs2 ()
> __git_refs_remotes ()
> {
> local cmd i is_hash=y
> - for i in $(git-ls-remote "$1" 2>/dev/null); do
> + for i in $(git ls-remote "$1" 2>/dev/null); do
> case "$is_hash,$i" in
> n,refs/heads/*)
> is_hash=y
> --
> 1.5.5
>
--
Shawn.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-04-20 19:34 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-20 17:28 [PATCH] completion: remove use of dashed git commands Dan McGee
2008-04-20 17:28 ` [PATCH] completion: allow 'git remote' subcommand completion Dan McGee
2008-04-20 19:22 ` Shawn O. Pearce
2008-04-20 19:34 ` Dan McGee
2008-04-20 17:43 ` [PATCH] completion: remove use of dashed git commands Johannes Schindelin
2008-04-20 17:49 ` Dan McGee
2008-04-20 17:54 ` Johannes Schindelin
2008-04-20 17:58 ` Dan McGee
2008-04-20 18:53 ` Matthieu Moy
2008-04-20 17:51 ` Junio C Hamano
2008-04-20 19:20 ` Shawn O. Pearce
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).