MCPcopy Create free account
hub / github.com/git/git / reopen_lock_file

Function reopen_lock_file

lockfile.h:311–314  ·  view source on GitHub ↗

* Re-open a lockfile that has been closed using `close_lock_file_gently()` * but not yet committed or rolled back. This can be used to implement * a sequence of operations like the following: * * * Lock file. * * * Write new contents to lockfile, then `close_lock_file_gently()` to * cause the contents to be written to disk. * * * Pass the name of the lockfile to another program to allow

Source from the content-addressed store, hash-verified

309 * * `commit_lock_file()` to make the final version permanent.
310 */
311static inline int reopen_lock_file(struct lock_file *lk)
312{
313 return reopen_tempfile(lk->tempfile);
314}
315
316/*
317 * Commit the change represented by `lk`: close the file descriptor

Callers 1

prepare_indexFunction · 0.85

Calls 1

reopen_tempfileFunction · 0.85

Tested by

no test coverage detected