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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
45976540
Commit
45976540
authored
Mar 16, 2017
by
Mark Fletcher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix archive prefix bug for refs containing dots
parent
68e64a5b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
changelogs/unreleased/29565-name-of-the-uncompressed-folder-of-a-tag-archive-changed.yml
...e-of-the-uncompressed-folder-of-a-tag-archive-changed.yml
+4
-0
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+1
-1
spec/lib/gitlab/git/repository_spec.rb
spec/lib/gitlab/git/repository_spec.rb
+6
-0
No files found.
changelogs/unreleased/29565-name-of-the-uncompressed-folder-of-a-tag-archive-changed.yml
0 → 100644
View file @
45976540
---
title
:
Fix archive prefix bug for refs containing dots
merge_request
:
author
:
lib/gitlab/git/repository.rb
View file @
45976540
...
...
@@ -201,7 +201,7 @@ module Gitlab
def
archive_prefix
(
ref
,
sha
)
project_name
=
self
.
name
.
chomp
(
'.git'
)
"
#{
project_name
}
-
#{
ref
.
parameterize
}
-
#{
sha
}
"
"
#{
project_name
}
-
#{
ref
.
tr
(
'/'
,
'-'
)
}
-
#{
sha
}
"
end
def
archive_metadata
(
ref
,
storage_path
,
format
=
"tar.gz"
)
...
...
spec/lib/gitlab/git/repository_spec.rb
View file @
45976540
...
...
@@ -90,6 +90,12 @@ describe Gitlab::Git::Repository, seed_helper: true do
expect
(
prefix
).
to
eq
(
"
#{
project_name
}
-test-branch-SHA"
)
end
it
'returns correct string for a ref containing dots'
do
prefix
=
repository
.
archive_prefix
(
'test.branch'
,
'SHA'
)
expect
(
prefix
).
to
eq
(
"
#{
project_name
}
-test.branch-SHA"
)
end
end
describe
'#archive'
do
...
...
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