diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-02-26 13:37:19 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-02-26 13:37:19 -0800 |
commit | 225caa73f25f8577a710f406b2670c3bcf0aef34 (patch) | |
tree | fac492640e0f0fcbfe621ebd91b40a34c5bbbcb6 /t/t5505-remote.sh | |
parent | 56d4e7e6c347f8986a6621ca89ae3eec055bcf59 (diff) | |
parent | 3d1806487af395fb33d1de92633e96571b296305 (diff) | |
download | git-225caa73f25f8577a710f406b2670c3bcf0aef34.tar.gz |
Merge branch 'ps/config-error'
Many codepaths forget to check return value from git_config_set();
the function is made to die() to make sure we do not proceed when
setting a configuration variable failed.
* ps/config-error:
config: rename git_config_set_or_die to git_config_set
config: rename git_config_set to git_config_set_gently
compat: die when unable to set core.precomposeunicode
sequencer: die on config error when saving replay opts
init-db: die on config errors when initializing empty repo
clone: die on config error in cmd_clone
remote: die on config error when manipulating remotes
remote: die on config error when setting/adding branches
remote: die on config error when setting URL
submodule--helper: die on config error when cloning module
submodule: die on config error when linking modules
branch: die on config error when editing branch description
branch: die on config error when unsetting upstream
branch: report errors in tracking branch setup
config: introduce set_or_die wrappers
Diffstat (limited to 't/t5505-remote.sh')
-rwxr-xr-x | t/t5505-remote.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 949725e9bc..dd2e6ce34e 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -970,6 +970,15 @@ test_expect_success 'get-url on new remote' ' echo foo | get_url_test --push --all someremote ' +test_expect_success 'remote set-url with locked config' ' + test_when_finished "rm -f .git/config.lock" && + git config --get-all remote.someremote.url >expect && + >.git/config.lock && + test_must_fail git remote set-url someremote baz && + git config --get-all remote.someremote.url >actual && + cmp expect actual +' + test_expect_success 'remote set-url bar' ' git remote set-url someremote bar && echo bar >expect && |