summaryrefslogtreecommitdiff
path: root/spec/models/commit_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add # frozen_string_literal to spec/modelsThong Kuah2019-04-011-0/+2
| | | | Adds `# frozen_string_literal: true` to spec/models ruby files
* Add back Rugged support for retrieving a commit tree entryStan Hu2019-03-081-1/+15
| | | | | | | | | | | | | | | | | | | | This brings back some of the changes in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20176/diffs. We discovered another N+1 that hits Gitaly `TreeEntry` via the `RelativeLinkFilter`: https://gitlab.com/gitlab-org/gitlab-ce/issues/58657. When a blob is loaded with many relative links, `TreeEntry` is called for each link to scan the URI type. There are multiple paths that hit Gitaly `TreeEntry`, and https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25706 did not cover all cases. This commit covers another common use case. For users using Gitaly on top of NFS, accessing the Git data directly via Rugged may be faster than going through than Gitaly. This merge request introduces the feature flag `rugged_commit_tree_entry` to activate the Rugged method.
* [master] Pipelines section is available to unauthorized usersKamil Trzciński2019-01-311-0/+1
|
* Truncate merge request titles with periods instead of ellipsisStan Hu2018-12-061-1/+1
| | | | Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54862
* Match users better by their private commit emailNick Thomas2018-11-191-1/+23
| | | | | | Private commit emails were introduced in !22560, but some parts of GitLab were not updated to take account of them. This commit adds support in places that were missed.
* Merge branch 'fix-committer-typo' into 'master'Rémy Coutable2018-09-251-4/+4
|\ | | | | | | | | | | | | Fix committer typo Closes #51808 See merge request gitlab-org/gitlab-ce!21899
| * Fix committer typoGeorge Tsiolis2018-09-251-4/+4
| |
* | Use `Gitlab::SafeRequestStore` in more placesMichael Kozono2018-09-241-1/+1
|/ | | | | | Even if it doesn’t save lines of code, since people will tend to use code they’ve seen. And `SafeRequestStore` is safer since you don’t have to remember to check `RequestStore.active?`.
* Make it clearer when Commit#description returns no_commit_messageSean McGivern2018-08-211-4/+5
|
* to avoid “NoMethodError (undefined method `split' for nil:NilClass)” ↵yisiliang2018-08-211-0/+5
| | | | while safe_message is nil.
* Client-side fix for Gitaly TreeEntry buggitaly-tree-entry-dot-dotJacob Vosmaer2018-06-261-20/+11
|
* Preload pipeline data for project pipelinesYorick Peterse2018-05-171-4/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When displaying the pipelines of a project we now preload the following data: 1. Authors of the commits that belong to these pipelines 2. The number of warnings per pipeline, which is used by Ci::Pipeline#has_warnings? == Commit Authors Previously this data was queried for every Commit separately, leading to 20 SQL queries being executed in the worst case. With an average of 3 to 5 milliseconds per SQL query this could result in 100 milliseconds being spent in _just_ getting Commit authors. To preload this data Commit#author now uses BatchLoader (through Commit#lazy_author), and a separate module Gitlab::Ci::Pipeline::Preloader is used to ensure all authors are loaded before they are used. == Number of warnings This changes Ci::Pipeline#has_warnings? so it supports preloading of the number of warnings per pipeline. This removes the need for executing a COUNT(*) query for every pipeline just to see if it has any warnings or not.
* Workhorse to send raw diff and patch for commitsZeger-Jan van de Weg2018-05-161-1/+0
| | | | | | | | | | | | | Prior to this change, this was done through unicorn. In theory this could time out. Workhorse has been sending these raw patches and diffs for a long time and is stable in doing so. Added bonus is the fact that `Commit#to_patch` can be removed. `Commit#to_diff` too, which closes https://gitlab.com/gitlab-org/gitaly/issues/324 Closes https://gitlab.com/gitlab-org/gitaly/issues/1196
* Return nil on empty pathZeger-Jan van de Weg2018-04-171-0/+5
| | | | | | | The execution path wasn't clear from the error, but either way this is a fix. Closes gitlab-org/gitaly#1115
* Fix an order dependency in a specNick Thomas2018-01-291-3/+3
|
* Migrate Commit#uri_type to Gitalyfeature/migrate-commit-uri-to-gitalyAhmad Sherif2018-01-151-7/+17
| | | | Closes gitaly#915
* Display related merge requests in commit detail pageHiroyuki Sato2018-01-121-0/+13
|
* Remove the Commit#tree methodremove-commit-treeJacob Vosmaer2018-01-041-1/+0
|
* Replace '.team << [user, role]' with 'add_role(user)' in specs36782-replace-team-user-role-with-add_role-user-in-specsblackst0ne2017-12-221-2/+2
|
* Load commit in batches for pipelines#indexZeger-Jan van de Weg2017-12-191-0/+39
| | | | | | | | | | Uses `list_commits_by_oid` on the CommitService, to request the needed commits for pipelines. These commits are needed to display the user that created the commit and the commit title. This includes fixes for tests failing that depended on the commit being `nil`. However, now these are batch loaded, this doesn't happen anymore and the commits are an instance of BatchLoader.
* Optimise getting the pipeline status of commitsci-pipeline-status-queryYorick Peterse2017-11-161-2/+9
| | | | | This adds an optimised way of getting the latest pipeline status for a list of Commit objects (or just a single one).
* Prepare Repository#merge for migration to Gitalyoperation-service-mergeJacob Vosmaer2017-09-151-6/+1
|
* Improve description of a Commit#cherry_pick_message UTSaverio Miroddi2017-08-221-2/+2
|
* Fix rubocop errors in spec/models/commit_spec.rbSaverio Miroddi2017-08-211-2/+0
|
* Add UT for cherry-pick of an existing merge that is not foundSaverio Miroddi2017-08-211-19/+30
|
* Reverse order of commits in MR cherry-pick messageSaverio Miroddi2017-08-211-2/+3
| | | | Also improved the UT for better documenting this change.
* Remove redundant statement part in a test suiteSaverio Miroddi2017-08-181-1/+1
|
* Correct the cherry-pick message for merge commitsSaverio Miroddi2017-08-171-8/+35
| | | | | The list of commits must be generated from the merge request, not from a diff of the branches.
* Extended UTs for the new cherry-pick message formatSaverio Miroddi2017-08-161-0/+24
|
* Incorporate Gitaly's CommitService.FindCommit RPCgitaly-find-commitAlejandro Rodríguez2017-08-071-1/+1
|
* Refactor Gitlab::Git::Commit to include a repositoryAlejandro Rodríguez2017-08-071-2/+0
|
* Change all `:empty_project` to `:project`rs-empty_project-defaultRobert Speicher2017-08-021-1/+1
|
* Rename many path_with_namespace -> full_pathGabriel Mazetto2017-08-011-1/+1
|
* Remove superfluous lib: true, type: redis, service: true, models: true, ↵Rémy Coutable2017-07-271-1/+1
| | | | | | services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
* Use RequestStoreWrap for Commit#authorLin Jen-Shin2017-07-181-5/+3
| | | | | | | We also try to use instance variable to cache the result if RequestStore is not available, so we could keep the same logic, using the same cache key. Also introduce a way to specify method specific cache key
* Correct RSpec/SingleLineHook cop offensesRobert Speicher2017-06-141-3/+9
|
* Fix linting, route, and specsRémy Coutable2017-06-091-1/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Fix spec failures and add a feature flag for the performance barRémy Coutable2017-06-091-1/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Merge branch '12614-fix-long-message' into 'master'Dmitriy Zaporozhets2017-06-081-2/+24
|\ | | | | | | | | | | | | Fix long urls in the title of commit Closes #12614 See merge request !10938
| * Fix long urls in the title of commitAlexander Randa2017-05-121-2/+24
| |
* | Add support for deltas_only under GitalyAhmad Sherif2017-05-131-15/+0
| | | | | | | | Closes gitaly#199
* | Remove deltas_only from DiffCollectionJacob Vosmaer2017-05-111-17/+4
| |
* | Re-enable Gitaly commit_raw_diff featureAhmad Sherif2017-05-071-28/+27
| |
* | Rename latest_pipeline to last_pipelinealways-show-latest-pipeline-in-commit-boxLin Jen-Shin2017-05-031-3/+3
|/ | | | | | | | As it might be confusing that it's not the same as Pipeline#latest Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11038#note_28677090
* Setup and run a Gitaly server for testing if GitalyClient is enabledgitaly-testingAlejandro Rodríguez2017-04-111-27/+28
|
* Merge branch 'feature/use-gitaly-for-commit-show' into 'master'Robert Speicher2017-03-171-0/+28
|\ | | | | | | | | Use Gitaly for CommitController#show See merge request !9629
| * Use Gitaly for CommitController#showfeature/use-gitaly-for-commit-showAhmad Sherif2017-03-151-0/+28
| |
* | Adds pipeline mini-graph to system information box in Commit ViewFilipa Lacerda2017-03-161-0/+19
|/
* Use `:empty_project` where possible in model specsrs-empty_project-modelsRobert Speicher2017-01-261-7/+7
|
* Allows to search within project by commit's hashYarNayar2017-01-241-0/+18
| | | | Was proposed in #24833