]> source.dussan.org Git - jgit.git/commit
Prevent endless loop of events fired by RefsDirectory 04/1804/1
authorChristian Halstrick <christian.halstrick@sap.com>
Wed, 27 Oct 2010 08:37:05 +0000 (10:37 +0200)
committerChristian Halstrick <christian.halstrick@sap.com>
Wed, 27 Oct 2010 08:52:42 +0000 (10:52 +0200)
commit2c38e5d46155106fa0a0aed2b551207f0e6f2f2a
tree4e29cd2b53d2e3081dd26c7d6e6ac4e2c6bdacc9
parent07cae6e6c1d6982cf6b919e90e79330793c74a15
Prevent endless loop of events fired by RefsDirectory

RefsDirectory fires a RefsChangedEvent when it detect that one
ref changed (new, modified, deleted). But there was a potential
of wrong events beeing fired leading to a endless loop in EGit.
Problem is that when calling getRefs(ALL) we don't want to report
additional refs and by that we remove the additional refs from
the list of "refs reported upwards last time". We fire an
RefsChangedEvent because we think that the special refs are not
there anymore.
I fixed this by removing eventing for the additional refs. Another
alternative would be to always scan also for additional refs and
put them in the list of refs. But getRefs(ALL) would then remove
the additional refs again. I didn't do that for performance reasons
and also because I am not sure whether we want evnting for
additional refs.

Change-Id: Icb9398b55a8c6bbf03e38f6670feb67754ce91e0
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/RefDirectory.java