Title: I think I found a bug in the diff('diff-against') function regarding reversing ordering... by tomrittervg · Pull Request #40 · gitpython-developers/GitPython · GitHub
Open Graph Title: I think I found a bug in the diff('diff-against') function regarding reversing ordering... by tomrittervg · Pull Request #40 · gitpython-developers/GitPython
X Title: I think I found a bug in the diff('diff-against') function regarding reversing ordering... by tomrittervg · Pull Request #40 · gitpython-developers/GitPython
Description: Pull this repo: https://github.com/tomrittervg/Code-Audit-Feed-Test-Cases Now do this: $ python import git as pygit c = pygit.Repo('github.com-tomrittervg-Code-Audit-Feed-Test-Cases.git/') x = c.commit('4aee3ae658c1320619432817d63ec7adabf0f43a') p = [i for i in x.diff('HEAD~1')][0] That is this commit: tomrittervg/Code-Audit-Feed-Test-Cases@4aee3ae This is the addition of a single file. Unless I'm misunderstanding git, as well as this documentation: http://packages.python.org/GitPython/0.3.1/tutorial.html#obtaining-diff-information tdiff = hcommit.diff('HEAD~1') # diff tree against previous tree x.diff('HEAD~1') ought to give a 'new_file' commit But it was reversing the commit. It ran this: git diff 4aee3ae658c1320619432817d63ec7adabf0f43a HEAD~1 --abbrev=40 --full-index --raw producing :100644 000000 5f9b998a3e2916af6671a0f8d296ad7c1fe1490d 0000000000000000000000000000000000000000 D api-call-test.c When it should be running this: git diff HEAD~1 4aee3ae658c1320619432817d63ec7adabf0f43a --abbrev=40 --full-index --raw producing this: :000000 100644 0000000000000000000000000000000000000000 5f9b998a3e2916af6671a0f8d296ad7c1fe1490d A api-call-test.c I changed the order of arguments to get it to give a file addition. This would also affect which diff the a_blob and b_blob in a 'M' and how a 'R' behaves... I think.
Open Graph Description: Pull this repo: https://github.com/tomrittervg/Code-Audit-Feed-Test-Cases Now do this: $ python import git as pygit c = pygit.Repo('github.com-tomrittervg-Code-Audit-Feed-Test-Cases.git/'...
X Description: Pull this repo: https://github.com/tomrittervg/Code-Audit-Feed-Test-Cases Now do this: $ python import git as pygit c = pygit.Repo('github.com-tomrittervg-Code-Audit-Feed-Test-Cases.git/...
Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/40
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f0fe5a99-3267-74e1-6a4a-5dea14e9ae0a |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9AD0:1089BF:488E6:62A77:6A62F697 |
| html-safe-nonce | 5e5bc97c30e5e84dc6ca9a78169fdbc97c758a21d683c93fc3fea4b2e54357fa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QUQwOjEwODlCRjo0ODhFNjo2MkE3Nzo2QTYyRjY5NyIsInZpc2l0b3JfaWQiOiI2ODI1NzgxMTg3ODg0MjgzNTQzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6e15e6d5f0d05dbcc513a9abcf368ec08a059f3d7d655c00dd5f78ab22cfa374 |
| hovercard-subject-tag | pull_request:613154 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/gitpython-developers/GitPython/pull/40/files |
| twitter:image | https://avatars.githubusercontent.com/u/163497?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/163497?s=400&v=4 |
| og:image:alt | Pull this repo: https://github.com/tomrittervg/Code-Audit-Feed-Test-Cases Now do this: $ python import git as pygit c = pygit.Repo('github.com-tomrittervg-Code-Audit-Feed-Test-Cases.git/'... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b415018e190e73858133ddcaa36acce7b3f3572fe54dda84bd3b21a6ec714c30 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 22f98521e99f504294ab0812b66104d50eb75a70 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width