Community
Participate
Working Groups
We're going to need REST API for git commit (passing a commit message, and a boolean for "amend" or not).
Partially fixed with 7cd152c9c693e5993ad02275ca3d1c0168d0dace. To commit all staged files, do POST on /git/commit/file/{projectId} passing {"Message"[1]:<commit message>} in body. "Amend"[2] param is not yet supported, neither is committing a single file. I'm not able to specify these using CommitCommand[3]. I'll try to work around that limitation. To get a file content from HEAD, call GET on /git/commit/HEAD/file/{path}. For now only "HEAD" ref is accepted, but this could be extended in the future. [1] org.eclipse.orion.server.git.GitConstants.KEY_COMMIT_MESSAGE [2] org.eclipse.orion.server.git.GitConstants.KEY_COMMIT_AMEND [3] org.eclipse.jgit.api.CommitCommand
(In reply to comment #1) > "Amend"[2] param is not yet supported, See bug 339088. > neither is committing a single file. See http://egit.eclipse.org/r/#change,2635.
Amending can be achieved by doing POST on /git/commit/file/{projectId} and passing an extra parameter in request body: {..., "Amend":"true"}. When omitted or set to "false" a regular commit is made. So, the last missing bit here is being able to commit a single file (provide a path to commit). I'm keeping my fingers crossed for http://egit.eclipse.org/r/#change,2635, which should be helpful here.
(In reply to comment #3) > So, the last missing bit here is being able to commit a single file (provide a > path to commit). The last missing part has been moved to bug 339190. Marking as fixed.