Title: Don't add trailing slash when reporting repository path or workdir · Issue #4583 · libgit2/libgit2 · GitHub
Open Graph Title: Don't add trailing slash when reporting repository path or workdir · Issue #4583 · libgit2/libgit2
X Title: Don't add trailing slash when reporting repository path or workdir · Issue #4583 · libgit2/libgit2
Description: Reproduction steps Invoke the git_repository_path or git_repository_workdir. Observe that the directory path contains a trailing slash. Expected vs Actual behavior It's unconventional to add a trailing slash to the directory name returne...
Open Graph Description: Reproduction steps Invoke the git_repository_path or git_repository_workdir. Observe that the directory path contains a trailing slash. Expected vs Actual behavior It's unconventional to add a trai...
X Description: Reproduction steps Invoke the git_repository_path or git_repository_workdir. Observe that the directory path contains a trailing slash. Expected vs Actual behavior It's unconventional to add a ...
Opengraph URL: https://github.com/libgit2/libgit2/issues/4583
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Don't add trailing slash when reporting repository path or workdir","articleBody":"### Reproduction steps\r\n\r\nInvoke the [git_repository_path](https://libgit2.github.com/libgit2/#HEAD/group/repository/git_repository_path) or [git_repository_workdir](https://libgit2.github.com/libgit2/#HEAD/group/repository/git_repository_workdir). Observe that the directory path contains a trailing slash.\r\n\r\n### Expected vs Actual behavior\r\n\r\nIt's unconventional to add a trailing slash to the directory name returned by these methods. It also differs from the values reported by the native git client.\r\n\r\nCase in point.\r\n\r\nNative git:\r\n\r\n```\r\n$ git rev-parse --absolute-git-dir\r\n/home/user/projects/libgit2/.git\r\n```\r\n\r\nlibgit2\r\n\r\n```\r\ngit_repository_path(repo)\r\n//=\u003e /home/user/projects/libgit2/.git/\r\n```\r\n\r\nNative git:\r\n\r\n```\r\n$ git worktree list\r\n# /home/user/projects/libgit2 937e7e2 [master]\r\n```\r\n\r\nlibgit2\r\n\r\n```\r\ngit_repository_workdir(repo)\r\n//=\u003e /home/user/projects/libgit2/\r\n```\r\n\r\nI believe these values should either match the native git client or this difference should be highlighted in the documentation.\r\n\r\n### Version of libgit2 (release number or SHA1)\r\n\r\nvia nodegit 0.21.1 (libgit2 v0.26.0 according to the nodegit README at the time of that release)\r\n\r\n### Operating system(s) tested\r\n\r\nLinux, Windows, macOS","author":{"url":"https://github.com/mojavelinux","@type":"Person","name":"mojavelinux"},"datePublished":"2018-03-18T05:23:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/4583/libgit2/issues/4583"}
| 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:44cb98b4-b5a8-8c4b-8a32-eef1f9a1a517 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C02A:1C23F8:169603D:1E5B927:6A5D2B27 |
| html-safe-nonce | 2c2bb1684d5ab52705afbfca55b1bcd7bcdf85acf2e8ea0b9bf25314894ecfa5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDJBOjFDMjNGODoxNjk2MDNEOjFFNUI5Mjc6NkE1RDJCMjciLCJ2aXNpdG9yX2lkIjoiNjcxNjA0MTY4MTA5NDY1MDY2MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 57b204ba74cad0d15698743510d58e8f392c14034c705583a3bfe886b7032481 |
| hovercard-subject-tag | issue:306214483 |
| 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/4583/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b7c8b48b97fb96ca6200ed414f85d83f43149fc556579ed57310a513832652b8/libgit2/libgit2/issues/4583 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b7c8b48b97fb96ca6200ed414f85d83f43149fc556579ed57310a513832652b8/libgit2/libgit2/issues/4583 |
| og:image:alt | Reproduction steps Invoke the git_repository_path or git_repository_workdir. Observe that the directory path contains a trailing slash. Expected vs Actual behavior It's unconventional to add a trai... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mojavelinux |
| 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