diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2006-05-02 16:22:48 +0400 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-05-03 07:09:54 +0400 |
commit | 2fa9a0fb31cbf01e8318a02c3e222d7fd3fd0a83 (patch) | |
tree | 6996841b59cc0884878a36ce310765e9252cbae0 /t/t1300-repo-config.sh | |
parent | 3d990f110c2e5b8df83f6ab3ef83497f43c7fd47 (diff) |
repo-config: support --get-regexp
With --get-regexp, output all key/value pairs where the key matches a
regexp. Example:
git-repo-config --get-regexp remote.*.url
will output something like
remote.junio.url git://git.kernel.org/pub/scm/git/git.git
remote.gitk.url git://git.kernel.org/pub/scm/gitk/gitk.git
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't/t1300-repo-config.sh')
-rwxr-xr-x | t/t1300-repo-config.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index ab4dd5c4ce..1bf728fb06 100755 --- a/t/t1300-repo-config.sh +++ b/t/t1300-repo-config.sh @@ -247,6 +247,24 @@ EOF test_expect_success 'hierarchical section value' 'cmp .git/config expect' +cat > expect << EOF +beta.noindent=sillyValue +nextsection.nonewline=wow2 for me +123456.a123=987 +1.2.3.alpha=beta +EOF + +test_expect_success 'working --list' \ + 'git-repo-config --list > output && cmp output expect' + +cat > expect << EOF +beta.noindent sillyValue +nextsection.nonewline wow2 for me +EOF + +test_expect_success '--get-regexp' \ + 'git-repo-config --get-regexp in > output && cmp output expect' + cat > .git/config << EOF [novalue] variable @@ -255,5 +273,10 @@ EOF test_expect_success 'get variable with no value' \ 'git-repo-config --get novalue.variable ^$' +git-repo-config > output 2>&1 + +test_expect_success 'no arguments, but no crash' \ + "test $? = 129 && grep usage output" + test_done |