def ReleaseBdevPartitionMapping(loop_dev_path):
  result = utils_process.RunCmd(["kpartx", "-d", loop_dev_path])
  if result.failed:
    raise errors.CommandError("Failed to release partition mapping of %s: %s" %
                              (loop_dev_path, result.output))

  # The invocation of udevadm settle was added here because users had issues
  # with the loopback device still being busy after kpartx / earlier commands
  # did their work.
  result = utils_process.RunCmd(["udevadm", "settle"])
  if result.failed:
    raise errors.CommandError("Waiting on udev failed: %s" % result.output)

  result = utils_process.RunCmd(["losetup", "-d", loop_dev_path])
  if result.failed:
    raise errors.CommandError("Failed to detach %s: %s" %
                              (loop_dev_path, result.output))
Returns a list of branches in the git repository.
dataset/ETHPy150Open ganeti/ganeti/lib/utils/storage.py/ReleaseBdevPartitionMapping--crossover with--dataset/ETHPy150Open ros-infrastructure/bloom/bloom/git.py/get_branches