diff options
author | Edward Thomson <ethomson@microsoft.com> | 2013-11-04 18:28:57 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@microsoft.com> | 2013-11-04 22:33:05 -0500 |
commit | 1d3a8aeb4bd032d0bf34039fbcb308fba06b862a (patch) | |
tree | 8e9165cfd8c4c3919abd2d4f301b1f45e281d5eb /src/odb_loose.c | |
parent | f966acd13366d21e0b9beeecf021c0114596c716 (diff) | |
download | libgit2-1d3a8aeb4bd032d0bf34039fbcb308fba06b862a.tar.gz |
move mode_t to filebuf_open instead of _commit
Diffstat (limited to 'src/odb_loose.c')
-rw-r--r-- | src/odb_loose.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/odb_loose.c b/src/odb_loose.c index 3e52edf05..ced272b33 100644 --- a/src/odb_loose.c +++ b/src/odb_loose.c @@ -789,7 +789,7 @@ static int loose_backend__stream_fwrite(git_odb_stream *_stream, const git_oid * error = -1; else error = git_filebuf_commit_at( - &stream->fbuf, final_path.ptr, backend->object_file_mode); + &stream->fbuf, final_path.ptr); git_buf_free(&final_path); @@ -838,7 +838,8 @@ static int loose_backend__stream(git_odb_stream **stream_out, git_odb_backend *_ if (git_buf_joinpath(&tmp_path, backend->objects_dir, "tmp_object") < 0 || git_filebuf_open(&stream->fbuf, tmp_path.ptr, GIT_FILEBUF_TEMPORARY | - (backend->object_zlib_level << GIT_FILEBUF_DEFLATE_SHIFT)) < 0 || + (backend->object_zlib_level << GIT_FILEBUF_DEFLATE_SHIFT), + backend->object_file_mode) < 0 || stream->stream.write((git_odb_stream *)stream, hdr, hdrlen) < 0) { git_filebuf_cleanup(&stream->fbuf); @@ -867,7 +868,8 @@ static int loose_backend__write(git_odb_backend *_backend, const git_oid *oid, c if (git_buf_joinpath(&final_path, backend->objects_dir, "tmp_object") < 0 || git_filebuf_open(&fbuf, final_path.ptr, GIT_FILEBUF_TEMPORARY | - (backend->object_zlib_level << GIT_FILEBUF_DEFLATE_SHIFT)) < 0) + (backend->object_zlib_level << GIT_FILEBUF_DEFLATE_SHIFT), + backend->object_file_mode) < 0) { error = -1; goto cleanup; @@ -878,7 +880,7 @@ static int loose_backend__write(git_odb_backend *_backend, const git_oid *oid, c if (object_file_name(&final_path, backend, oid) < 0 || object_mkdir(&final_path, backend) < 0 || - git_filebuf_commit_at(&fbuf, final_path.ptr, backend->object_file_mode) < 0) + git_filebuf_commit_at(&fbuf, final_path.ptr) < 0) error = -1; cleanup: |