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

Bug 331308

Summary: Error message when trying to open history of empty Git repository
Product: [Technology] EGit Reporter: Philipp Thun <philipp.thun>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: trivial    
Priority: P3 CC: marco, matthias.sohn, stefan.lay
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Philipp Thun CLA 2010-11-29 04:23:38 EST
Build Identifier: 20100917-0705

When trying to display the history of an empty Git repository in EGit an error pops up (Problem Occurred / Cannot parse HEAD in: <Project>) and an entry is written to the Error Log.

Although this behavior is somewhat consistent with C Git (git log -> fatal: bad default revision 'HEAD') and Gitk (Error parsing revisions: unknown revision HEAD), I would expect the EGit plugin to handle this situation in a more user-friendly manner. The best option would be to disable the "Show in History" entry in the context menu of a repository, project, folder or file.

Reproducible: Always

Steps to Reproduce:
1. Create a new, empty project
2. Share as Git project / create empty repository (Context menu on project -> Team -> Share Project... -> Git -> Create Repository)
3. Display history (Context menu on project -> Team -> Show in History)
Comment 1 Matthias Sohn CLA 2011-02-26 17:32:41 EST
*** Bug 338053 has been marked as a duplicate of this bug. ***
Comment 2 Matthias Sohn CLA 2011-02-26 17:33:31 EST
fixed with ba7fdc87ed4db862a56136eedef6f6501322b748
Comment 3 Matthias Sohn CLA 2011-04-19 07:00:13 EDT
*** Bug 342222 has been marked as a duplicate of this bug. ***