1
0
mirror of https://github.com/git/git.git synced 2024-11-20 08:53:57 +01:00
git/Documentation/technical
Brandon Casey d6cf61bfd4 close_lock_file(): new function in the lockfile API
The lockfile API is a handy way to obtain a file that is cleaned
up if you die().  But sometimes you would need this sequence to
work:

 1. hold_lock_file_for_update() to get a file descriptor for
    writing;

 2. write the contents out, without being able to decide if the
    results should be committed or rolled back;

 3. do something else that makes the decision --- and this
    "something else" needs the lockfile not to have an open file
    descriptor for writing (e.g. Windows do not want a open file
    to be renamed);

 4. call commit_lock_file() or rollback_lock_file() as
    appropriately.

This adds close_lock_file() you can call between step 2 and 3 in
the above sequence.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-16 15:35:03 -08:00
..
.gitignore
api-allocation-growing.txt
api-builtin.txt
api-decorate.txt
api-diff.txt Documentation: typofix 2008-01-07 14:02:00 -08:00
api-directory-listing.txt
api-gitattributes.txt
api-grep.txt
api-hash.txt
api-in-core-index.txt
api-index-skel.txt
api-index.sh
api-lockfile.txt close_lock_file(): new function in the lockfile API 2008-01-16 15:35:03 -08:00
api-object-access.txt
api-parse-options.txt
api-path-list.txt
api-quote.txt
api-revision-walking.txt
api-run-command.txt
api-setup.txt
api-strbuf.txt
api-tree-walking.txt
api-xdiff-interface.txt
pack-format.txt Documentation: typofix 2008-01-07 14:02:00 -08:00
pack-heuristics.txt
pack-protocol.txt
racy-git.txt
send-pack-pipeline.txt
shallow.txt
trivial-merge.txt