Skip to content

git bare repo not supported #52

@glensc

Description

@glensc

seems git-bzr can't work well with bare repos, because it assumes root_dir = parent dir of git dir, which is not true for bare repos

def git_dir(self, path=None):
  if not self._git_dir:
    self._git_dir = os.path.abspath(git(['rev-parse', '--git-dir']).strip())
  if path:
    return os.path.join(self._git_dir, path)
  return self._git_dir

def root_dir(self, path=None):
  if not self._root_dir:
    self._root_dir = os.path.dirname(self.git_dir())
  if path:
    return os.path.join(self._root_dir, path)
  return self._root_dir

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions