diff options
| author | Junio C Hamano <junkio@cox.net> | 2006-12-27 02:43:46 -0800 |
|---|---|---|
| committer | Junio C Hamano <junkio@cox.net> | 2006-12-27 02:43:46 -0800 |
| commit | 37818d7db070f67a20df58ac7d5e04cc63ef1867 (patch) | |
| tree | 1b1b2b71afab1c4ad29666f56fa8d2560b7855c6 /t/t1300-repo-config.sh | |
| parent | 4bcb310c2539b66d535e87508d1b7a90fe29c083 (diff) | |
| parent | ae72f685418b79bbd67e1017c5b1ac7d731c042e (diff) | |
| download | git-37818d7db070f67a20df58ac7d5e04cc63ef1867.tar.gz | |
Merge branch 'master' into js/shallow
This is to adjust to:
count-objects -v: show number of packs as well.
which will break a test in this series.
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 | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index 0de2497746..e48a4ecdcf 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 @@ -333,5 +343,53 @@ EOF test_expect_success '--set in alternative GIT_CONFIG' 'cmp other-config expect' +cat > .git/config << EOF +# Hallo + #Bello +[branch "eins"] + x = 1 +[branch.eins] + y = 1 + [branch "1 234 blabl/a"] +weird +EOF + +test_expect_success "rename section" \ + "git-repo-config --rename-section branch.eins branch.zwei" + +cat > expect << EOF +# Hallo + #Bello +[branch "zwei"] + x = 1 +[branch "zwei"] + y = 1 + [branch "1 234 blabl/a"] +weird +EOF + +test_expect_success "rename succeeded" "diff -u expect .git/config" + +test_expect_failure "rename non-existing section" \ + 'git-repo-config --rename-section branch."world domination" branch.drei' + +test_expect_success "rename succeeded" "diff -u expect .git/config" + +test_expect_success "rename another section" \ + 'git-repo-config --rename-section branch."1 234 blabl/a" branch.drei' + +cat > expect << EOF +# Hallo + #Bello +[branch "zwei"] + x = 1 +[branch "zwei"] + y = 1 +[branch "drei"] +weird +EOF + +test_expect_success "rename succeeded" "diff -u expect .git/config" + test_done |
