Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] Fwd: Use of RepositoryListener (especially RefsChangedListener)

Hi! :)

Is there an Example how to use RefsChangedListener or any other Listener?
I want to get notified if a user do a pull on a local repository.

GitListener listener = new GitListener(String name);
Repository localRepo = new FileRepository(gitPath); //gitPath is like C:\Users\frabl_000\SoCoTestGit\socoLocal\socoLocal\.git

Does the onRefsChanged() only get called if you use the localRepo variable or will it also be called if you modify the repository via command line or EGit?

My Goal:
Get notified if the user pull from origin; reset a HashMap which saves if a file was opened.

Best regards

Back to the top