config.c: fix writing config files on Windows network shares
commit7a64592cf8cc559d6043500b8e77d1fed07c5ec2
authorKarsten Blees <karsten.blees@gmail.com>
Tue, 30 Jun 2015 14:34:13 +0000 (30 16:34 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 Jun 2015 18:01:59 +0000 (30 11:01 -0700)
treedb81b38ed7048d6df69aed9948284e7c86b9f294
parent351d06df519ee405a1926e0c6ee34d6a1dba6b46
config.c: fix writing config files on Windows network shares

Renaming to an existing file doesn't work on Windows network shares if the
target file is open.

munmap() the old config file before commit_lock_file.

Signed-off-by: Karsten Blees <blees@dcon.de>
Acked-by: Jeff King <peff@peff.net>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c