Community
Participate
Working Groups
In Git Status, when Staging All, the URI (Index Location) used to do it should always point to the root of given clone. This is not true when the status is opened for a folder. It's being fixed in bug 352451, but it would also require some changes in the Git Status page (UI). Libing, if you're too busy, could you point me where should I change the script. I will need to get the Index Location by going to Clone Location first. I think you've already done it on that page.
(In reply to comment #0) > In Git Status, when Staging All, the URI (Index Location) used to do it should > always point to the root of given clone. This is not true when the status is > opened for a folder. It's being fixed in bug 352451, but it would also require > some changes in the Git Status page (UI). > > Libing, if you're too busy, could you point me where should I change the > script. I will need to get the Index Location by going to Clone Location first. > I think you've already done it on that page. Look at stageAll: function(){ this.stage(this._model.items.IndexLocation); }, in file git-status-table.js. It eventually calls the gitProvider.stage function , which is not passing putData at all. the change should be small, where you can just change the gitProvider.stage function. But let me know if you dont want t otouch it. BTW , I remember it was the design that staging all just stage everything no matter which folder it is, true ?
(In reply to comment #1) > BTW , I remember it was the design that staging all just stage everything no > matter which folder it is, true ? Correct. As long as you're using Index Location that points to the root, you will stage all files in the repo. However, if you're in a folder, the Index Location you have from the Git Status response points to that folder. Using it to stage will result staging only files in the folder. We even have a test for that -- org.eclipse.orion.server.tests.servlets.git.GitAddTest.testAddInFolder().
(In reply to comment #2) > However, if you're in a folder, the Index > Location you have from the Git Status response points to that folder. Using it > to stage will result staging only files in the folder. We even have a test for > that -- > org.eclipse.orion.server.tests.servlets.git.GitAddTest.testAddInFolder(). That tells me we do not have to change the client code.
Fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=22f335c7ddc28ab853332a76cff0acc7d8472ee7, where IndexLocation from the clone is used when doing "Stage All".