Nick Thomas
672733aa66
Add an API endpoint to download git repository snapshots
2018-04-19 17:25:01 +01:00
Francisco Javier López
e8a27a67fa
Fix Custom hooks are not triggered by UI wiki edit
2018-04-18 17:50:56 +00:00
🙈 jacopo beschi 🙉
c6b1043e9d
Resolve "Make a Rubocop that forbids returning from a block"
2018-04-18 09:19:40 +00:00
Douwe Maan
019e881d44
Merge branch 'zj-uri-type-empty' into 'master'
...
Return nil on empty path
Closes gitaly#1115
See merge request gitlab-org/gitlab-ce!18430
2018-04-18 08:20:21 +00:00
Nick Thomas
b3ed751c0e
Merge branch 'zj-ref-exists-opt-out' into 'master'
...
Move Gitaly RefExists check to OPT_OUT
Closes gitaly#401
See merge request gitlab-org/gitlab-ce!18333
2018-04-17 17:37:08 +00:00
Zeger-Jan van de Weg
e02f1271f5
Return nil on empty path
...
The execution path wasn't clear from the error, but either way this is a
fix.
Closes gitlab-org/gitaly#1115
2018-04-17 16:30:18 +02:00
Stan Hu
cf955af157
Move uncached_has_local_branches? to a private method
2018-04-14 15:38:53 -07:00
Stan Hu
74e5ec198c
Fix failing ./spec/lib/backup/repository_spec.rb by clearing the memoized value
2018-04-14 15:36:36 -07:00
Stan Hu
b1f15dfa42
Memoize Git::Repository#has_visible_content?
...
This is called repeatedly when viewing a merge request, and this should
improve performance significantly by avoiding shelling out to git every time.
This should help https://gitlab.com/gitlab-com/infrastructure/issues/4027 .
2018-04-14 14:37:28 -07:00
Jacob Vosmaer (GitLab)
0c357db3a4
Remove bogus '|' symbol
2018-04-13 13:16:07 +00:00
Douwe Maan
ac149be040
Merge branch 'zj-storage-path-deprecation' into 'master'
...
Deprecate legacy disk paths
See merge request gitlab-org/gitlab-ce!18332
2018-04-13 08:16:39 +00:00
Zeger-Jan van de Weg
a752c56ca8
Deprecate legacy disk paths
...
Direct disk access is impossible on environments where components run in
their own container. There for constructing the path should not be done
except for exceptional cases.
One of the considerations, instead of logging, was to use Sentry. For
now I've chosen not to use this as the impact of this change is hard to
determine. Getting this in now will allow us to checkout the impact on
dev.gitlab.org and staging.
2018-04-12 15:23:36 +02:00
Douwe Maan
db6854b2cd
Merge branch 'backport-of-rd-3429-enabling-maximum-file-size-limit-in-repository-causes-pushes-to-fail' into 'master'
...
Backport of EE !4989
See merge request gitlab-org/gitlab-ce!18238
2018-04-12 08:46:36 +00:00
Zeger-Jan van de Weg
5173bc8a4c
Move Gitaly RefExists check to OPT_OUT
...
Part of the Gitaly migration as tracked in: https://gitlab.com/gitlab-org/gitaly/issues/401
Acceptance testing was done in: https://gitlab.com/gitlab-org/gitaly/issues/1014
2018-04-12 10:22:04 +02:00
Rubén Dávila
d28b1dfc46
Backport of EE !4989
2018-04-11 22:05:07 -05:00
Douwe Maan
b2f57a561f
Merge branch 'zj-info-attributes' into 'master'
...
Client implementation for InfoAttributes
See merge request gitlab-org/gitlab-ce!18261
2018-04-11 12:58:52 +00:00
Zeger-Jan van de Weg
c830b8e3b7
Client implementation for InfoAttributes
...
Clients can now request the attributes from `$GIT_DIR/info/attributes`
through Gitaly. The Gitaly migration is described in gitlab-org/gitaly#1082 .
The parser algorithm was implemented in a way it could handle both file
contents or a File handle, and both were already tested.
Other than that, using the boy scout rule, I've removed a class,
InfoAttributes, as it was delegating everything to the parser and
therefor wasn't really needed in my opinion.
2018-04-11 14:21:27 +02:00
Rémy Coutable
2a7d011afd
Merge branch 'zj-branch-containing-sha-opt-out' into 'master'
...
Branch with a commit detection defaults to Gitaly
See merge request gitlab-org/gitlab-ce!18304
2018-04-11 09:53:38 +00:00
Zeger-Jan van de Weg
bbbe40eae5
Tag with a commit detection defaults to Gitaly
...
By default this was an OPT_IN RPC, and now graduates to OPT_OUT as the
acceptance testing was successful in:
gitaly#1009
This follows the conventions of our [migration
process](https://gitlab.com/gitlab-org/gitaly/blob/master/doc/MIGRATION_PROCESS.md )
2018-04-11 09:31:11 +02:00
Zeger-Jan van de Weg
4d3f0998e0
Branch with a commit detection defaults to Gitaly
...
By default this was an OPT_IN RPC, and now graduates to OPT_OUT as the
acceptance testing was successful in:
https://gitlab.com/gitlab-org/gitaly/issues/1008
This follows the conventions of our [migration
process](https://gitlab.com/gitlab-org/gitaly/blob/master/doc/MIGRATION_PROCESS.md )
2018-04-11 09:13:02 +02:00
Grzegorz Bizon
a2a6a5cab6
Merge branch 'zj-find-license-opt-out' into 'master'
...
Move FindLicense RPC to OPT OUT status
See merge request gitlab-org/gitlab-ce!18228
2018-04-09 09:32:58 +00:00
Stan Hu
151d87e4a0
Merge branch 'da-gitaly-calculate-repository-checksum' into 'master'
...
Repository checksum calculation is handled by Gitaly when feature is enabled
See merge request gitlab-org/gitlab-ce!18210
2018-04-06 21:32:42 +00:00
Rémy Coutable
9e8f3058af
Merge branch 'fix-500-error-when-mr-ref-is-not-yet-fetched' into 'master'
...
Fix 500 error when MR from fork has conflicts but worker has not run
See merge request gitlab-org/gitlab-ce!18226
2018-04-06 16:38:41 +00:00
Douglas Barbosa Alexandre
76cd2d7881
Move checksum calculation to Gitlab::Git::Repository
2018-04-06 13:25:07 -03:00
Douglas Barbosa Alexandre
13992ac92e
Checksum calculation is handled by Gitaly when feature is enabled
2018-04-06 13:23:23 -03:00
Stan Hu
a18eea8c32
Automatically cleanup stale worktrees and lock files upon a push
...
git 2.16 will fail badly if there are stale worktrees.
Closes #44115
2018-04-06 08:17:07 -07:00
Douwe Maan
44f4a674e2
Merge branch 'jramsay-38830-tarball' into 'master'
...
Add alternative archive route
Closes #38830
See merge request gitlab-org/gitlab-ce!17225
2018-04-06 14:14:39 +00:00
Zeger-Jan van de Weg
4ca00b52cd
Move FindLicense RPC to OPT OUT status
...
Acceptance testing was successful in
https://gitlab.com/gitlab-org/gitaly/issues/1058 . So this is moved to
OPT OUT.
Part of https://gitlab.com/gitlab-org/gitaly/issues/1026
2018-04-06 16:13:01 +02: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
Sean McGivern
30bca22d08
Fix 500 error when MR from fork has conflicts but worker has not run
...
If the ref hasn't been fetched into the target repository yet, this will fail
with a Rugged::ReferencError (assuming we're not using Gitaly). We should handle
this in the same way as a missing ref.
2018-04-06 12:16:51 +01:00
Sean McGivern
dda326f1d3
Merge branch 'ce-4474-custom-additional-text-in-confirmation-email' into 'master'
...
Add custom additional text to emails -- CE backport
Closes gitlab-ee#4474
See merge request gitlab-org/gitlab-ce!18183
2018-04-05 10:20:15 +00:00
Sean McGivern
4ef3e835cf
Merge branch 'zj-opt-out-list-commits-by-oid' into 'master'
...
Move ListCommitsByOid to OPT_OUT
See merge request gitlab-org/gitlab-ce!18175
2018-04-05 08:48:06 +00:00
James Ramsay
0b1b9c409d
Add option to suppress archive commit sha
...
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 append_sha option (defaults true) to provide a method for
toggling this feature.
Support added to GitLab Workhorse by gitlab-org/gitlab-workhorse!232
2018-04-04 16:56:18 -04:00
Eric Eastwood
a6c7d8050e
Add custom additonal email text to all emails
...
Fix https://gitlab.com/gitlab-org/gitlab-ee/issues/4474
Conflicts:
db/schema.rb
ee/app/controllers/ee/admin/application_settings_controller.rb
ee/app/helpers/ee/application_settings_helper.rb
ee/app/models/ee/application_setting.rb
ee/app/models/license.rb
ee/app/views/layouts/service_desk.html.haml
ee/app/views/notify/approved_merge_request_email.html.haml
ee/app/views/notify/service_desk_new_note_email.text.erb
ee/app/views/notify/service_desk_thank_you_email.text.erb
ee/app/views/notify/unapproved_merge_request_email.html.haml
ee/lib/ee/api/entities.rb
ee/spec/controllers/admin/application_settings_controller_spec.rb
ee/spec/models/application_setting_spec.rb
ee/spec/requests/api/settings_spec.rb
lib/api/settings.rb
spec/mailers/previews/notify_preview.rb
2018-04-04 12:29:03 -05:00
Zeger-Jan van de Weg
39cc4a9202
Bulk deleting refs is handled by Gitaly by default
...
Has been stable for a while in production, so this endpoint grew out if
OPT_IN, the default state.
Part of https://gitlab.com/gitlab-org/gitaly/issues/526
2018-04-04 18:03:24 +02:00
Zeger-Jan van de Weg
2ba0118505
Move ListCommitsByOid to OPT_OUT
...
Acceptence testing was successfull in
[#844 ](https://gitlab.com/gitlab-org/gitaly/issues/844 )
Part of gitlab-org/gitaly#670
2018-04-04 16:41:43 +02:00
Sean McGivern
c353426650
Merge branch 'fix/use-shard-name-in-gitlab-projects-instead-of-shard-path' into 'master'
...
Use shard name in Git::GitlabProjects instead of shard path
Closes gitaly#1110
See merge request gitlab-org/gitlab-ce!18015
2018-04-04 09:20:19 +00:00
Douglas Barbosa Alexandre
563d38e81e
Backport Gitlab::Git::Checksum to CE
2018-04-03 15:36:43 -03:00
Ahmad Sherif
ddfc661f79
Use shard name in Git::GitlabProjects instead of shard path
...
Closes gitaly#1110
2018-04-03 16:22:13 +02:00
Stan Hu
6fd1d07cfc
Handle CR-LFs properly in .gitmodules file
...
Any submodule lines that had a CR-LF ending would be ignored by the parser.
Closes gitlab-org/gitlab-ce#2262
2018-03-30 15:23:44 -07:00
Jacob Vosmaer (GitLab)
b942462788
Remove support for absolute dirs from Git::Env
2018-03-30 09:19:46 +00:00
Sean McGivern
c113b70057
Merge branch 'dm-refs-contains-sha-encoding' into 'master'
...
Fix listing commit branch/tags that contain special characters
Closes #43212
See merge request gitlab-org/gitlab-ce!18023
2018-03-28 09:02:09 +00:00
Douwe Maan
39c911eaaa
Fix listing commit branch/tags that contain special characters
2018-03-27 18:20:08 +02:00
Sean McGivern
70af1e2e03
Fix 500 error when trying to resolve non-ASCII conflicts in editor
...
When we added caching, this meant that calling `can_be_resolved_in_ui?` didn't
always call `lines`, which meant that we didn't get the benefit of the
side-effect from that, where it forced the conflict data itself to UTF-8.
To fix that, make this explicit by separating the `raw_content` (any encoding)
from the `content` (which is either UTF-8, or an exception is raised).
2018-03-23 18:33:14 +00:00
Sean McGivern
bb9d360c0a
Merge branch 'mark-legacy-git-access' into 'master'
...
Route path lookups through legacy_disk_path
See merge request gitlab-org/gitlab-ce!17743
2018-03-23 10:20:45 +00:00
Kamil Trzciński
be0ce05c5d
Merge branch 'ci-pipeline-commit-lookup' into 'master'
...
Use porcelain commit lookup method on CI::CreatePipelineService
Closes charts/helm.gitlab.io#291
See merge request gitlab-org/gitlab-ce!17911
2018-03-22 21:09:19 +00:00
Alejandro Rodríguez
04b8e00feb
Use porcelain commit lookup method on CI::CreatePipelineService
...
Before we were using a "plumbing" Gitlab::Git method that does not go
through Gitaly migration checking.
2018-03-22 11:39:20 -03:00
Jacob Vosmaer
008a6a6ce6
Route path lookups through legacy_disk_path
2018-03-21 18:18:32 +01:00
Ahmad Sherif
d0a1da526e
Remove calls to clear_cache from Git::Wiki
...
They were probably added to compensate for tests shortcomings, but now
they don't complain.
Closes gitaly#1095
2018-03-21 18:08:09 +01:00
Sean McGivern
8ccf7f328d
Merge branch '44280-fix-code-search' into 'master'
...
Resolve "Search code blob sometimes shows filename and branch"
Closes #44280
See merge request gitlab-org/gitlab-ce!17777
2018-03-20 08:47:45 +00:00