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

Ifdiff.external is set, diffing via API fails silently as external tool isn't understood #1828

Closed
@can-taslicukur

Description

@can-taslicukur

GitPython version: 3.1.42.

fromgitimportReporepo=Repo(".")print(repo.index.diff("HEAD"))print(repo.index.diff("HEAD",create_patch=True))print(repo.index.diff(None))print(repo.index.diff(None,create_patch=True))

prints

[<git.diff.Diffobjectat0x10cbb08b0>][][<git.diff.Diffobjectat0x103d49d30>][]

R=True workaround mentioned in#852 does not help either:

print(repo.index.diff("HEAD",create_patch=True,R=True))# []

This also happens when I try to diff tree against index or working tree

print(repo.head.commit.diff(None,create_patch=True))print(repo.head.commit.diff(None))print(repo.head.commit.diff())print(repo.head.commit.diff(create_patch=True))

returns

[][<git.diff.Diffobjectat0x103d69670>,<git.diff.Diffobjectat0x103d699d0>][][<git.diff.Diffobjectat0x103d69700>]

It looks like usingcreate_patch=True when comparison includes index or working tree always returns empty list. So right now only way to reliably usecreate_patch=True is to diff tree against tree.

Originally posted by@can-taslicukur in#852 (comment)

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