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

Bug 347936

Summary: Fetching from up-to-date repository throws CoreException
Product: [Technology] EGit Reporter: Alex Blewitt <alex.blewitt>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: matthias.sohn
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
screenshot: result dialog for empty fetch none

Description Alex Blewitt CLA 2011-06-01 09:30:49 EDT
v 1.0.0.20110531xxxx

If you do a 'fetch' from a remote configured in the repositories view, and the repository is up-to-date, you get an error message shown in a CoreException dialog (with a red X) and a log entry which reads:

!ENTRY org.eclipse.egit.ui 4 0 2011-06-01 14:26:20.524
!MESSAGE Nothing to fetch.
!STACK 1
org.eclipse.core.runtime.CoreException: Nothing to fetch.
	at org.eclipse.egit.ui.internal.fetch.FetchOperationUI.execute(FetchOperationUI.java:102)
	at org.eclipse.egit.ui.internal.fetch.FetchOperationUI$1.run(FetchOperationUI.java:117)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.errors.TransportException: Nothing to fetch.
	at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1038)
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:136)
	at org.eclipse.egit.core.op.FetchOperation.run(FetchOperation.java:128)
	at org.eclipse.egit.ui.internal.fetch.FetchOperationUI.execute(FetchOperationUI.java:99)
	... 2 more
	!SUBENTRY 1 org.eclipse.egit.ui 4 0 2011-06-01 14:26:20.524
!MESSAGE Nothing to fetch.
!STACK 0
org.eclipse.jgit.errors.TransportException: Nothing to fetch.
	at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1038)
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:136)
	at org.eclipse.egit.core.op.FetchOperation.run(FetchOperation.java:128)
	at org.eclipse.egit.ui.internal.fetch.FetchOperationUI.execute(FetchOperationUI.java:99)
	at org.eclipse.egit.ui.internal.fetch.FetchOperationUI$1.run(FetchOperationUI.java:117)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
	
Surely nothing to fetch could be handled in a better dialog, preferably with an informational icon instead of an error icon?
Comment 1 Matthias Sohn CLA 2011-06-29 05:05:37 EDT
Created attachment 198803 [details]
screenshot: result dialog for empty fetch
Comment 2 Matthias Sohn CLA 2011-06-29 05:06:17 EDT
Tried this with EGit 1.0.0.201106090707-r and fetch with empty result doesn't show an error anymore (see attached screenshot). Also no error is logged in the error log.