All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: git@vger.kernel.org
Cc: "Jonathan Nieder" <jrnieder@gmail.com>,
	"SZEDER Gábor" <szeder@ira.uka.de>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Thomas Rast" <trast@student.ethz.ch>,
	"Jeff King" <peff@peff.net>,
	"Felipe Contreras" <felipe.contreras@gmail.com>
Subject: [PATCH v2 3/4] completion: add missing general options
Date: Fri, 13 Apr 2012 02:50:02 +0300	[thread overview]
Message-ID: <1334274603-3277-4-git-send-email-felipe.contreras@gmail.com> (raw)
In-Reply-To: <1334274603-3277-1-git-send-email-felipe.contreras@gmail.com>

And add relevant tests.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/completion/git-completion.bash |    2 ++
 t/t9902-completion.sh                  |   16 ++++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 9d36bb7..6a8cf9f 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2640,8 +2640,10 @@ _git ()
 			--version
 			--exec-path
 			--html-path
+			--info-path
 			--work-tree=
 			--namespace=
+			--no-replace-objects
 			--help
 			"
 			;;
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index 3bbec79..f2075af 100755
--- a/t/t9902-completion.sh
+++ b/t/t9902-completion.sh
@@ -92,8 +92,10 @@ test_expect_success 'double dash "git" itself' '
 	--version Z
 	--exec-path Z
 	--html-path Z
+	--info-path Z
 	--work-tree=
 	--namespace=
+	--no-replace-objects Z
 	--help Z
 	EOF
 	test_completion "git --"
@@ -114,4 +116,18 @@ test_expect_success 'double dash "git checkout"' '
 	test_completion "git checkout --"
 '
 
+test_expect_success 'general options' '
+	test_completion "git --ver" "--version " &&
+	test_completion "git --hel" "--help " &&
+	test_completion "git --exe" "--exec-path " &&
+	test_completion "git --htm" "--html-path " &&
+	test_completion "git --pag" "--paginate " &&
+	test_completion "git --no-p" "--no-pager " &&
+	test_completion "git --git" "--git-dir=" &&
+	test_completion "git --wor" "--work-tree=" &&
+	test_completion "git --nam" "--namespace=" &&
+	test_completion "git --bar" "--bare " &&
+	test_completion "git --inf" "--info-path " &&
+	test_completion "git --no-r" "--no-replace-objects "
+'
 test_done
-- 
1.7.10.1.g1f19b8.dirty

  parent reply	other threads:[~2012-04-12 23:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12 23:49 [PATCH v2 0/4] completion: trivial cleanups and fixes Felipe Contreras
2012-04-12 23:50 ` [PATCH v2 1/4] completion: simplify __gitcomp_1 Felipe Contreras
2012-04-12 23:50 ` [PATCH v2 2/4] completion: trivial simplification Felipe Contreras
2012-04-12 23:50 ` Felipe Contreras [this message]
2012-04-12 23:50 ` [PATCH v2 4/4] completion: improve 'git --exec-path' completion Felipe Contreras
2012-04-13  6:08   ` Jonathan Nieder
2012-04-13 18:04     ` Jonathan Nieder
2012-04-13 18:30       ` Jonathan Nieder
2012-04-13 23:35         ` Felipe Contreras
2012-04-13 23:37           ` Jonathan Nieder
2012-04-13 23:43             ` Felipe Contreras
2012-04-14  7:21         ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334274603-3277-4-git-send-email-felipe.contreras@gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    --cc=szeder@ira.uka.de \
    --cc=trast@student.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.