Skip to content

Commit

Permalink
Merge branch 'kb/config-unmap-before-renaming'
Browse files Browse the repository at this point in the history
"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
  • Loading branch information
Junio C Hamano committed Jul 13, 2015
2 parents d790ba9 + 7a64592 commit 313f523
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config.c
Original file line number Diff line number Diff line change
Expand Up @@ -2118,6 +2118,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) {
Expand Down

0 comments on commit 313f523

Please sign in to comment.