Commit Graph

49 Commits

Author SHA1 Message Date
GitLab Bot 06ac12d53c Add latest changes from gitlab-org/gitlab@master 2021-07-14 18:08:31 +00:00
GitLab Bot 0ae8428c8e Add latest changes from gitlab-org/gitlab@master 2021-05-11 21:10:21 +00:00
GitLab Bot e5e0589e09 Add latest changes from gitlab-org/gitlab@master 2021-04-26 12:09:44 +00:00
GitLab Bot dec7332357 Add latest changes from gitlab-org/gitlab@master 2021-01-07 18:10:38 +00:00
GitLab Bot 6d9c4dc2ef Add latest changes from gitlab-org/gitlab@master 2020-11-16 18:09:15 +00:00
GitLab Bot 2ac4833015 Add latest changes from gitlab-org/gitlab@master 2020-10-08 18:08:32 +00:00
GitLab Bot dc003cd08b Add latest changes from gitlab-org/gitlab@master 2020-03-26 18:08:03 +00:00
GitLab Bot ed45528885 Add latest changes from gitlab-org/gitlab@master 2020-02-22 12:08:58 +00:00
GitLab Bot 71c9d577ad Add latest changes from gitlab-org/gitlab@master 2020-02-03 21:09:00 +00:00
GitLab Bot 23288f62da Add latest changes from gitlab-org/gitlab@master 2020-01-29 15:08:59 +00:00
GitLab Bot b7dfe2ae40 Add latest changes from gitlab-org/gitlab@master 2019-09-13 13:26:31 +00:00
Ahmad Sherif 3c2b4a1ced Enable serving static objects from an external storage
It consists of two parts:

1. Redirecting users to the configured external storage
1. Allowing the external storage to request the static object(s)
   on behalf of the user by means of specific tokens

Part of https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/6829
2019-09-10 13:43:11 +02:00
Ahmad Sherif 7b76c8d644 Return an ETag headers for the archive endpoint
We use the relative path of the archive to check for archive staleness.
2019-07-23 20:37:49 +02:00
Nick Thomas 2845e8d973
Revert "Revert "Merge branch '24704-download-repository-path' into 'master'""
This reverts commit 171818df0a.
2019-04-16 15:16:23 +01:00
Patrick Bajao 171818df0a Revert "Merge branch '24704-download-repository-path' into 'master'"
This reverts commit 6c75bd015c, reversing
changes made to 1be7f5aaa3.
2019-04-11 15:49:53 +08:00
Patrick Bajao 6766a0a144 Download a folder from repository
Add `GetArchiveRequest` to git-archive params.

Modifies `Git::Repository#archive_metadata` to append `path`
to `ArchivePrefix` so it'll not hit the cache of repository archive
when it already exists.
2019-04-02 22:07:16 +08:00
Kia Mei Somabes e028276d34 Add download directory in menu
Add subdirectory params for RepositoriesController#archive
2019-04-02 22:06:56 +08:00
gfyoung 12ee2753c1 Enable even more frozen string in app/controllers
Enables frozen string for some vestigial files as
well as the following:

* app/controllers/projects/**/*.rb
* app/controllers/sherlock/**/*.rb
* app/controllers/snippets/**/*.rb
* app/controllers/users/**/*.rb

Partially addresses #47424.
2018-09-25 22:43:49 -07:00
Lin Jen-Shin 4ee08b77bc Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
Nick Thomas 276d4eb80c
Fix specifying a non-default ref when requesting an archive using the legacy URL 2018-04-19 12:47:23 +01:00
Stan Hu 5c735af3b5 Handle legacy repository archive requests with no ref given
The legacy endpoint requires no reference and defaults to the root
ref.

Closes #45154
2018-04-08 05:56:07 -07:00
James Ramsay 07f517d441 Add new repository archive route
Repository archives are always named `<project>-<ref>-<sha>` even if
the ref is a commit. A consequence of always including the sha even
for tags is that packaging a release is more difficult because both
the ref and sha must be known by the packager.

