diff options
| author | Russell Belfer <rb@github.com> | 2013-09-06 14:13:12 -0700 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2013-09-06 14:13:12 -0700 |
| commit | 97affdf2134d91c88fca6adbb6eeb0d990d01a31 (patch) | |
| tree | bd6682f4c713b9a012582a0cffe60137c24b235d /include/git2 | |
| parent | 366bd2f43dd6f74916b995340d62966fcd535b76 (diff) | |
| parent | 4047950f30618c160cd2fdf5da39fb8e26b031d9 (diff) | |
| download | libgit2-97affdf2134d91c88fca6adbb6eeb0d990d01a31.tar.gz | |
Merge pull request #1815 from libgit2/ntk/topic/stream_write/check_before_overwriting
Ask the odbbackend if the object exists before overwriting it
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/odb_backend.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/git2/odb_backend.h b/include/git2/odb_backend.h index 7b3c6a356..bafeec047 100644 --- a/include/git2/odb_backend.h +++ b/include/git2/odb_backend.h @@ -92,6 +92,10 @@ struct git_odb_stream { /** * Store the contents of the stream as an object with the id * specified in `oid`. + * + * This method will *not* be invoked by libgit2 if the object pointed at + * by `oid` already exists in any backend. Libgit2 will however take care + * of properly disposing the stream through a call to `free()`. */ int (*finalize_write)(git_odb_stream *stream, const git_oid *oid); |
