Skip to content

Do not output exception if .bib file is not under version control #11

Open

Description

@koppor

I got following exception when starting JabRef:

2025-08-31 20:39:48 [JavaFX Application Thread] org.jabref.logic.git.GitHandler.hasRemote()
ERROR: Failed to check remote configuration: org.eclipse.jgit.errors.RepositoryNotFoundException: repository not found: C:\Users\olive\SynologyDrive\lit-adr
        at org.eclipse.jgit@7.3.0.202506031305-r/org.eclipse.jgit.lib.BaseRepositoryBuilder.build(BaseRepositoryBuilder.java:681)
        at org.eclipse.jgit@7.3.0.202506031305-r/org.eclipse.jgit.api.Git.open(Git.java:95)
        at org.eclipse.jgit@7.3.0.202506031305-r/org.eclipse.jgit.api.Git.open(Git.java:74)
        at org.jabref.jablib/org.jabref.logic.git.GitHandler.hasRemote(GitHandler.java:405)
        at org.jabref/org.jabref.gui.actions.ActionHelper.lambda$needsGitRemoteConfigured$1(ActionHelper.java:117)
        at java.base/java.util.Optional.map(Optional.java:260)
        at org.jabref/org.jabref.gui.actions.ActionHelper.lambda$needsGitRemoteConfigured$0(ActionHelper.java:115)

I think, this is not needed - for hasRemote() there should be no exception if the repository is not a git repository

Maybe, the method should not be called at all in the case, it is not a git repository?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions