Title: If `diff.external` is set, diffing via API fails silently as external tool isn't understood · Issue #1828 · gitpython-developers/GitPython · GitHub
Open Graph Title: If `diff.external` is set, diffing via API fails silently as external tool isn't understood · Issue #1828 · gitpython-developers/GitPython
X Title: If `diff.external` is set, diffing via API fails silently as external tool isn't understood · Issue #1828 · gitpython-developers/GitPython
Description: GitPython version: 3.1.42. from git import Repo repo = 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 [ Open Graph Description: GitPython version: 3.1.42. from git import Repo repo = Repo(".") print(repo.index.diff("HEAD")) print(repo.index.diff("HEAD", create_patch=True)) print(repo.index.diff(None)) print(repo.index.diff(...
X Description: GitPython version: 3.1.42. from git import Repo repo = Repo(".") print(repo.index.diff("HEAD")) print(repo.index.diff("HEAD", create_patch=True)) print(repo.index.diff...
Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/1828
X: @github
Domain: redirect.github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"If `diff.external` is set, diffing via API fails silently as external tool isn't understood","articleBody":"GitPython version: 3.1.42.\r\n\r\n```python\r\nfrom git import Repo\r\n\r\nrepo = Repo(\".\")\r\nprint(repo.index.diff(\"HEAD\"))\r\nprint(repo.index.diff(\"HEAD\", create_patch=True))\r\n\r\nprint(repo.index.diff(None))\r\nprint(repo.index.diff(None, create_patch=True))\r\n```\r\n\r\nprints\r\n\r\n```python\r\n[\u003cgit.diff.Diff object at 0x10cbb08b0\u003e]\r\n[]\r\n[\u003cgit.diff.Diff object at 0x103d49d30\u003e]\r\n[]\r\n```\r\n\r\n`R=True` workaround mentioned in #852 does not help either:\r\n\r\n```python\r\nprint(repo.index.diff(\"HEAD\", create_patch=True, R=True))\r\n# []\r\n```\r\n\r\nThis also happens when I try to diff tree against index or working tree\r\n\r\n```python\r\nprint(repo.head.commit.diff(None, create_patch=True))\r\nprint(repo.head.commit.diff(None))\r\n\r\nprint(repo.head.commit.diff())\r\nprint(repo.head.commit.diff(create_patch=True))\r\n\r\n```\r\n\r\nreturns\r\n\r\n```python\r\n[]\r\n[\u003cgit.diff.Diff object at 0x103d69670\u003e, \u003cgit.diff.Diff object at 0x103d699d0\u003e]\r\n[]\r\n[\u003cgit.diff.Diff object at 0x103d69700\u003e]\r\n```\r\n\r\nIt looks like using `create_patch=True` when comparison includes index or working tree always returns empty list. So right now only way to reliably use `create_patch=True` is to diff tree against tree.\r\n\r\n_Originally posted by @can-taslicukur in https://github.com/gitpython-developers/GitPython/issues/852#issuecomment-1951424734_\r\n ","author":{"url":"https://github.com/can-taslicukur","@type":"Person","name":"can-taslicukur"},"datePublished":"2024-02-18T20:18:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":17},"url":"https://github.com/1828/GitPython/issues/1828"}
route-pattern /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) route-controller voltron_issues_fragments route-action issue_layout fetch-nonce v2:8a37345b-5d2b-3b55-773a-b0c6b50e646d current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id E528:10DE44:105291F:1683B97:6969FA4C html-safe-nonce 1932e9ab845d7ac70883598a1b598b9536aef160d981627c1db03e67dd439ac1 visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTI4OjEwREU0NDoxMDUyOTFGOjE2ODNCOTc6Njk2OUZBNEMiLCJ2aXNpdG9yX2lkIjoiNTQ0MjIzOTU4ODk0MTI5ODI1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 visitor-hmac 3aafb1b1ccfc416d31ff3850f084eaaf16b53b4073f73d0203b52e6cc6faf6df hovercard-subject-tag issue:2141167425 github-keyboard-shortcuts repository,issues,copilot google-site-verification Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I octolytics-url https://collector.github.com/github/collect analytics-location / fb:app_id 1401488693436528 apple-itunes-app app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/gitpython-developers/GitPython/1828/issue_layout twitter:image https://opengraph.githubassets.com/05ca244a44eb8f559690d910b4d8932e1dbd1e9266941879aa1dd779074e977c/gitpython-developers/GitPython/issues/1828 twitter:card summary_large_image og:image https://opengraph.githubassets.com/05ca244a44eb8f559690d910b4d8932e1dbd1e9266941879aa1dd779074e977c/gitpython-developers/GitPython/issues/1828 og:image:alt GitPython version: 3.1.42. from git import Repo repo = Repo(".") print(repo.index.diff("HEAD")) print(repo.index.diff("HEAD", create_patch=True)) print(repo.index.diff(None)) print(repo.index.diff(... og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username can-taslicukur hostname github.com expected-hostname github.com None 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 turbo-cache-control no-preview go-import github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git octolytics-dimension-user_id 503709 octolytics-dimension-user_login gitpython-developers octolytics-dimension-repository_id 1126087 octolytics-dimension-repository_nwo gitpython-developers/GitPython octolytics-dimension-repository_public true octolytics-dimension-repository_is_fork false octolytics-dimension-repository_network_root_id 1126087 octolytics-dimension-repository_network_root_nwo gitpython-developers/GitPython turbo-body-classes logged-out env-production page-responsive disable-turbo false browser-stats-url https://api.github.com/_private/browser/stats browser-errors-url https://api.github.com/_private/browser/errors release bdde15ad1b403e23b08bbd89b53fbe6bdf688cad ui-target full theme-color #1e2327 color-scheme light dark
URLs of crawlers that visited me.