Class: DesignManagement::GitRepository

Inherits:
Repository
  • Object
show all
Extended by:
Gitlab::Utils::Override
Defined in:
app/models/design_management/git_repository.rb

Constant Summary collapse

MANAGED_GIT_ATTRIBUTES =

We define static git attributes for the design repository as this repository is entirely GitLab-managed rather than user-facing.

Enable all uploaded files to be stored in LFS.

<<~GA.freeze
  /#{DesignManagement.designs_directory}/* filter=lfs diff=lfs merge=lfs -text
GA

Constants inherited from Repository

Repository::ARCHIVE_CACHE_TIME, Repository::ARCHIVE_CACHE_TIME_IMMUTABLE, Repository::AmbiguousRefError, Repository::CACHED_METHODS, Repository::CreateTreeError, Repository::METHOD_CACHES_FOR_FILE_TYPES, Repository::REF_ENVIRONMENTS, Repository::REF_KEEP_AROUND, Repository::REF_MERGE_REQUEST, Repository::REF_PIPELINES, Repository::REF_TMP, Repository::RESERVED_REFS_NAMES

Instance Attribute Summary

Attributes inherited from Repository

#container, #disk_path, #full_path, #repo_type, #shard

Instance Method Summary collapse

Methods included from Gitlab::Utils::Override

extended, extensions, included, method_added, override, prepended, queue_verification, verify!

Methods inherited from Repository

#==, #add_branch, #add_tag, #after_change_head, #after_create, #after_create_branch, #after_push_commit, #after_remove_branch, #after_remove_tag, #ambiguous_ref?, #ancestor?, #archive_metadata, #avatar, #before_change_head, #before_delete, #before_push_tag, #before_remove_branch, #before_remove_tag, #blob_at, #blob_at_branch, #blob_data_at, #blobs_at, #blobs_metadata, #branch_exists?, #branch_names_contains, #branches_sorted_by, #cache, #cached_methods, #change_head, #changelog, #changelog_config, #cherry_pick, #clone_as_mirror, #commit, #commit_by, #commit_count, #commit_count_for_ref, #commit_files, #commits, #commits_between, #commits_by, #compare_source_branch, #contribution_guide, #contributors, #create_dir, #create_file, #create_from_bundle, #create_if_not_exists, #create_ref, #delete_file, #delete_refs, #empty?, #exists?, #expand_ref, #expire_all_method_caches, #expire_ancestor_cache, #expire_avatar_cache, #expire_branch_cache, #expire_branches_cache, #expire_caches_for_tags, #expire_content_cache, #expire_emptiness_caches, #expire_exists_cache, #expire_protected_branches_cache, #expire_root_ref_cache, #expire_statistics_caches, #expire_status_cache, #expire_tags_cache, #fetch_as_mirror, #fetch_ref, #fetch_source_branch!, #ff_merge, #file_on_head, #find_branch, #find_commits_by_message, #find_tag, #flipper_id, #get_patch_id, #gitignore, #gitlab_ci_yml, #gitlab_ci_yml_for, #has_ambiguous_refs?, #hash, #head_commit, #head_tree, #initialize, #inspect, #issue_template_names_hash, #keep_around, #languages, #last_commit_for_path, #last_commit_id_for_path, #lfsconfig_for, #license, #license_blob, #license_gitaly, #license_key, #list_commits_by, #list_last_commits_for_tree, #local_branches, #lookup, #ls_files, #merge, #merge_base, #merge_request_template_names_hash, #merge_to_branch, #merged_branch_names, #merged_to_root_ref?, #move_dir_files, #new_commits, #next_branch, #object_pool, #path_to_repo, pick_storage_shard, #project, #raw_repository, #readme, #readme_path, #rebase, #recent_objects_size, #ref_exists?, #ref_names, #refresh_method_caches, #remove_prohibited_branches, #revert, #rm_branch, #rm_tag, #root_ref, #root_ref_sha, #route_map_for, #search_branch_names, #search_files_by_content, #search_files_by_name, #search_files_by_wildcard_path, #size, #squash, #submodule_links, #tag_exists?, #tag_names_contains, #tags, #tags_sorted_by, #tree, #update_file, #update_submodule, #with_cache_hooks, #xcode_project?

Methods included from Gitlab::RepositoryCacheAdapter

#cache, #cache_method_output, #cache_method_output_as_redis_set, #cache_method_output_asymmetrically, #cached_methods, #expire_method_caches, #memoize_method_cache_value, #memoize_method_output, #no_repository_fallback, #redis_hash_cache, #redis_set_cache, #request_store_cache

Constructor Details

This class inherits a constructor from Repository

Instance Method Details

#attributes(path) ⇒ Object

Override of a method called on Repository instances but sent via method_missing to Gitlab::Git::Repository where it is defined



23
24
25
# File 'app/models/design_management/git_repository.rb', line 23

def attributes(path)
  info_attributes.attributes(path)
end

#attributes_at(_ref = nil) ⇒ Object

Override of a method called on Repository instances but sent via method_missing to Gitlab::Git::Repository where it is defined



35
36
37
# File 'app/models/design_management/git_repository.rb', line 35

def attributes_at(_ref = nil)
  info_attributes
end

#copy_gitattributes(_ref = nil) ⇒ Object



40
41
42
# File 'app/models/design_management/git_repository.rb', line 40

def copy_gitattributes(_ref = nil)
  true
end

#gitattribute(path, name) ⇒ Object

Override of a method called on Repository instances but sent via method_missing to Gitlab::Git::Repository where it is defined



29
30
31
# File 'app/models/design_management/git_repository.rb', line 29

def gitattribute(path, name)
  attributes(path)[name]
end

#info_attributesObject

Override of a method called on Repository instances but sent via method_missing to Gitlab::Git::Repository where it is defined



17
18
19
# File 'app/models/design_management/git_repository.rb', line 17

def info_attributes
  @info_attributes ||= Gitlab::Git::AttributesParser.new(MANAGED_GIT_ATTRIBUTES)
end