Title: Cannot init repo in root directory with absolute path · Issue #5130 · libgit2/libgit2 · GitHub
Open Graph Title: Cannot init repo in root directory with absolute path · Issue #5130 · libgit2/libgit2
X Title: Cannot init repo in root directory with absolute path · Issue #5130 · libgit2/libgit2
Description: Reproduction steps Call git_repository_init_ext with path /foo on a posix-like system (not windows) for a path that does not exist. git_repository *repo; git_repository_init_options initopts = GIT_REPOSITORY_INIT_OPTIONS_INIT; git_libgit...
Open Graph Description: Reproduction steps Call git_repository_init_ext with path /foo on a posix-like system (not windows) for a path that does not exist. git_repository *repo; git_repository_init_options initopts = GIT_...
X Description: Reproduction steps Call git_repository_init_ext with path /foo on a posix-like system (not windows) for a path that does not exist. git_repository *repo; git_repository_init_options initopts = GIT_...
Opengraph URL: https://github.com/libgit2/libgit2/issues/5130
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cannot init repo in root directory with absolute path","articleBody":"### Reproduction steps\r\nCall `git_repository_init_ext` with path `/foo` on a posix-like system (not windows) for a path that does not exist.\r\n\r\n```c\r\ngit_repository *repo;\r\ngit_repository_init_options initopts = GIT_REPOSITORY_INIT_OPTIONS_INIT;\r\ngit_libgit2_init();\r\ninitopts.flags |= GIT_REPOSITORY_INIT_MKDIR | GIT_REPOSITORY_INIT_MKPATH;\r\nint error = git_repository_init_ext(\u0026repo, \"/foo\", \u0026initopts);\r\nif (error) {\r\n const git_error *err = git_error_last();\r\n fprintf(stderr, \"[%d] %s\\n\", err-\u003eklass, err-\u003emessage);\r\n}\r\n```\r\n\r\n### Expected behavior\r\nCreates a new repo `/foo/.git`\r\n\r\n### Actual behavior\r\nFails with `[2] failed to make directory '/foo/.git': No such file or directory`\r\n\r\n### Version of libgit2 (release number or SHA1)\r\n55a1535dd51c62f4e4ed764412200bbd49f3a1ab\r\n\r\n### Operating system(s) tested\r\nLinux or macOS.\r\n\r\n### Notes\r\nThis is caused by the change in #5050. ","author":{"url":"https://github.com/ehuss","@type":"Person","name":"ehuss"},"datePublished":"2019-06-20T18:44:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/5130/libgit2/issues/5130"}
| 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:efbad4a4-51bc-7815-d8af-acf5a574ed34 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BFBA:11B080:105B84E:10DF719:6A5DDA97 |
| html-safe-nonce | 71bbe5f4ed4a1b538f63d5c9544b19587d168290e3cc1a8644005f38dc99fb4d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRkJBOjExQjA4MDoxMDVCODRFOjEwREY3MTk6NkE1RERBOTciLCJ2aXNpdG9yX2lkIjoiODA3NzA4ODY3NjU3MTM3MjE4MyIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9 |
| visitor-hmac | f8beda861b5a636f8f30297639e5eb29aa470d5657804d00757f3b43455b30fa |
| hovercard-subject-tag | issue:458812656 |
| 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/5130/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d211c8041ba0efeb1a82c66fe55137928774a65f389e8944af3647604e490394/libgit2/libgit2/issues/5130 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d211c8041ba0efeb1a82c66fe55137928774a65f389e8944af3647604e490394/libgit2/libgit2/issues/5130 |
| og:image:alt | Reproduction steps Call git_repository_init_ext with path /foo on a posix-like system (not windows) for a path that does not exist. git_repository *repo; git_repository_init_options initopts = GIT_... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ehuss |
| 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 | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width