Browse Source

Merge branch 'kb/config-unmap-before-renaming' into maint

"git config" failed to update the configuration file when the
underlying filesystem is incapable of renaming a file that is still
open.

* kb/config-unmap-before-renaming:
  config.c: fix writing config files on Windows network shares
maint
Junio C Hamano 9 years ago
parent
commit
6f402a93ce
  1. 3
      config.c

3
config.c

@ -2116,6 +2116,9 @@ int git_config_set_multivar_in_file(const char *config_filename, @@ -2116,6 +2116,9 @@ int git_config_set_multivar_in_file(const char *config_filename,
contents_sz - copy_begin) <
contents_sz - copy_begin)
goto write_err_out;

munmap(contents, contents_sz);
contents = NULL;
}

if (commit_lock_file(lock) < 0) {

Loading…
Cancel
Save