BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
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
repository.rb
lib/gitlab/git/repository.rb
+1
-1
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
...
@@ -201,7 +201,7 @@ module Gitlab
def
archive_prefix
(
ref
,
sha
)
def
archive_prefix
(
ref
,
sha
)
project_name
=
self
.
name
.
chomp
(
'.git'
)
project_name
=
self
.
name
.
chomp
(
'.git'
)
"
#{
project_name
}
-
#{
ref
.
parameterize
}
-
#{
sha
}
"
"
#{
project_name
}
-
#{
ref
.
tr
(
'/'
,
'-'
)
}
-
#{
sha
}
"
end
end
def
archive_metadata
(
ref
,
storage_path
,
format
=
"tar.gz"
)
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
...
@@ -90,6 +90,12 @@ describe Gitlab::Git::Repository, seed_helper: true do
expect
(
prefix
).
to
eq
(
"
#{
project_name
}
-test-branch-SHA"
)
expect
(
prefix
).
to
eq
(
"
#{
project_name
}
-test-branch-SHA"
)
end
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
end
describe
'#archive'
do
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