Community
Participate
Working Groups
Currently , all the properties I can get from git status request is based on a single file , e.g. as below "Modified": [ { "Git": { "CommitLocation": "http://localhost:8080/git/commit/HEAD/file/K/bundles/org.eclipse.orion.client.core/static/compare.html", "DiffLocation": "http://localhost:8080/git/diff/Default/file/K/bundles/org.eclipse.orion.client.core/static/compare.html", "IndexLocation": "http://localhost:8080/git/index/file/K/bundles/org.eclipse.orion.client.core/static/compare.html" }, "Location": "http://localhost:8080/file/K/bundles/org.eclipse.orion.client.core/static/compare.html", "Name": "bundles/org.eclipse.orion.client.core/static/compare.html", "Path": "bundles/org.eclipse.orion.client.core/static/compare.html" }, I am using Git.DiffLocation on a single file to do the compare and Git.IndexLocation to do stage , which is good. But as "Stage All" , "Unstage All" and "Commit/Amend All" are based on the directory where the git-status.html is called in , I had to craft them by using the hash value of the git-status.html. In M7 , we should return these information in the response , these information should be global instead of being based n a single file.
Would format like this work for you? { "CommitAll": "http://localhost:8080/git/commit/file/K/", "StageAll": "http://localhost:8080/git/index/file/K/", "Modified" : [...], "Added" : [...], ... }
(In reply to comment #1) > Would format like this work for you? > > { "CommitAll": "http://localhost:8080/git/commit/file/K/", "StageAll": > "http://localhost:8080/git/index/file/K/", "Modified" : [...], "Added" : [...], > ... } Yes.The format is good. Btw , just recalled one more thing , will we support single file unstage in M7?
Maybe we should use "CommitAllLocation" and "StageAllLocation" just ot make the naming convention consistent.
(In reply to comment #2) > Btw , just recalled one more thing , will we support single file unstage in M7? It's being tracked by bug 338202, which is currently blocked by bug 338701 in JGit. (In reply to comment #3) > [...] use "CommitAllLocation" and "StageAllLocation" Fine with me.
Done[1], "CommitLocation" and "IndexLocation" from git status response, which are at the same level as "Added", "Changed" and others can be used to stage and commit all files in a clone. An example of a response with new keys can be found here: http://wiki.eclipse.org/Orion/Server_API/Git_API#Getting_status_for_a_git_project. Libing, I hope you don't mind this little change I made in the final implementation. [1] http://git.eclipse.org/c/e4/org.eclipse.orion.server.git/commit/?id=c69083bcd790fbbab97334f3096434223ed635cd