- add `<project>/-/archive/<ref>/<filename>.<format>` route using the
`-` separator to prevent namespace collisions. If the filename is
`<project>-<ref>` or the ref is a sha, the sha will be omitted,
otherwise the default filename will be used.
- deprecate previous archive route `repository/<ref>/archive`
2018-04-06 08:45:17 -04:00
Douwe Maan 8c3ba8d6c9 Add workhorse controller and API helpers 2016-06-06 13:16:30 +02:00
Robert Speicher cba2c437e5 Move RepositoryArchiveCacheWorker to sidekiq-cron
Closes #15105
2016-04-12 11:12:05 -04:00
Jacob Vosmaer 771f14b96e First version of "git archive" headers 2016-02-02 14:09:55 +01:00
Jacob Vosmaer cb13980db8 Let gitlab-git-http-server handle archive downloads
This change relies on changes in gitlab_git and gitlab-git-http-server.
2015-10-08 17:12:00 +02:00
Jeroen van Baarsen 5a4ebfb47a Fixed the Rails/ActionFilter cop
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-04-20 15:39:37 +02:00
Douwe Maan 91761b0685 Add tests. 2015-03-31 13:37:21 +02:00
Douwe Maan 2cfd0b59ae Archive repositories in background worker. 2015-03-31 12:52:20 +02:00
Dmitriy Zaporozhets 1da71cc520 Introduce shortcuts for routing helpers 2015-02-25 19:34:16 -08:00
Vinnie Okada 2a9eed6620 Merge branch 'master' into rails-4.1.9
Conflicts:
	app/views/projects/commits/_commit.html.haml
	app/views/projects/issues/_issue.html.haml
	app/views/projects/issues/_issue_context.html.haml
	app/views/projects/merge_requests/_merge_request.html.haml
	app/views/projects/merge_requests/show/_context.html.haml
2015-02-21 12:55:28 -07:00
Douwe Maan 00408f37e3 Move 'require_non_empty_project' filter to front so 'assign_ref_vars' doesn't 404. 2015-02-20 17:20:03 +01:00
Vinnie Okada 76aad9b76e Upgrade to Rails 4.1.9
Make the following changes to deal with new behavior in Rails 4.1.2:

* Use nested resources to avoid slashes in arguments to path helpers.
2015-02-14 11:09:23 -07:00
Dmitriy Zaporozhets 9d93729313
Move projects import to separate resource. Add bare repo creation to repository controller
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-11-30 00:50:25 +02:00
Valery Sizov 6f34d40436 remove auth duplication 2014-11-05 11:04:08 +02:00
Ciro Santilli 4d0d5e79ba Factor authorize_push! and authorize_code_access!
with existing method_missing. Pattern already used extensively,
so let's be consistent and use it everywhere.
2014-10-13 21:31:49 +02:00
Dmitriy Zaporozhets 20e0c9b132
Rewrite graphs feature
* remove commits stats page (will be replaced by graphs)
* remove additions/deletions from graph because of bad performance
* keep graph logic in gitlab

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-26 18:04:41 +03:00
Dmitriy Zaporozhets 619c81b488
Fix Commit stats and diff encoding issues
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-25 15:26:35 +03:00
Dmitriy Zaporozhets 1d63464c82
Fix repository archive
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-13 21:28:22 +03:00
Dmitriy Zaporozhets 593e262e40
Fix 500 on repo archive download
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-08 14:55:20 +03:00
ahmyi 4d051e987f Archive with content-length header 2014-07-03 11:05:51 +08:00
ahmyi dce6cb2d84 Content-length defined in header response
Enable Content-Length to be defined in header response
2014-07-03 10:57:01 +08:00
Marin Jankovski b2959c4102 Remove archives older than 2 hours. 2014-04-09 15:09:11 +02:00
Jacob Vosmaer 200eeea258 Make the repository downloads path configurable 2014-03-31 12:19:37 +02:00
Jason Hollingsworth 7cc2520541 Add support for various archive formats.
Used mime-types gem instead of hardcoding content types.
Allow multiple extensions in archive route (.tar.gz, .tar.bz2).
Change content disposition from infile(?) to attachment for api.
Fixed api would return “archive” instead of {project}-{hash}.{ext}
2014-01-02 10:18:56 -06:00
Dmitriy Zaporozhets 88c741dde0 Refactor recent branches page 2013-08-05 17:59:58 +03:00
Dmitriy Zaporozhets 132caae734 Move repo tags to own controller. add ability to remove tags 2013-07-16 23:12:52 +03:00
Dmitriy Zaporozhets 7a167cf1f7 Move branches list to own controller with pagination. Ability to remove branches from UI 2013-07-16 22:19:07 +03:00
Dmitriy Zaporozhets 2ed7cbfba4 Move projects controllers/views in Projects module 2013-06-23 19:47:22 +03:00