Community
Participate
Working Groups
Currently, GitCommitHandlerV1 expects a single segment after /git/commit that identifies a revision e.g. /git/commit/{commit1}/file/{path} to show commits between Beginning of Time and commit1. To get a list of commits in a remote branch it would be convenient to use the same notation as in git console i.e. origin/master. The problem is that the current implementation of the handler will take "origin" and fail to resolve it. A workaround Szymon suggested is to encode refs containing "/".
Most of the job has been already done in bug 347943. The GitCommitHandlerV1 extends now AbstractGitHandler, which decode the git segment, so refs like "refs/remote/origin/master" are handled properly. The Commit URI looks now like this: http://localhost:8080/gitapi/commit/refs%252Fremotes%252Forigin%252Fmaster/file/a/. In 9d42d5db616a6773c82c0567e8e0bb26daffc1e0 I updated org.eclipse.orion.server.git.objects.Branch to follow the same rule ie returned encoded full name in the Commit URI property. See also org.eclipse.orion.server.tests.servlets.git.GitLogTest#testLogRemoteBranch() and #testLogWithBranch().