opengrok icon indicating copy to clipboard operation
opengrok copied to clipboard

OpenGrok should be able to index all branches in a single copy of a repository (Bugzilla #13344)

Open vladak opened this issue 12 years ago • 5 comments

status NEW severity enhancement in component scm for --- Reported in version unspecified on platform ANY/Generic Assigned to: Trond Norbye

On 2009-12-15 02:20:26 +0000, Kate Ebneter wrote:

Currently, if you want to index multiple branches in a git repository, you have to have separate clones with the appropriate branch checked out in each one. While this works, it's clumsy, especially for repositories with lots of branches. It would be much better if OpenGrok could index all the branches in a single clone, perhaps even a bare clone (one with no working copy). This should be possible, but it would require using some of git's plumbing commands, or perhaps JGit (the pure-Java implementation of git).

vladak avatar May 22 '13 07:05 vladak

JGit should also improve the performance since all caches can be kept in memory - this is something that has been grinding-my-gears^tm while I've been setting up a OpenGrok server for some users

pomac303 avatar Apr 13 '16 09:04 pomac303

It would be good if someone proposed possible solutions. I guess there should be a option to enable the behavior. Should all branches be indexed or just some ? (selection, certain number of most recent branches , ...) Where would indexer keep these branches ? How the results would be presented ? Should the branches be treated as separated projects or introduce concept of pseudo-sub-projects ?

Also, I am not sure I got the point about storing the caches in memory - would they have to be reindexed after each restart of the webapp ?

vladak avatar Jul 15 '16 10:07 vladak

Also, this is not specific to git only. Similarly, one might want to do the same thing for tags within each branch.

vladak avatar Jul 15 '16 10:07 vladak

Is this a duplicate / another aspect of #923 ?

jimklimov avatar Jul 31 '17 08:07 jimklimov

The JGit transition is in progress (#1113). For getting the history it is actually slower than executing git log (#3544).

vladak avatar Apr 15 '21 22:04 vladak

I don't think this is something the indexer should implement. Besides, all the code that was supposed to update the repositories from within the indexer has been removed. The current design is that only what is present in the file system is indexed and all the mirroring of repositories is done externally, e.g. using the Python tools.

vladak avatar Apr 17 '23 08:04 vladak