summaryrefslogtreecommitdiff
path: root/tempfile.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-09-24 17:30:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-09-24 17:30:46 (GMT)
commit48a81ed29795da3e4cc40d4e5ea535878e4f2d9f (patch)
tree0bbe3588f5728fa03ae0ef69dc9111ef91479a83 /tempfile.h
parent9715f10e4206c681313d45efa239a594a0027e60 (diff)
parent6c003d6ffb7ebd1599e73921cab5e01d7428001d (diff)
downloadgit-48a81ed29795da3e4cc40d4e5ea535878e4f2d9f.zip
git-48a81ed29795da3e4cc40d4e5ea535878e4f2d9f.tar.gz
git-48a81ed29795da3e4cc40d4e5ea535878e4f2d9f.tar.bz2
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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tempfile.h b/tempfile.h
index 36434eb..61d8dc4 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.
*/