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

Accessing files committed by initial commit with GitPython #364

Closed
@sztankatt

Description

@sztankatt

I'm using GitPython for working with a git repository. To list the files added/deleted/changed I use the following code:

diff_files = []for parent in commit.parents:    diff_files += [x.b_path for x in commit.diff(parent)]

However, the first commit doesn't have any parents, so this approach fails. Any ideas how might I do it in a different way?

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