- 05 1月, 2017 3 次提交
-
-
由 Lin Jen-Shin 提交于
-
由 Lin Jen-Shin 提交于
We merge repository checks inside it so we don't have to check it on the call site, and we could also load the commit for the caller. This greatly reduce code duplication. Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_20572919
-
由 Lin Jen-Shin 提交于
-
- 20 12月, 2016 3 次提交
-
-
由 Hiroyuki Sato 提交于
-
由 Hiroyuki Sato 提交于
-
由 Hiroyuki Sato 提交于
-
- 14 12月, 2016 1 次提交
- 12 12月, 2016 1 次提交
-
-
由 Lin Jen-Shin 提交于
It's very weird that source_commit.raw_commit and rugged.branches[merge_request.target_branch].target should be completely the same. I checked with == and other values which proved that both should be the same, but still tests cannot pass for: spec/services/merge_requests/refresh_service_spec.rb I decided to give it up. We could just use SHA and that works fine anyway.
-
- 10 12月, 2016 1 次提交
-
-
由 Lin Jen-Shin 提交于
-
- 09 12月, 2016 3 次提交
-
-
由 Douwe Maan 提交于
Replace MR access checks with use of MergeRequestsFinder Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867
⚠ - Potentially untested💣 - No test coverage🚥 - Test coverage of some sort exists (a test failed when error raised)🚦 - Test coverage of return value (a test failed when nil used)✅ - Permissions check tested - [x]💣 app/finders/notes_finder.rb:17 - [x]⚠ app/views/layouts/nav/_project.html.haml:80 [`.count`] - [x]💣 app/controllers/concerns/creates_commit.rb:84 - [x]🚥 app/controllers/projects/commits_controller.rb:24 - [x]🚥 app/controllers/projects/compare_controller.rb:56 - [x]🚦 app/controllers/projects/discussions_controller.rb:29 - [x]✅ app/controllers/projects/todos_controller.rb:27 - [x]🚦 app/models/commit.rb:268 - [x]✅ lib/gitlab/search_results.rb:71 - [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#d1c10892daedb4d4dd3d4b12b6d071091eea83df_267_266 Memoize ` merged_merge_request(current_user)` - [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#d1c10892daedb4d4dd3d4b12b6d071091eea83df_248_247 Expected side effect for `merged_merge_request!`, consider `skip_authorization: true`. - [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#d1c10892daedb4d4dd3d4b12b6d071091eea83df_269_269 Scary use of unchecked `merged_merge_request?` See merge request !2033
- 08 12月, 2016 8 次提交
-
-
由 Lin Jen-Shin 提交于
commits from the other repository. We'll cleanup the tmp ref after we're done with our business.
-
由 Lin Jen-Shin 提交于
more consistent across different methodst
-
由 Lin Jen-Shin 提交于
by checking filename as well
-
由 Lin Jen-Shin 提交于
-
由 Lin Jen-Shin 提交于
-
由 Lin Jen-Shin 提交于
-
由 Lin Jen-Shin 提交于
-
由 Lin Jen-Shin 提交于
-
- 07 12月, 2016 4 次提交
-
-
由 Lin Jen-Shin 提交于
have the branch existed upfront. That is, `Rugged::Commit.create` rather than `Gitlab::Git::Blob.commit` which the former doesn't need to have the branch but the latter needs.
-
由 Lin Jen-Shin 提交于
-
由 Lin Jen-Shin 提交于
So we still commit outside the hooks, and only update ref inside the hooks. There are only two exceptions: * Whenever it's adding a tag. We can't add a tag without committing, unfortunately. See !7700 * Whenever source project is in another repository. We'll need to fetch ref otherwise commits can't be made. See the whole discussion starting from: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_19210942
-
- 06 12月, 2016 2 次提交
-
-
由 Yorick Peterse 提交于
This method already uses the cached method Repository#branch_count so there's no point in also caching has_visible_content?. Fixes gitlab-org/gitlab-ce#25278
-
由 Lin Jen-Shin 提交于
git operation inside GitHooksService. Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_19210942 TODO: Fix tests for update_branch_with_hooks
-
- 28 11月, 2016 2 次提交
-
-
由 Adam Niedzielski 提交于
We only know the tag SHA after we create the tag. This means that we pass a different value to the hooks that happen before creating the tag, and a different value to the hooks that happen after creating the tag. This is not an ideal situation, but it is a trade-off we decided to make. For discussion of the alternatives please refer to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7700#note_18982873 "pre-receive" and "update" hooks always get the SHA of the commit that the tag points to. "post-receive" gets the tag SHA if it is an annotated tag or the commit SHA if it is an lightweight tag. Currently we always create annotated tags if UI is used.
-
由 Adam Niedzielski 提交于
This reverts commit ae51774b.
-
- 25 11月, 2016 1 次提交
-
-
由 Lin Jen-Shin 提交于
-
- 24 11月, 2016 2 次提交
-
-
由 Lin Jen-Shin 提交于
-
由 Lin Jen-Shin 提交于
-
- 22 11月, 2016 1 次提交
-
-
由 Lin Jen-Shin 提交于
and keep it only called in update_branch_with_hooks.
-
- 21 11月, 2016 3 次提交
-
-
由 Yorick Peterse 提交于
This refactors repository caching so it's possible to selectively refresh certain caches, instead of just expiring and refreshing everything. To allow this the various methods that were cached (e.g. "tag_count" and "readme") use a similar pattern that makes expiring and refreshing their data much easier. In this new setup caches are refreshed as follows: 1. After a commit (but before running ProjectCacheWorker) we expire some basic caches such as the commit count and repository size. 2. ProjectCacheWorker will recalculate the commit count, repository size, then refresh a specific set of caches based on the list of files changed in a push payload. This requires a bunch of changes to the various methods that may be cached. For one, data should not be cached if a branch used or the entire repository does not exist. To prevent all these methods from handling this manually this is taken care of in Repository#cache_method_output. Some methods still manually check for the existence of a repository but this result is also cached. With selective flushing implemented ProjectCacheWorker no longer uses an exclusive lease for all of its work. Instead this worker only uses a lease to limit the number of times the repository size is updated as this is a fairly expensive operation.
-
由 Yorick Peterse 提交于
Initializing Rugged objects is way too expensive just to check if a repository exists. Even though we cache this data once in a while we have to refresh this. On GitLab.com we have seen Repository#exists? taking up to _1 minute_ to complete in the absolute worst case, though usually it sits around a second or so. Using File.exist? to instead check if $GIT_DIR/refs exists is a much faster way of checking if a repository was initialized properly.
-
由 Yorick Peterse 提交于
This moves the logic of detecting special repository files (e.g. a README or a Koding configuration file) to a single class: Gitlab::FileDetector. Moving this logic into a single place allows this to be re-used more easily. This commit also changes Repository#gitlab_ci_yaml so that its cached similar to other data (e.g. the Koding configuration file).
-
- 18 11月, 2016 1 次提交
-
-
由 Adam Niedzielski 提交于
We need to handle annotated tags that are created via GitLab UI. Annotated tags have their own SHA. We have to pass this SHA to post-receive hook to mirror what happens when someone creates an annotated tag in their local repository and pushes it via command line. In order to obtain tag SHA we first have to create it. This is a bit confusing because we create the tag before executing pre-hooks, but there is no way to create a tag outside the repository. If pre-hooks fail we have to clean up after ourselves.
-
- 16 11月, 2016 2 次提交
-
-
由 Nick Thomas 提交于
gitlab-shell v3.6.6 would give project paths like so: * namespace/project gitlab-shell v4.0.0 can give project paths like so: * /namespace1/namespace2/project * /namespace/project * /path/to/repository/storage/namespace1/namespace2/project * /path/to/repository/storage/namespace/project
-
由 Valery Sizov 提交于
-
- 15 11月, 2016 2 次提交
-
-
由 Lin Jen-Shin 提交于
-
由 Lin Jen-Shin 提交于
-