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

Bug 339115

Summary: [server] Provide REST API for git push
Product: [ECD] Orion Reporter: Tomasz Zarna <tomasz.zarna>
Component: ClientAssignee: Tomasz Zarna <tomasz.zarna>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Szymon.Brandys
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Windows XP   
URL: http://www.kernel.org/pub/software/scm/git/docs/git-push.html
Whiteboard:
Bug Depends on: 339354    
Bug Blocks: 339722, 343153    

Description Tomasz Zarna CLA 2011-03-07 11:10:56 EST
We're going to need REST API for git push (pushing changes to a remote repository).
Comment 1 Tomasz Zarna CLA 2011-03-07 11:11:34 EST
We should be able to push tags as well (--tags option).
Comment 2 Tomasz Zarna CLA 2011-04-18 08:44:57 EDT
Pushing content of HEAD to given remote branch ("git push origin HEAD:master") can be now accomplished[1] by POSTing on the remote branch URI with PushSrcRef[2] = HEAD in request body.

Leaving the bug open to add more tests and support for pushing tags.

[1] http://git.eclipse.org/c/e4/org.eclipse.orion.server.git/commit/?id=2eaff1f5b4040f868f71f8d10105e04a1204b56e 
[2] org.eclipse.orion.server.git.GitConstants.KEY_PUSH_SRC_REF
Comment 3 Szymon Brandys CLA 2011-04-19 10:25:35 EDT
There is an issue with the current shape of it. When there are changes in the remote tracking branch to merge, doing Git Push will return 200, however the operation fails. Tomasz, you said there is a separate bug for it, could you link it to the bug? We should fix it ASAP.
Comment 4 Tomasz Zarna CLA 2011-04-21 04:45:25 EDT
(In reply to comment #3)
> There is an issue with the current shape of it. When there are changes in the
> remote tracking branch to merge, doing Git Push will return 200, however the
> operation fails. Tomasz, you said there is a separate bug for it, could you link
> it to the bug? 

It was bug 343153.
Comment 5 Tomasz Zarna CLA 2011-04-21 05:23:31 EDT
(In reply to comment #2)
> Leaving the bug open to add more tests 

Filed bug 343496, most probably not for 0.2M7.

> and support for pushing tags.

Fixed with http://git.eclipse.org/c/e4/org.eclipse.orion.server.git/commit/?id=bab16d9960f9667d81b12f8e62d59d4ede5db6a6. Use org.eclipse.orion.server.git.GitConstants.KEY_PUSH_TAGS set to "true".