libgit2/libgit2 — pull request #549 by nulltoken (2012-02-03 17:59:51+00:00)
Title: Fix trailing slash issue to the gitdir path when the repo is opened through a workdir

This ensures that the path to the .git directory ends with a forward slash when opening a repository through a working directory path

This fixes libgit2/libgit2sharp#108 which was detected while using one of the libgit2 bindings. The lack of the trailing forward slash led the name of references returned by `git_reference_listall()` to be prefixed with a forward slash.

- Add a new `listall.c` in `tests-clar/refs` which ensure that no refname starts with a forward slash
- Add some new assertions in existing tests in `tests-clar/repo/open.c` to ensure that the `repository_path` and `workdir_path` are suffixed with a forward slash.
- Add a new test in `tests-clar/repo/open.c` to ensure that the `repository_path` and `workdir_path` are suffixed with a forward slash when the repository is opened through a path to the working directory.