1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-13 20:53:02 +01:00
git/Documentation/technical
Michael Haggerty 8e86c155d2 close_lock_file(): if close fails, roll back
If closing an open lockfile fails, then we cannot be sure of the
contents of the lockfile, so there is nothing sensible to do but
delete it. This change also insures that the lock_file object is left
in a defined state in this error path (namely, unlocked).

The only caller that is ultimately affected by this change is
try_merge_strategy() -> write_locked_index(), which can call
close_lock_file() via various execution paths. This caller uses a
static lock_file object which previously could have been reused after
a failed close_lock_file() even though it was still in locked state.
This change causes the lock_file object to be unlocked on failure,
thus fixing this error-handling path.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-01 13:45:13 -07:00
..
.gitignore
api-allocation-growing.txt add macro REALLOC_ARRAY 2014-09-18 09:13:38 -07:00
api-argv-array.txt
api-builtin.txt
api-config.txt Merge branch 'ta/config-set-1' 2014-09-11 10:33:25 -07:00
api-credentials.txt
api-decorate.txt
api-diff.txt
api-directory-listing.txt
api-gitattributes.txt
api-grep.txt
api-hashmap.txt
api-history-graph.txt
api-in-core-index.txt
api-index-skel.txt
api-index.sh
api-lockfile.txt close_lock_file(): if close fails, roll back 2014-10-01 13:45:13 -07:00
api-merge.txt
api-object-access.txt
api-parse-options.txt
api-quote.txt
api-ref-iteration.txt
api-remote.txt
api-revision-walking.txt
api-run-command.txt run-command: introduce child_process_init() 2014-08-20 09:54:58 -07:00
api-setup.txt
api-sha1-array.txt
api-sigchain.txt
api-strbuf.txt Merge branch 'rs/export-strbuf-addchars' 2014-09-19 11:38:39 -07:00
api-string-list.txt string-list: add string_list initializer helper function 2014-07-21 10:23:36 -07:00
api-trace.txt api-trace.txt: add trace API documentation 2014-07-13 21:25:21 -07:00
api-tree-walking.txt
api-xdiff-interface.txt
bitmap-format.txt
http-protocol.txt
index-format.txt
pack-format.txt
pack-heuristics.txt
pack-protocol.txt Document LF appearing in shallow command during send-pack/receive-pack 2014-08-28 15:13:55 -07:00
protocol-capabilities.txt
protocol-common.txt
racy-git.txt
send-pack-pipeline.txt
shallow.txt
trivial-merge.txt