diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-09-24 19:30:46 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-09-24 19:30:46 +0200 |
commit | 48a81ed29795da3e4cc40d4e5ea535878e4f2d9f (patch) | |
tree | 0bbe3588f5728fa03ae0ef69dc9111ef91479a83 /tempfile.h | |
parent | Merge branch 'bp/mv-submodules-with-fsmonitor' (diff) | |
parent | reopen_tempfile(): truncate opened file (diff) | |
download | git-48a81ed29795da3e4cc40d4e5ea535878e4f2d9f.tar.xz git-48a81ed29795da3e4cc40d4e5ea535878e4f2d9f.zip |
Merge branch 'jk/reopen-tempfile-truncate'
Fix for a long-standing bug that leaves the index file corrupt when
it shrinks during a partial commit.
* jk/reopen-tempfile-truncate:
reopen_tempfile(): truncate opened file
Diffstat (limited to 'tempfile.h')
-rw-r--r-- | tempfile.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tempfile.h b/tempfile.h index 36434eb6fa..61d8dc4d1b 100644 --- a/tempfile.h +++ b/tempfile.h @@ -236,8 +236,8 @@ extern int close_tempfile_gently(struct tempfile *tempfile); * it (and nobody else) to inspect or even modify the file's * contents. * - * * `reopen_tempfile()` to reopen the temporary file. Make further - * updates to the contents. + * * `reopen_tempfile()` to reopen the temporary file, truncating the existing + * contents. Write out the new contents. * * * `rename_tempfile()` to move the file to its permanent location. */ |