macgitver / MacGitver_oldie

DEPRECATED: Platform independent Git user interface.
http://www.macgitver.org
4 stars 0 forks source link

References: introduce a common git-reference cache/model. #11

Closed antis81 closed 10 years ago

antis81 commented 11 years ago

In MGV we have several places (4 at the moment) to show information about references within Git repositories. The used ReferenceInfo objects do not know of each others existence and for that reason, they are not "synchronized". To get a better picture of that, take a look at the two plugins History and RefsViews. They both setup some ReferenceInfo object (HistoryInlineRef and RefItem) with different goals at the first glimpse. But when looked at twice, they are dealing with the same underlying git_reference object. I think it is essential to overhaul the concepts here and setup a common storage for those objects.

@scunz I'm thinking of setting up a RefInfoCache within the RepoMan. This would make a lot of things a peace of cake (e.g. create a new branch in the history view, insert into the RefsView and update the active branch -> see macgitver/libMacGitverModules#36 ). As this is another big change: What do you think about it?

scunz commented 11 years ago

@antis81, I don't think that a common storage is actually required (or even possible). We would end up adding any new feature of any module to the core (Which is not it's intention).

However, a basic management of refs within RepoMan is the next step toward a central update mechanism. What does basic mean? Of course it should not contain any specific data coming from the modules. What then remains is the structure (of the ref-tree), some meta data about the ref (is it the stage ref? Is it the HEAD ref? Is it a branch? Is it a tag?) and finally where it points to (either another ref or an SHA1).

antis81 commented 10 years ago

Think we can close this one too as we already have that - or at least moving in the right direction, so this became irrelevant.