Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

issue with diff method #501

Open
Open
@valeriocos

Description

@valeriocos

I'm using gitpython to collect diff information between a commit and his parent.
Generally, the following code works fine when the number of diffs to retrieve is small:
diffs = c.parents[0].diff(c, create_patch=True)
Conversely, when the number of diffs is huge (https://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=f5f817279baa2008450aa32b18e576c2fcda02bb), that code is not able to produce an output after 24h (at least).
Is there another way I could use to retrieve the diff information between two commits?

Below you can find the code to replicate this behaviour:

fromgitimport*REPO_PATH=""C:/Users/.../org.eclipse.papyrus"" (youcancloneitfromhere:https://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/)BRANCH="2.0.0"defmain():repo=Repo(REPO_PATH,odbt=GitCmdObjectDB)reference= [rforrinrepo.referencesifr.name==BRANCH][0]forcinrepo.iter_commits(rev=reference):ifc.hexsha=='f5f817279baa2008450aa32b18e576c2fcda02bb':diffs=c.parents[0].diff(c,create_patch=True)printstr(len(diffs))breakif__name__=="__main__":main()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp