Title: Configuration file: Incorrect matching of conditional includes · Issue #5068 · libgit2/libgit2 · GitHub
Open Graph Title: Configuration file: Incorrect matching of conditional includes · Issue #5068 · libgit2/libgit2
X Title: Configuration file: Incorrect matching of conditional includes · Issue #5068 · libgit2/libgit2
Description: Reproduction steps libgit2 uses FNM_PATHNAME|FNM_LEADING_DIR fnmatch flags to match the conditional include pattern, but it seems that git does not do so. libgit2 matches a directory prefix of git directory while git does not. libgit2 do...
Open Graph Description: Reproduction steps libgit2 uses FNM_PATHNAME|FNM_LEADING_DIR fnmatch flags to match the conditional include pattern, but it seems that git does not do so. libgit2 matches a directory prefix of git ...
X Description: Reproduction steps libgit2 uses FNM_PATHNAME|FNM_LEADING_DIR fnmatch flags to match the conditional include pattern, but it seems that git does not do so. libgit2 matches a directory prefix of git ...
Opengraph URL: https://github.com/libgit2/libgit2/issues/5068
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Configuration file: Incorrect matching of conditional includes","articleBody":"### Reproduction steps\r\n\r\n`libgit2` uses `FNM_PATHNAME|FNM_LEADING_DIR` `fnmatch` flags to match the conditional include pattern, but it seems that git does not do so.\r\n\r\n1) libgit2 matches a directory prefix of git directory while git does not.\r\n2) libgit2 does not match wildcards `?`, `*` and `[]` in the pattern to `/` in the path, while git does.\r\n\r\nConsider repository with git directory `D:\\repository\\.git` with `config` file that contains \r\n\r\n```\r\n[includeIf \"gitdir:D:/repository\"] \r\n path = cfg1\r\n[includeIf \"gitdir:D:/repository?.git\"] \r\n path = cfg2\r\n```\r\n\r\nand configuration files `D:\\repository\\.git\\cfg1` and `D:\\repository\\.git\\cfg2` with content:\r\n\r\n```\r\n[a]\r\n b = 1\r\n```\r\n\r\nand\r\n\r\n```\r\n[a]\r\n c = 1\r\n```\r\n\r\nrespectively.\r\n\r\ngit does not include `cfg` file:\r\n\r\n```\r\n\u003e git config --list\r\n...\r\nincludeif.gitdir:D:/repository.path=cfg1\r\nincludeif.gitdir:D:/repository?.git.path=cfg2\r\na.c=1\r\n```\r\n\r\n### Version of libgit2 (release number or SHA1)\r\n\r\na904fc6d12ffc20aa1a238a78000921494222e89\r\n\r\n### Operating system(s) tested\r\n\r\nWindows","author":{"url":"https://github.com/tmat","@type":"Person","name":"tmat"},"datePublished":"2019-05-15T17:18:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/5068/libgit2/issues/5068"}
| 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:5f4827b2-3ba6-838a-aad0-9e5a9d2b86e8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A9E6:26E27B:2A55A26:3A8B0D4:6A5EA4F6 |
| html-safe-nonce | 97fff48bcc679053dde8a32c9f92d11cf6580eee210e56299695d8d2b8faf95d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOUU2OjI2RTI3QjoyQTU1QTI2OjNBOEIwRDQ6NkE1RUE0RjYiLCJ2aXNpdG9yX2lkIjoiMTE5NDY0NDg4ODg3OTAxNTE1OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 864109398a44f3ca7eae5b89ffb196c7b1f1b5d02a8480621e7993168fd0fc1b |
| hovercard-subject-tag | issue:444554119 |
| 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/5068/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b0ac49c3bf1f843c1c1506499b60315263a3ec9effc0d1394eb3e2ad648b4b2f/libgit2/libgit2/issues/5068 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b0ac49c3bf1f843c1c1506499b60315263a3ec9effc0d1394eb3e2ad648b4b2f/libgit2/libgit2/issues/5068 |
| og:image:alt | Reproduction steps libgit2 uses FNM_PATHNAME|FNM_LEADING_DIR fnmatch flags to match the conditional include pattern, but it seems that git does not do so. libgit2 matches a directory prefix of git ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tmat |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7c7e31acb6a895494e518b880f5ccf39604f7fa9a8f2f3c64145efc3b776256d |
| 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 | 2d2ac9bdd71d5f53f2b731c9330677e38624e301 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width