Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 338202

Summary: [server] Provide REST API for git reset
Product: [ECD] Orion Reporter: Tomasz Zarna <tomasz.zarna>
Component: ClientAssignee: Tomasz Zarna <tomasz.zarna>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P2 CC: bokowski, libingw, susan, Szymon.Brandys
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: All   
URL: http://www.kernel.org/pub/software/scm/git/docs/git-reset.html
Whiteboard:
Bug Depends on: 338701, 343963    
Bug Blocks: 346879    

Description Tomasz Zarna CLA 2011-02-25 06:47:05 EST
We're going to need REST API for git reset --mixed (on a single file, or all currently staged files – the inverse of git add).
Comment 1 Tomasz Zarna CLA 2011-03-02 11:15:42 EST
Unstaging all files is provided by fd5d70582fcf8dcd4cff24ffcf4bc407f7982fcf. I'm still working on being able to unstage a single file.
Comment 2 Tomasz Zarna CLA 2011-03-02 11:40:23 EST
(In reply to comment #1)
> I'm still working on being able to unstage a single file.

Blocked by bug 338701 in JGit, missing API.
Comment 3 libing wang CLA 2011-05-26 11:37:48 EDT
I am raising this as critical.
As I am self-hosting now ,sometimes when I have 20 file changed and I want to keep 1 file unstaged. Currently  I had to stage 19 times .
What I expected to do in a short cut is to stage all and just unstage the file I wanted to leave there.

The perfect solution would be stage/unstage a set of files.Not sure if that is possible.If yes we can add check box on each single file and a "selectAll" check box. By doing this , user can easily stage multiple files and still have the stageAll function by checking all the files.
Comment 4 Szymon Brandys CLA 2011-05-27 04:26:14 EDT
major loss of function = major
Comment 5 Tomasz Zarna CLA 2011-05-27 08:56:37 EDT
Fixed with http://git.eclipse.org/c/e4/org.eclipse.orion.server.git/commit/?id=f683b351455c0141f6eadf1c3811f67c50aa55f0.

POSTing on IndexLocation with GitConstants.KEY_PATH ("Path") array with file paths (e.g. "folder/file.txt") will reset provided paths. Note that combing reset types and paths is not allowed.
Comment 6 Tomasz Zarna CLA 2011-10-03 10:18:14 EDT
*** Bug 359578 has been marked as a duplicate of this bug. ***