OSDN Git Service

init-db: die on config errors when initializing empty repo
authorPatrick Steinhardt <ps@pks.im>
Mon, 22 Feb 2016 11:23:32 +0000 (12:23 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Feb 2016 18:23:54 +0000 (10:23 -0800)
commit695009bc09a667899d06cda44956fea00ab153ab
treeb5dc3499636f8a08c3bd44c7c706c971c5e75aad
parent2ee35c428e0685b4fc3bc2e828326b6fcefb78c0
init-db: die on config errors when initializing empty repo

When creating an empty repository with `git init-db` we do not
check for error codes returned by `git_config_set` functions.
This may cause the user to end up with an inconsistent repository
without any indication for the user.

Fix this problem by dying early with an error message when we are
unable to write the configuration files to disk.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/init-db.c