Title: libgit2 doesn't handle .gitignore/exclude patterns with a trailing slash and white space · Issue #4610 · libgit2/libgit2 · GitHub
Open Graph Title: libgit2 doesn't handle .gitignore/exclude patterns with a trailing slash and white space · Issue #4610 · libgit2/libgit2
X Title: libgit2 doesn't handle .gitignore/exclude patterns with a trailing slash and white space · Issue #4610 · libgit2/libgit2
Description: How "fun"... 😔 Reproduction steps Execute: git init test-repo && cd test-repo mkdir spam touch spam/ham.c echo "spam/ " > .gitignore git status --ignored shows that "spam/" is ignored. With pygit2: >>> from pygit2 import Repository >>> r...
Open Graph Description: How "fun"... 😔 Reproduction steps Execute: git init test-repo && cd test-repo mkdir spam touch spam/ham.c echo "spam/ " > .gitignore git status --ignored shows that "spam/" is ignored. With pygit2:...
X Description: How "fun"... 😔 Reproduction steps Execute: git init test-repo && cd test-repo mkdir spam touch spam/ham.c echo "spam/ " > .gitignore git status --ignored shows that &...
Opengraph URL: https://github.com/libgit2/libgit2/issues/4610
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"libgit2 doesn't handle .gitignore/exclude patterns with a trailing slash and white space","articleBody":"How \"fun\"... 😔 \r\n\r\n### Reproduction steps\r\n1. Execute:\r\n ```sh\r\n git init test-repo \u0026\u0026 cd test-repo\r\n mkdir spam\r\n touch spam/ham.c\r\n echo \"spam/ \" \u003e .gitignore\r\n ```\r\n2. `git status --ignored` shows that \"spam/\" is ignored.\r\n3. With `pygit2`:\r\n ```py\r\n \u003e\u003e\u003e from pygit2 import Repository\r\n \u003e\u003e\u003e r = Repository('.')\r\n \u003e\u003e\u003e r.path_is_ignored('spam')\r\n False\r\n \u003e\u003e\u003e r.path_is_ignored('spam/ham.c')\r\n False\r\n ```\r\n\r\n### Expected behavior\r\nThe spam directory should be ignored.\r\n\r\n### Actual behavior\r\nIt isn't.\r\n\r\n### Version of libgit2 (release number or SHA1)\r\nTested both v0.27.0 and master at d9007dc8520942763a21e4058dfa8f159f3e3c56.\r\n\r\n### Operating system(s) tested\r\nUbuntu 16.04 amd64\r\nWindows 10.0.16299.334 x64\r\n\r\n### Related\r\nhttps://github.com/libgit2/libgit2/issues/4309\r\nhttps://github.com/libgit2/libgit2/commit/5cb6a2c946a071d43be3cdabf2f6d4417a4be694\r\n\r\ncc @pks-t @novalis ","author":{"url":"https://github.com/segevfiner","@type":"Person","name":"segevfiner"},"datePublished":"2018-04-03T12:55:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/4610/libgit2/issues/4610"}
| 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:1ee89503-97e6-4222-dc96-78ba77739074 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D430:266F67:5899958:760AA3C:6A5DD173 |
| html-safe-nonce | cbd9cebb7cad6455e898515718a93e57e6c455a0a9d42904ac18dbaf685ddf25 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENDMwOjI2NkY2Nzo1ODk5OTU4Ojc2MEFBM0M6NkE1REQxNzMiLCJ2aXNpdG9yX2lkIjoiMTkxMTQwNjQ3MzA5NzYzMDA2NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9d1b8f56e8ea9c971560244d764b65164214439ccb5630cea20f91203a54f0fc |
| hovercard-subject-tag | issue:310824896 |
| 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/libgit2/libgit2/4610/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6c5156b746e3fe4a1684c9213ccdc278d01ef2c947aec5628d3be23f301dd9ee/libgit2/libgit2/issues/4610 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6c5156b746e3fe4a1684c9213ccdc278d01ef2c947aec5628d3be23f301dd9ee/libgit2/libgit2/issues/4610 |
| og:image:alt | How "fun"... 😔 Reproduction steps Execute: git init test-repo && cd test-repo mkdir spam touch spam/ham.c echo "spam/ " > .gitignore git status --ignored shows that "spam/" is ignored. With pygit2:... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | segevfiner |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/libgit2/libgit2 git https://github.com/libgit2/libgit2.git |
| octolytics-dimension-user_id | 394745 |
| octolytics-dimension-user_login | libgit2 |
| octolytics-dimension-repository_id | 901662 |
| octolytics-dimension-repository_nwo | libgit2/libgit2 |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 901662 |
| octolytics-dimension-repository_network_root_nwo | libgit2/libgit2 |
| 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 | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width