]> git.ipfire.org Git - thirdparty/git.git/commit
remote: die on config error when setting URL
authorPatrick Steinhardt <ps@pks.im>
Mon, 22 Feb 2016 11:23:28 +0000 (12:23 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Feb 2016 18:23:52 +0000 (10:23 -0800)
commit45ebdcc99a8d8e7c671eb1db1212d90f5f2db341
tree4ef31953f9eb62f517d24bd40f4af045b4911539
parent15b92fc05239a3c4f9af6177c1bfae1bcf2d5dce
remote: die on config error when setting URL

When invoking `git-remote --set-url` we do not check the return
value when writing the actual new URL to the configuration file,
pretending to the user that the configuration has been set while
it was in fact not persisted.

Fix this problem by dying early when setting the config fails.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/remote.c
t/t5505-remote.sh