Bug 567309 - Better error handling for invalid paths in git configs
Summary: Better error handling for invalid paths in git configs
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: 5.9   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 5.10   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-24 03:06 EDT by Thomas Wolf CLA
Modified: 2020-09-26 12:54 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wolf CLA 2020-09-24 03:06:23 EDT
Follow-up on bug 567296: a core.excludesFile config with an invalid path makes EGit unusable. That should not happen. Such problems should be logged or otherwise be shown to the user, but then operation should continue normally as if the setting had its default value.

Just catching the error in JGit and logging might be fine for JGit, but would hide the problem completely from an Eclipse user since Eclipse still has no proper slf4j integration.

Perhaps a simple extension to the TypedConfigGetter could do it. Something like
a getPath() method that would return a String or maybe even a Path and that would do tilde replacement and check that the String is a valid Path. Then EGit can log the problem and continue.
Comment 1 Eclipse Genie CLA 2020-09-24 15:39:53 EDT
New Gerrit change created: https://git.eclipse.org/r/c/jgit/jgit/+/169856
Comment 2 Eclipse Genie CLA 2020-09-24 15:45:17 EDT
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/169857