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

Bug 343963

Summary: [server] Need "git reset --hard HEAD" API on server
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: ClientAssignee: Tomasz Zarna <tomasz.zarna>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: susan, Szymon.Brandys
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 338202, 343961    

Description libing wang CLA 2011-04-27 10:15:16 EDT
I just got real world conflicts when fixing bug 343918 .
In my case I had to use "git reset --hard HEAD" to undo my commit and pull
again as the incoming changes happened to resolve my issue.
We need a support to let user undo the last commit and pull the change so that
the local changes on the client file is overwritten.  If they decide to do so ,
user does not need to manually resolve the conflict and push if they decide to
do so.
Comment 1 Susan McCourt CLA 2011-04-27 16:10:11 EDT
+1.
I had real world conflicts yesterday when committing a small change to navigate-table and colliding with a very large from Boris' file client refactoring.  

The diffs scared me and most were unknown to me.  I knew that my change was simply a variable rename, so I wanted to just take Boris' work and then make my change again rather than merge manually.
Comment 2 Tomasz Zarna CLA 2011-05-02 10:38:47 EDT
Sounds like a subtask of bug 338202 to me.
Comment 3 Tomasz Zarna CLA 2011-05-05 08:40:55 EDT
Fixed with http://git.eclipse.org/c/e4/org.eclipse.orion.server.git/commit/?id=39fcadc5998b912d5e97823235546c08cd35cd15 [1]. You should be now able to hard reset all changes in index and working tree. Resetting a single file is still not available, blocked by bug 338701 in JGit.

[1] Ignore the comment there, the fix is for this bug, not bug 338202.