-
-
Notifications
You must be signed in to change notification settings - Fork 964
Description
I'm using GitPython to pull all commits of a repository.
I don't understand why the commits shared between two branches belong to the last generated branch (which contains these commits) and not to the original branch.
For example, I have a repository with a master branch from which they originate a branch named branch2. When I fetch the commits via repo.iter_commits('--all', reverse=True) I have the rev_name of the shared commits as branch2 and not master as I would have expected (branch where the commits were originally created).
Is there a way to get the original branch name?
Of course, I can't check whether the branch name is master, because any other branch creations would have the same problem.
EDIT:
I encountered an additional problem, if there are tags to some commits of the repository, they are used as "branch names". How to fix?