async function mergeBlobs({
  fs,
  gitdir,
  path,
  ours,
  base,
  theirs,
  ourName,
  theirName,
  baseName,
  dryRun,
  mergeDriver = mergeFile,
}) {
  const type = 'blob'
  // Compute the new mode.
  // Since there are ONLY two valid blob modes ('100755' and '100644') it boils down to this
  const mode =
    (await base.mode()) === (await ours.mode())
      ? await theirs.mode()
      : await ours.mode()
  // The trivial case: nothing to merge except maybe mode
  if ((await ours.oid()) === (await theirs.oid())) {
    return {
      cleanMerge: true,
      mergeResult: { mode, path, oid: await ours.oid(), type },
    }
  }
  // if only one side made oid changes, return that side's oid
  if ((await ours.oid()) === (await base.oid())) {
    return {
      cleanMerge: true,
      mergeResult: { mode, path, oid: await theirs.oid(), type },
    }
  }
  if ((await theirs.oid()) === (await base.oid())) {
    return {
      cleanMerge: true,
      mergeResult: { mode, path, oid: await ours.oid(), type },
    }
  }
  // if both sides made changes do a merge
  const ourContent = Buffer.from(await ours.content()).toString('utf8')
  const baseContent = Buffer.from(await base.content()).toString('utf8')
  const theirContent = Buffer.from(await theirs.content()).toString('utf8')
  const { mergedText, cleanMerge } = await mergeDriver({
    branches: [baseName, ourName, theirName],
    contents: [baseContent, ourContent, theirContent],
    path,
  })
  const oid = await writeObject({
    fs,
    gitdir,
    type: 'blob',
    object: Buffer.from(mergedText, 'utf8'),
    dryRun,
  })

  return { cleanMerge, mergeResult: { mode, path, oid, type } }
}
@param {Object} args
@param {import('../models/FileSystem').FileSystem} args.fs
@param {string} args.gitdir
@param {string} args.path
@param {WalkerEntry} args.ours
@param {WalkerEntry} args.base
@param {WalkerEntry} args.theirs
@param {string} [args.ourName]
@param {string} [args.baseName]
@param {string} [args.theirName]
@param {boolean} [args.dryRun = false]
@param {MergeDriverCallback} [args.mergeDriver]