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

Bug 338200

Summary: [server] Provide REST API for git add
Product: [ECD] Orion Reporter: Tomasz Zarna <tomasz.zarna>
Component: ClientAssignee: Tomasz Zarna <tomasz.zarna>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bokowski, libingw, Szymon.Brandys
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 336116, 338203    

Description Tomasz Zarna CLA 2011-02-25 06:44:48 EST
We're going to need REST API for git add (on a single file, or all currently unstaged files).
Comment 1 Tomasz Zarna CLA 2011-02-28 10:06:52 EST
This operation could be implemented as PUT on /git/index/<file path>.
Comment 2 Boris Bokowski CLA 2011-02-28 11:06:53 EST
Tomasz, have you seen the mockup at http://wiki.eclipse.org/Orion/How_Tos/Working_with_git#Using_Orion_Git_Status_Page ? The server API only needs to support what can be done from that UI. (at least for M6 :-)

For a resource in the "unstaged" list, we'd like to move it into the staged list. The equivalent command line for this would be "git add path/to/file".

The "Stage All" equivalent would be "git add .; git add -u ."  assuming your current working directory is the top-level directory of the git repository. Actually, I am not 100% sure about this :-)
Comment 3 Tomasz Zarna CLA 2011-03-02 05:42:01 EST
Done with 60ca59cafeafae22279bd5ab2a345f4c3bf830ff. I'm moving onward to bug 338202 where I'll implement a simple "git reset" support for unstaging.