| Summary: | [server] Provide REST API for generating diff between two commits | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Tomasz Zarna <tomasz.zarna> |
| Component: | Client | Assignee: | Tomasz Zarna <tomasz.zarna> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | libingw, Szymon.Brandys |
| Version: | 0.2 | ||
| Target Milestone: | 0.2 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
We discussed it today. It looks like we need something like this: POST /git/clone/[resourcePath] and a resource to compare should be passed in the body. The response should contain the location of the diff i.e. /git/diff/[diffLocation] and perhaps the diff result. Later when GET /git/diff/[diffLocation] is called we will get the result of the diff again. Fixed with 61071497ae1aa5cde44e26f8e8db891fb81ccdd5.
POSTing to a DiffLoaction for a commit[1] with a body containing a pointer to a new revision[2] will return a diff location in Header of the response[3].
[1] e.g. /git/diff/HEAD/file/A/file.txt
[2] { "New" : "HEAD^1" }
[3] Location : {...}/git/diff/HEAD..HEAD^1/file/A/file.txt
*** Bug 339898 has been marked as a duplicate of this bug. *** |
First thought: could be implemented as GET /git/diff/{commit}..{commit}/file/{projectId}/[{filePath}]