Title: Parsing error if there is/are git sub-repository · Issue #165 · gitonomy/gitlib · GitHub
Open Graph Title: Parsing error if there is/are git sub-repository · Issue #165 · gitonomy/gitlib
X Title: Parsing error if there is/are git sub-repository · Issue #165 · gitonomy/gitlib
Description: Dear Gentlemens! I start to use your products and I think it is briliant! I am working on a project where there are 2 sub-repositories in the git repository. If I start to use the $repository->getDiff() command it throws an excpetion bec...
Open Graph Description: Dear Gentlemens! I start to use your products and I think it is briliant! I am working on a project where there are 2 sub-repositories in the git repository. If I start to use the $repository->getD...
X Description: Dear Gentlemens! I start to use your products and I think it is briliant! I am working on a project where there are 2 sub-repositories in the git repository. If I start to use the $repository->g...
Opengraph URL: https://github.com/gitonomy/gitlib/issues/165
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Parsing error if there is/are git sub-repository","articleBody":"Dear Gentlemens!\r\n\r\nI start to use your products and I think it is briliant! I am working on a project where there are 2 sub-repositories in the git repository.\r\nIf I start to use the $repository-\u003egetDiff() command it throws an excpetion because of sub-repositry change.\r\n\r\nOnly what I've chenged in your source code and it looks like work:\r\nDiff parser:\r\nBase:\r\n```\r\n // 4. File informations\r\n $isBinary = false;\r\n if ($this-\u003eexpects('index ')) {\r\n $oldIndex = $this-\u003econsumeShortHash();\r\n $this-\u003econsume('..');\r\n $newIndex = $this-\u003econsumeShortHash();\r\n if ($this-\u003eexpects(' ')) {\r\n $vars = $this-\u003econsumeRegexp('/\\d{6}/');\r\n $newMode = $oldMode = $vars[0];\r\n }\r\n $this-\u003econsumeNewLine();\r\n \r\n if ($this-\u003eexpects('--- ')) {\r\n \t$oldName = $this-\u003econsumeTo(\"\\n\");\r\n $this-\u003econsumeNewLine();\r\n $this-\u003econsume('+++ ');\r\n $newName = $this-\u003econsumeTo(\"\\n\");\r\n $this-\u003econsumeNewLine();\r\n } elseif ($this-\u003eexpects('Binary files ')) {\r\n $vars = $this-\u003econsumeRegexp('/(.*) and (.*) differ\\n/');\r\n $isBinary = true;\r\n $oldName = $vars[1];\r\n $newName = $vars[2];\r\n\t }\r\n }\r\n```\r\nModified:\r\n```\r\n // 4. File informations\r\n $isBinary = false;\r\n if ($this-\u003eexpects('index ')) {\r\n $oldIndex = $this-\u003econsumeShortHash();\r\n $this-\u003econsume('..');\r\n $newIndex = $this-\u003econsumeShortHash();\r\n if ($this-\u003eexpects(' ')) {\r\n $vars = $this-\u003econsumeRegexp('/\\d{6}/');\r\n $newMode = $oldMode = $vars[0];\r\n }\r\n $this-\u003econsumeNewLine();\r\n }\r\n \r\n if ($this-\u003eexpects('--- ')) {\r\n \t$oldName = $this-\u003econsumeTo(\"\\n\");\r\n $this-\u003econsumeNewLine();\r\n $this-\u003econsume('+++ ');\r\n $newName = $this-\u003econsumeTo(\"\\n\");\r\n $this-\u003econsumeNewLine();\r\n } elseif ($this-\u003eexpects('Binary files ')) {\r\n $vars = $this-\u003econsumeRegexp('/(.*) and (.*) differ\\n/');\r\n $isBinary = true;\r\n $oldName = $vars[1];\r\n $newName = $vars[2];\r\n\t }\r\n```\r\n...so I just move `if ($this-\u003eexpects('--- ')) {` part out from condition:` if ($this-\u003eexpects('index ')) {`\r\n\r\nI am using version : ^1.2\r\n\r\nThanks","author":{"url":"https://github.com/aBanhidy","@type":"Person","name":"aBanhidy"},"datePublished":"2020-02-25T09:00:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/165/gitlib/issues/165"}
| 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:d3fe8d9b-364e-9a14-aff6-d12fe202923c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB1A:1B8E26:38202E0:48EE1C8:6974C7AD |
| html-safe-nonce | a62db47bcfe365a7a62181cd1c8066a8b9af03f403bda04fac3f121208505755 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjFBOjFCOEUyNjozODIwMkUwOjQ4RUUxQzg6Njk3NEM3QUQiLCJ2aXNpdG9yX2lkIjoiNzE3OTgwMzE2MTU1MDcwMjUwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9a22e5d69d676c5d7b652e651972a292686b385e3331894e1f33c8317a68902a |
| hovercard-subject-tag | issue:570411904 |
| 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/gitonomy/gitlib/165/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1fc9365593729ea876e7bd22e2388e94a3dd58b7cb6e8e4d35a9bfb8899574a2/gitonomy/gitlib/issues/165 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1fc9365593729ea876e7bd22e2388e94a3dd58b7cb6e8e4d35a9bfb8899574a2/gitonomy/gitlib/issues/165 |
| og:image:alt | Dear Gentlemens! I start to use your products and I think it is briliant! I am working on a project where there are 2 sub-repositories in the git repository. If I start to use the $repository->getD... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aBanhidy |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-preview |
| go-import | github.com/gitonomy/gitlib git https://github.com/gitonomy/gitlib.git |
| octolytics-dimension-user_id | 2288721 |
| octolytics-dimension-user_login | gitonomy |
| octolytics-dimension-repository_id | 5709354 |
| octolytics-dimension-repository_nwo | gitonomy/gitlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 5709354 |
| octolytics-dimension-repository_network_root_nwo | gitonomy/gitlib |
| 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 | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width