Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349810 - [client] [git] Git Status page fails when trying to open for a repo with detached HEAD
Summary: [client] [git] Git Status page fails when trying to open for a repo with deta...
Status: CLOSED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: libing wang CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-20 08:30 EDT by Tomasz Zarna CLA
Modified: 2011-09-01 11:42 EDT (History)
3 users (show)

See Also:
Szymon.Brandys: review+
simon_kaegi: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Zarna CLA 2011-06-20 08:30:50 EDT
Steps:
1. Clone org.eclipse.orion.client
2. "git checkout 3949ce221c57cc567ac678ad65004a6a4900e2ec" which is a commit before Simon's "renaming org.eclipse.orion.client.core/static to /web" [1]
3. Link it to a folder in Orion
4. Open Git Status for the folder
=> SHOULD BE: empty status, nothing to commit, but when a change is made I should be able to stage it and commit
=> IS: The page hangs with "Loading status..." message and there is an error in console:

TypeError: this._curBranch is undefined
[Break On This Error] location = this._curClone.Name + " on " + this._curBranch.Name; 
http://localhost:8080/orion/git/git-status-table.js

[1]  http://git.eclipse.org/c/e4/org.eclipse.orion.client.git/commit/?id=7d1ab0496245ee5a207827dc7314b250f9a955f8
Comment 1 Szymon Brandys CLA 2011-06-20 11:30:07 EDT
1) I talked to Simon and for RC3 we should do a null check at least. 

2) If the given branch JSON has Current=false it means we are in the detached mode. Then we should show the log for HEAD in the first mini-log and disable the remote one. We could also add a message somewhere saying that we are in the detached mode e.g. do not display the branch name in the header.
Comment 2 Szymon Brandys CLA 2011-06-20 13:38:28 EDT
The fix looks good, +1.
Comment 3 libing wang CLA 2011-06-20 14:53:45 EDT
fixed with a48ce0bb3d8a4ee5a2122ae9a0df39433d0f821b