Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338200 - [server] Provide REST API for git add
Summary: [server] Provide REST API for git add
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Tomasz Zarna CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 336116 338203
  Show dependency tree
 
Reported: 2011-02-25 06:44 EST by Tomasz Zarna CLA
Modified: 2011-09-01 11:42 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.