Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-09-01 01:38:50 +0300
committerJunio C Hamano <gitster@pobox.com>2015-09-01 01:38:50 +0300
commitfc9dfda1be25ab3bb311900c6cfbf59d6b6e224e (patch)
tree6a53a2a3de541f1c7155f4163086ab49a5c81a43 /t
parentaecce6d0eff68a7144e32247d2e02d9974772ab1 (diff)
parenta92330d21c13cf244d8045f5c9d1df6e63893d58 (diff)
Merge branch 'sg/config-name-only'
"git config --list" output was hard to parse when values consist of multiple lines. "--name-only" option is added to help this. * sg/config-name-only: get_urlmatch: avoid useless strbuf write format_config: simplify buffer handling format_config: don't init strbuf config: restructure format_config() for better control flow completion: list variable names reliably with 'git config --name-only' config: add '--name-only' option to list only variable names
Diffstat (limited to 't')
-rwxr-xr-xt/t1300-repo-config.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 66dd28644f..52678e7d0a 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -353,6 +353,18 @@ test_expect_success '--list without repo produces empty output' '
'
cat > expect << EOF
+beta.noindent
+nextsection.nonewline
+123456.a123
+version.1.2.3eX.alpha
+EOF
+
+test_expect_success '--name-only --list' '
+ git config --name-only --list >output &&
+ test_cmp expect output
+'
+
+cat > expect << EOF
beta.noindent sillyValue
nextsection.nonewline wow2 for me
EOF
@@ -363,6 +375,16 @@ test_expect_success '--get-regexp' '
'
cat > expect << EOF
+beta.noindent
+nextsection.nonewline
+EOF
+
+test_expect_success '--name-only --get-regexp' '
+ git config --name-only --get-regexp in >output &&
+ test_cmp expect output
+'
+
+cat > expect << EOF
wow2 for me
wow4 for you
EOF