<commit_before>.tree-ref-holder
  = render 'shared/ref_switcher', destination: 'tree', path: @path

%ul.breadcrumb.repo-breadcrumb
  %li
    = link_to namespace_project_tree_path(@project.namespace, @project, @ref) do
      = @project.path
  - tree_breadcrumbs(tree, 6) do |title, path|
    %li
      - if path
        = link_to truncate(title, length: 40), namespace_project_tree_path(@project.namespace, @project, path)
      - else
        = link_to title, '#'
  - if allowed_tree_edit?
    %li
      %span.dropdown
        %a.dropdown-toggle.btn.btn-sm.add-to-tree{href: '#', "data-toggle" => "dropdown"}
          = icon('plus')
        %ul.dropdown-menu
          %li
            = link_to namespace_project_new_blob_path(@project.namespace, @project, @id), title: 'Create file', id: 'new-file-link' do
              = icon('pencil fw')
              Create file
          %li
            = link_to '#modal-upload-blob', { 'data-target' => '#modal-upload-blob', 'data-toggle' => 'modal'} do
              = icon('file fw')
              Upload file
          %li.divider
          %li
            = link_to '#modal-create-new-dir', { 'data-target' => '#modal-create-new-dir', 'data-toggle' => 'modal'} do
              = icon('folder fw')
              New directory
  - elsif !on_top_of_branch?
    %li
      %span.btn.btn-sm.add-to-tree.disabled.has_tooltip{title: "You can only add files when you are on a branch.", data: {container: 'body'}}
        = icon('plus')<commit_msg>Add branch and tag operation to tree dropdown<commit_after>.tree-ref-holder
  = render 'shared/ref_switcher', destination: 'tree', path: @path

%ul.breadcrumb.repo-breadcrumb
  %li
    = link_to namespace_project_tree_path(@project.namespace, @project, @ref) do
      = @project.path
  - tree_breadcrumbs(tree, 6) do |title, path|
    %li
      - if path
        = link_to truncate(title, length: 40), namespace_project_tree_path(@project.namespace, @project, path)
      - else
        = link_to title, '#'
  - if allowed_tree_edit?
    %li
      %span.dropdown
        %a.dropdown-toggle.btn.btn-sm.add-to-tree{href: '#', "data-toggle" => "dropdown"}
          = icon('plus')
        %ul.dropdown-menu
          %li
            = link_to namespace_project_new_blob_path(@project.namespace, @project, @id), title: 'Create file', id: 'new-file-link' do
              = icon('pencil fw')
              New file
          %li
            = link_to '#modal-upload-blob', { 'data-target' => '#modal-upload-blob', 'data-toggle' => 'modal'} do
              = icon('file fw')
              Upload file
          %li
            = link_to '#modal-create-new-dir', { 'data-target' => '#modal-create-new-dir', 'data-toggle' => 'modal'} do
              = icon('folder fw')
              New directory
          %li.divider
          %li
            = link_to new_namespace_project_branch_path(@project.namespace, @project) do
              = icon('code-fork fw')
              New branch
          %li
            = link_to new_namespace_project_tag_path(@project.namespace, @project) do
              = icon('tags fw')
              New tag
  - elsif !on_top_of_branch?
    %li
      %span.btn.btn-sm.add-to-tree.disabled.has_tooltip{title: "You can only add files when you are on a branch.", data: {container: 'body'}}
        = icon('plus')
{'fraction_non_alphanumeric': 0.1430722891566265, 'fraction_numerical': 0.0018072289156626507, 'mean_word_length': 2.227405247813411, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4731150', 'n_tokens_mistral': 1058, 'n_tokens_neox': 1053, 'n_words': 226}