Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337463 - [server] Provide REST API to get file content from index
Summary: [server] Provide REST API to get file content from index
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: http://wiki.eclipse.org/Orion/How_Tos...
Whiteboard:
Keywords:
Depends on:
Blocks: 334206
  Show dependency tree
 
Reported: 2011-02-17 11:35 EST by Tomasz Zarna CLA
Modified: 2011-09-01 11:42 EDT (History)
1 user (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-17 11:35:14 EST
Compare editor needs an API that would return a file content from the git index. The URL could look like this: /git/index/<file path>.
Comment 1 Tomasz Zarna CLA 2011-02-18 09:04:55 EST
File content kept in the index can be retrieved by calling GET on /git/index/file/<path>.

I haven't tested it extensively, so I'm not sure what would happen if you try to get index for a folder or a file which hasn't been modified. But it works for the simplest case what you have a modified file in the working tree and would like to see the original content (in index). If you find something unexpected, please open a bug and assign to me right away.

Fixed with 5e3db69a9bb4671cfd4cbc0762b55c76e13499ac.