Commit cdf4ad81 authored by Thomas Randolph's avatar Thomas Randolph

Define the symlink mode as a constant on the Blob model

parent 561c8252
......@@ -6,6 +6,8 @@ class Blob < SimpleDelegator
include BlobLanguageFromGitAttributes
include BlobActiveModel
MODE_SYMLINK = '120000' # The STRING 120000 is the git-reported octal filemode for a symlink
CACHE_TIME = 60 # Cache raw blobs referred to by a (mutable) ref for 1 minute
CACHE_TIME_IMMUTABLE = 3600 # Cache blobs referred to by an immutable reference for 1 hour
......
......@@ -7,7 +7,7 @@
= copy_file_path_button(blob.path)
%small.mr-1
- if blob.mode == '120000'
- if blob.mode == Blob::MODE_SYMLINK
= _('Symbolic link') << ' ·'
= number_to_human_size(blob.raw_size)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment