Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Wrong association between commit and repository #1593

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nricciardi opened this issue May 20, 2023 · 0 comments
Closed

Wrong association between commit and repository #1593

nricciardi opened this issue May 20, 2023 · 0 comments

Comments

@nricciardi
Copy link

nricciardi commented May 20, 2023

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?

@gitpython-developers gitpython-developers locked and limited conversation to collaborators May 21, 2023
@Byron Byron converted this issue into discussion #1595 May 21, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Development

No branches or pull requests

1 participant