By writing the temporary overflow merge result to $GIT_DIR JGit
can ensure the same filesystem permissions apply to protect the
file contents.
If no directory is available from the repository (e.g. DfsRepository)
null will be passed and the system temporary directory will be used
instead.
Change-Id: I95532aa092676d18f1dc1e3fdbe6dcb1f91b782e
private ObjectId insertMergeResult(MergeResult<RawText> result)
throws IOException {
- TemporaryBuffer.LocalFile buf = new TemporaryBuffer.LocalFile(10 << 20);
+ TemporaryBuffer.LocalFile buf = new TemporaryBuffer.LocalFile(
+ db.getDirectory(), 10 << 20);
try {
new MergeFormatter().formatMerge(buf, result,
Arrays.asList(commitNames), CHARACTER_ENCODING);