gitlab-org--gitlab-foss/lib/gitlab/import_export
Zeger-Jan van de Weg 79a5d76801
Add repository languages for projects
Our friends at GitHub show the programming languages for a long time,
and inspired by that this commit means to create about the same
functionality.

Language detection is done through Linguist, as before, where the
difference is that we cache the result in the database. Also, Gitaly can
incrementaly scan a repository. This is done through a shell out, which
creates overhead of about 3s each run. For now this won't be improved.

Scans are triggered by pushed to the default branch, usually `master`.
However, one exception to this rule the charts page. If we're requesting
this expensive data anyway, we just cache it in the database.

Edge cases where there is no repository, or its empty are caught in the
Repository model. This makes use of Redis caching, which is probably
already loaded.

The added model is called RepositoryLanguage, which will make it harder
if/when GitLab supports multiple repositories per project. However, for
now I think this shouldn't be a concern. Also, Language could be
confused with the i18n languages and felt like the current name was
suiteable too.

Design of the Project#Show page is done with help from @dimitrieh. This
change is not visible to the end user unless detections are done.
2018-08-01 18:58:29 +02:00
..
after_export_strategies fix permissions 2018-07-06 18:07:53 +02:00
after_export_strategy_builder.rb
attribute_cleaner.rb Blacklisting attributes in the project import process 2018-05-14 09:28:33 +02:00
attributes_finder.rb Blacklisting attributes in the project import process 2018-05-14 09:28:33 +02:00
avatar_restorer.rb
avatar_saver.rb add restore method 2018-07-11 10:24:59 +02:00
command_line_util.rb
error.rb
file_importer.rb Rename WHITELISTED_FILENAMES => IGNORED_FILENAMES 2018-07-17 10:30:53 +02:00
group_project_object_builder.rb update code based on feedback 2018-06-27 11:53:51 +02:00
hash_util.rb
import_export.yml Add repository languages for projects 2018-08-01 18:58:29 +02:00
importer.rb
json_hash_builder.rb
lfs_restorer.rb
lfs_saver.rb
members_mapper.rb Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
merge_request_parser.rb More Gitaly cleanup: fetch_ref, allow disk access blocks 2018-07-27 08:43:19 +00:00
project_tree_restorer.rb refactor code based on feedback 2018-06-25 09:42:07 +02:00
project_tree_saver.rb
reader.rb Blacklisting attributes in the project import process 2018-05-14 09:28:33 +02:00
relation_factory.rb update code based on feedback 2018-06-27 11:53:51 +02:00
repo_restorer.rb
repo_saver.rb Find and mark more Git disk access locations 2018-06-05 15:51:14 +00:00
saver.rb Update Import/Export to use object storage (based on aa feature flag) 2018-07-06 15:46:18 +02:00
shared.rb
statistics_restorer.rb
uploads_manager.rb refactor code based on feedback 2018-07-16 11:45:11 +02:00
uploads_restorer.rb refactor code based on feedback 2018-07-16 11:45:11 +02:00
uploads_saver.rb fix specs 2018-07-11 11:36:59 +02:00
version_checker.rb
version_saver.rb
wiki_repo_saver.rb Find and mark more Git disk access locations 2018-06-05 15:51:14 +00:00
wiki_restorer.rb