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: 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:53f98c14-6211-c644-ff4a-c854cacc68f3 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id A6EA:13289:56CF83:78CC0B:6968CB3B html-safe-nonce dc2b03fb0496ac21688ab41d4c97cdce0420ff7d280376a0cef2f68e713642c7 visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNkVBOjEzMjg5OjU2Q0Y4Mzo3OENDMEI6Njk2OENCM0IiLCJ2aXNpdG9yX2lkIjoiNTY5MDEyMjc1MDI1NjUzMjI4MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 visitor-hmac c366e1b6b4c5a6df27e0c53b1a4c58af311c85808d41c7714abc284c94d920d2 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 af2d7af0cc84117fa10bf36808605ef68a335c9d8a804b9cdac55f8d77230b00 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 cc844ab6ee0198cc2e2c142dcb8a5c2a61d48743 ui-target canary-1 theme-color #1e2327 color-scheme light dark
URLs of crawlers that visited me.