Re: [PATCH 2/2] completion: learn about --man-path

2013-06-30 Thread SZEDER Gábor
Hi,

On Sat, Jun 22, 2013 at 12:25:18PM +0100, John Keeping wrote:
 Signed-off-by: John Keeping j...@keeping.me.uk
 ---
  contrib/completion/git-completion.bash | 2 ++
  t/t9902-completion.sh  | 1 +
  2 files changed, 3 insertions(+)
 
 diff --git a/contrib/completion/git-completion.bash 
 b/contrib/completion/git-completion.bash
 index 8fbf941..c3290af 100644
 --- a/contrib/completion/git-completion.bash
 +++ b/contrib/completion/git-completion.bash
 @@ -2513,11 +2513,13 @@ __git_main ()
   --exec-path
   --exec-path=
   --html-path
 + --man-path
   --info-path
   --work-tree=
   --namespace=
   --no-replace-objects
   --help
 + -c

There are a couple of issues with this '-c' here:

- We normally offer only --long-options in the completion script.
- The log message doesn't mention it.
- And finally the most important: it will never be offered for
  completion.  This is the condition of this case branch:

case $cur in
--*)   __gitcomp 

  i.e. this case branch is executed only when the current word on the
  command line begins with '--', but then '-c' will never match.

Without the '-c' part it's obviously correct and together with patch
1/2 is

Acked-by: SZEDER Gábor sze...@ira.uka.de


   
   ;;
   *) __git_compute_porcelain_commands
 diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
 index 81a1657..14d605a 100755
 --- a/t/t9902-completion.sh
 +++ b/t/t9902-completion.sh
 @@ -231,6 +231,7 @@ test_expect_success 'double dash git itself' '
   --exec-path Z
   --exec-path=
   --html-path Z
 + --man-path Z
   --info-path Z
   --work-tree=
   --namespace=
 -- 
 1.8.3.1.676.gaae6535
 
 
--
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 2/2] completion: learn about --man-path

2013-06-30 Thread Junio C Hamano
SZEDER Gábor sze...@fzi.de writes:

 Without the '-c' part it's obviously correct and together with patch
 1/2 is

 Acked-by: SZEDER Gábor sze...@ira.uka.de

Thanks, both.  Will queue.
--
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 2/2] completion: learn about --man-path

2013-06-22 Thread John Keeping
Signed-off-by: John Keeping j...@keeping.me.uk
---
 contrib/completion/git-completion.bash | 2 ++
 t/t9902-completion.sh  | 1 +
 2 files changed, 3 insertions(+)

diff --git a/contrib/completion/git-completion.bash 
b/contrib/completion/git-completion.bash
index 8fbf941..c3290af 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2513,11 +2513,13 @@ __git_main ()
--exec-path
--exec-path=
--html-path
+   --man-path
--info-path
--work-tree=
--namespace=
--no-replace-objects
--help
+   -c

;;
*) __git_compute_porcelain_commands
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index 81a1657..14d605a 100755
--- a/t/t9902-completion.sh
+++ b/t/t9902-completion.sh
@@ -231,6 +231,7 @@ test_expect_success 'double dash git itself' '
--exec-path Z
--exec-path=
--html-path Z
+   --man-path Z
--info-path Z
--work-tree=
--namespace=
-- 
1.8.3.1.676.gaae6535

--
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