macgitver / MacGitverModules

DEPRECATED: Modules for MacGitver
5 stars 1 forks source link

ngf/refsview #100

Closed antis81 closed 9 years ago

antis81 commented 9 years ago

To complete:

I let the image speak for itself (icons not included) :star:: mgv-refsview-icons

antis81 commented 9 years ago

Didn't I relatively explicitly say that it is big bullshit to read the repository from within the painting code? I have code that does it correctly, it's not complete and not yet pushed.

We're talking about the in-memory references. This code never reads from disk. Maybe you have something different in mind?

scunz commented 9 years ago

What I have in mind, is that the underlying git repository will be evicted from RepoMan, 15 minutes after the repository got deactivated. See here. I would really love to reduce this timeout and make it even valid for the active repository.

As for the in-memory references, if libgit2 would not refresh the in-memory references on every lookup, how would we ever learn of changes? There's no way to explicitly force a reload. See: here, here and here. The biggest problem is, that it has to reload the loose reference, but that will eventually destroy the packed one. So it has to read the packed one again, too. The latter will cause all references to be revalidated.

However, we have at least one layer above that. Which can actually treat the references as purely in-memory. You may be right here. Anyway, we should still treat the RepoMan as a fragile cache that may change between events (Talking about Qt-Events) and in cases where it had not all data available.

antis81 commented 9 years ago

Hm ... I think I'm going to abandon this branch, too. Take it as a source of inspiration :smile:. Please keep the TODO's from the description in mind -> copy them into the description of #99.