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: togithub.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:e48a406b-ef65-065e-1ff0-1bd9a04d9807 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id E556:3244AB:22E31B:2F06BE:6969786E html-safe-nonce ce25eb1d33225e8b2bd715b88fd4c1a981670c0a37341497fa1a9ed797378b72 visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTU2OjMyNDRBQjoyMkUzMUI6MkYwNkJFOjY5Njk3ODZFIiwidmlzaXRvcl9pZCI6IjYxOTg5OTc3ODQyNTc4MDMzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 visitor-hmac 0b34975d102f9313ae973163a1de7030ad834c0c0906562045ae52c65cd3fee8 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 c6f193beb8ff08443adc07685d75302ab8aaf0a135f6e251c3ff3112c8deb881 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 212e3e3d3298bf5b313830edfd2399e869f7ea76 ui-target full theme-color #1e2327 color-scheme light dark
URLs of crawlers that visited me.