#338 Load branch remote from repo refs directly
Closed 5 years ago Opened 5 years ago by cqi.

local_branch_remote loads remote name from repo's config branch.*.remote. If there is no such config item, default to origin. This logic seems depend on switching to a release branch in advance.

However, instead, this logic might be rewritten by reading from refs directly, for example with GitPython

import git
repo = git.Repo('/path/to/repo')
for ref in git.refs:
    ...

The original problem is not clear for now. Close this issue.

Metadata Update from @cqi:
- Issue status updated to: Closed (was: Open)

5 years ago

Login to comment on this ticket.

Metadata