void (String line, Key outputType) { if (outputType != ProcessOutputTypes.STDOUT) return; if (!line.contains(blob)) return; if (pathAmbiguous[0]) return; GitIndexUtil.StagedFileOrDirectory stagedFile = GitIndexUtil.parseListTreeRecord(root, line); if (stagedFile instanceof GitIndexUtil.StagedFile && blob.equals(((GitIndexUtil.StagedFile)stagedFile).getBlobHash())) { if (result[0] == null) { result[0] = stagedFile.getPath(); } else { // there are multiple files with given content in this revision. // we don't know which is right, so do not return any pathAmbiguous[0] = true; } } }