diff options
author | Brandon Casey <casey@nrlssc.navy.mil> | 2008-01-16 11:05:32 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-01-16 15:35:03 -0800 |
commit | d6cf61bfd4bccffcc8b095f8469dbe749d70abdf (patch) | |
tree | 4f330d67ce37d7319494e8f8a71005f4d733c2e0 /Documentation/technical/api-allocation-growing.txt | |
parent | Document lockfile API (diff) | |
download | tgif-d6cf61bfd4bccffcc8b095f8469dbe749d70abdf.tar.xz |
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>
Diffstat (limited to 'Documentation/technical/api-allocation-growing.txt')
0 files changed, 0 insertions, 0 deletions