Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
cdf4ad81
Commit
cdf4ad81
authored
Aug 10, 2020
by
Thomas Randolph
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define the symlink mode as a constant on the Blob model
parent
561c8252
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
app/models/blob.rb
app/models/blob.rb
+2
-0
app/views/projects/blob/_header_content.html.haml
app/views/projects/blob/_header_content.html.haml
+1
-1
No files found.
app/models/blob.rb
View file @
cdf4ad81
...
...
@@ -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
...
...
app/views/projects/blob/_header_content.html.haml
View file @
cdf4ad81
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment