class RepositoriesController < ApplicationController
  before_action :git_base

  def show
    repo_path = Shixun.find_by_identifier(params[:identifier]).try(:repo_name)
    {repo_path: repo_path, path: params[:path]}
    @entries = @git.file_tree(params)
  end

  private

  def git_base
    @shixun = Shixun.find_by_identifier(params[:shixun_identifier])
    @repo_namespace = @shixun.repo_path
  end
end
