summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorBrian Gernhardt <benji@silverinsanity.com>2006-12-15 12:39:04 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-12-16 06:31:01 (GMT)
commit89c4afe0d011b71d0bbcd9ad43f367f6a0dc3d83 (patch)
tree59515c79cb19dd8d8f6816188748eed1bde571ef /t
parent9013192449ed1148da4805e33a2644fca92dd1c7 (diff)
downloadgit-89c4afe0d011b71d0bbcd9ad43f367f6a0dc3d83.zip
git-89c4afe0d011b71d0bbcd9ad43f367f6a0dc3d83.tar.gz
git-89c4afe0d011b71d0bbcd9ad43f367f6a0dc3d83.tar.bz2
Add --add option to git-repo-config
For multivars, the "git-repo-config name value ^$" is useful but nonintuitive and troublesome to do repeatedly (since the value is not at the end of the command line). This commit simply adds an --add option that adds a new value to a multivar. Particularly useful for tracking a new branch on a remote: git-repo-config --add remote.origin.fetch +next:origin/next Includes documentation and test. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't')
-rwxr-xr-xt/t1300-repo-config.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 0de2497..16cd642 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -265,6 +265,16 @@ EOF
test_expect_success '--get-regexp' \
'git-repo-config --get-regexp in > output && cmp output expect'
+git-repo-config --add nextsection.nonewline "wow4 for you"
+
+cat > expect << EOF
+wow2 for me
+wow4 for you
+EOF
+
+test_expect_success '--add' \
+ 'git-repo-config --get-all nextsection.nonewline > output && cmp output expect'
+
cat > .git/config << EOF
[novalue]
variable