summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
Commit message (Collapse)AuthorAgeFilesLines
* Initialize @statuses in status rather than constructorLin Jen-Shin2016-11-031-1/+2
| | | | | Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7034#note_17742312
* Merge status_for and status, feedback:Lin Jen-Shin2016-11-031-5/+1
| | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7034#note_17742297
* It's not used as a public API right now, feedback:Lin Jen-Shin2016-10-281-5/+4
| | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7034#note_17522443
* Still show status from pipelines, see:Lin Jen-Shin2016-10-271-7/+14
| | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7034#note_17397201 https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7034#note_17397461 https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6801#note_17468470 https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7034#note_17482654
* Pass `@ref` along so we know which pipeline to showLin Jen-Shin2016-10-241-0/+4
| | | | Closes #23615
* Use JavaScript tooltips for mentions (!5301)winniehell2016-09-011-9/+0
|
* Fix line commenting for the initial commitSean McGivern2016-08-191-1/+1
| | | | | The initial commit doesn't have a parent, so explicitly pass the blank SHA and handle that when calculating the position.
* Speed up Commit#repo_changesAhmad Sherif2016-08-031-1/+1
|
* switch from diff_file_collection to diffs20034-safe-diffsPaco Guzman2016-08-031-3/+7
| | | | So we have raw_diffs too
* Introduce Compare model in the codebase.Paco Guzman2016-08-031-1/+1
| | | This object will manage Gitlab::Git::Compare instances
* Move to Gitlab::Diff::FileCollectionPaco Guzman2016-08-031-0/+4
| | | Instead calling diff_collection.count use diff_collection.size which is cache on the diff_collection
* Expand commit message width in repo viewClement Ho2016-08-021-6/+8
|
* Add specs for caching commit authorStan Hu2016-07-271-7/+15
|
* Cache the commit author in RequestStore to avoid extra lookups in PostReceiveStan Hu2016-07-271-1/+8
| | | | | | | | In a PostReceive task with 697 commits (8.9 RC1 -> RC8), looking up the commit author takes about 10% of the time. Caching this information in RequestStore saves a few seconds from the overall processing time. Improves #18663
* Ensure relative paths for video are rewritten as we do for images20189-markdown-video-doesn-t-work-when-the-referenced-video-file-is-in-same-repoRémy Coutable2016-07-261-2/+2
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Represent DiffRefs as proper class instead of tuple arrayDouwe Maan2016-07-061-0/+7
|
* Optimize Banzai::Filter::RelativeLinkFilterAlejandro Rodríguez2016-06-211-0/+26
| | | | | | | | | | | | A lot of git operations were being repeated, for example, to build a url you would ask if the path was a Tree, which would call a recursive routine in Gitlab::Git::Tree#where, then ask if the path was a Blob, which would call a recursive routine at Gitlab::Git::Blob#find, making reference to the same git objects several times. Now we call Rugged::Tree#path, which allows us to determine the type of the path in one pass. Some other minor improvement added, like saving commonly used references instead of calculating them each time.
* Remove `projects` inclusion in `notes_with_associations` to skip some ↵Alejandro Rodríguez2016-06-081-1/+1
| | | | | | | | | | | | | | unnecessary queries `notes_with_associations` are used for `participant` declarations, but `Participable` only really cares about the target entity project, and not the participants projects. `notes_with_associations` are also used in `Commit::has_been_reverted?` which employs the reference extractor of the commit, so no references to the notes projects are made there (`Mentionable::all_references` cares only about the `author` and other `attr_mentionable`). A paralel situation occurs on `Issue::referenced_merge_requests`.
* Rename Ci::Commit to Ci::Pipeline and rename some of the ci_commit to pipelineKamil Trzcinski2016-06-021-3/+3
|
* Refactor ParticipableYorick Peterse2016-06-011-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several changes to this module: 1. The use of an explicit stack in Participable#participants 2. Proc behaviour has been changed 3. Batch permissions checking == Explicit Stack Participable#participants no longer uses recursion to process "self" and all child objects, instead it uses an Array and processes objects in breadth-first order. This allows us to for example create a single Gitlab::ReferenceExtractor instance and pass this to any Procs. Re-using a ReferenceExtractor removes the need for running potentially many SQL queries every time a Proc is called on a new object. == Proc Behaviour Changed Previously a Proc in Participable was expected to return an Array of User instances. This has been changed and instead it's now expected that a Proc modifies the Gitlab::ReferenceExtractor passed to it. The return value of the Proc is ignored. == Permissions Checking The method Participable#participants uses Ability.users_that_can_read_project to check if the returned users have access to the project of "self" _without_ running multiple SQL queries for every user.
* Merge branch 'ci-commit-as-pipeline' into 'master' Kamil Trzciński2016-04-211-3/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ci::Commit becomes a Pipeline object 1. Ci::Commit receives context: ref, :tag. 1. One Ci::Commit describes a one Pipeline 1. Pipeline is created from `.gitlab-ci.yml` 1. Pipeline is a ordered group of builds 1. We test MR against Pipeline 1. Pipelines have a separate view (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3703) 1. Pipeline can be triggered from UI (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3703) 1. Later we change `Trigger -> TriggerRequest -> Build` to `Trigger -> Pipeline` (future) 1. We add a Pipeline Hook that will be triggered on Pipeline status change (future) 1. We extend notifications to use `Pipeline Hook` to send summary on pipeline changes (future) After merging that I'll prepare a separate MR that will unify naming, database columns, table names: ``` Ci::Commit -> Pipeline Ci::Build -> Build CommitStatus -> Job GenericCommitStatus -> ExternalJob ci_commits -> pipelines ci_builds -> jobs ``` This MR implements first 5 points. This is made to solve this issue https://gitlab.com/gitlab-org/gitlab-ce/issues/14149. See merge request !3653
| * Merge remote-tracking branch 'origin/master' into ci-commit-as-pipelineKamil Trzcinski2016-04-161-5/+1
| |\ | | | | | | | | | | | | # Conflicts: # db/schema.rb
| * \ Merge remote-tracking branch 'origin/master' into ci-commit-as-pipelineKamil Trzcinski2016-04-131-3/+5
| |\ \
| * | | Use Ci::Commit as PipelineKamil Trzcinski2016-04-111-3/+4
| | | |
* | | | Merge branch '15139-fix-constants-redefinition-warnings' into 'master' Robert Speicher2016-04-191-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define constants only if not defined yet and freeze them Fixes #15139. See merge request !3810
| * | | | Get rid of more requires, which causes warnings when code is reloaded15139-fix-constants-redefinition-warningsRémy Coutable2016-04-191-3/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | | | Define constants only if not defined yet and freeze themRémy Coutable2016-04-191-3/+3
| | |_|/ | |/| | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | Add support to cherry-pick any commitP.S.V.R2016-04-181-0/+8
|/ / / | | | | | | | | | | | | Issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/12785 Merge Request: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3514
* | | Refactor and expose only Gitlab::UrlBuilder.build(record)simplify-gitlab-url_builder-15202Rémy Coutable2016-04-131-5/+1
| |/ |/| | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Allow to close invalid merge requestFelipe Artur2016-04-111-3/+5
|/
* Memoize reference_pattern/link_reference_patternmemoize-pattern-methodsYorick Peterse2016-04-011-2/+2
| | | | | These methods are called quite often in loops so by memoizing their output we can reduce timings a bit.
* Sanitize commit title when creating revert commit.issue_14453Rubén Dávila2016-03-221-1/+1
|
* Use Gitlab::Git::DiffCollectionsJacob Vosmaer2016-03-031-7/+9
|
* Ensure we don't check a commit's description for revert message if it has no ↵Rémy Coutable2016-02-221-1/+1
| | | | description
* More updates from the last code review.Rubén Dávila2016-02-191-1/+1
|
* Don't use `self` when looking for cross-references!Rubén Dávila2016-02-191-1/+1
|
* Some updates from last code review.Rubén Dávila2016-02-191-2/+2
|
* Don't show revert button if commit/MR has already been reverted.Rubén Dávila2016-02-191-6/+20
|
* Refactor commit message for revert commit.Rubén Dávila2016-02-191-3/+3
|
* No longer need to ignore temporary branch.Rubén Dávila2016-02-191-1/+1
| | | | | * Now it's only created when user choose to create a MR and logic to hide it is handled by https://gitlab.com/gitlab-org/gitlab-ce/blob/50595af7b0e304f16e2955109abd2d25cd96efda/app/helpers/application_helper.rb#L139
* Use a reference to the MR when reverting MRs.Rubén Dávila2016-02-191-1/+7
|
* Some updates after last code review.Rubén Dávila2016-02-191-3/+3
|
* Update copy and URLs used when reverting MRs.Rubén Dávila2016-02-191-0/+6
|
* Fix commit message plus other little fix.Rubén Dávila2016-02-191-1/+1
|
* Make it work for merge commits.Rubén Dávila2016-02-191-0/+4
|
* Add RevertService class with basic logic to revert commitRubén Dávila2016-02-191-0/+8
|
* Increase the minimum length for commit SHA matching to 7rs-issue-12706Robert Speicher2016-01-291-3/+3
| | | | | | This is the git default and will help to prevent false positive matches. Closes #12706
* Merge branch 'master' into tmp-reference-pipeline-and-cachingtmp-reference-pipeline-and-cachingDouwe Maan2015-12-101-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # spec/lib/gitlab/markdown/autolink_filter_spec.rb # spec/lib/gitlab/markdown/commit_range_reference_filter_spec.rb # spec/lib/gitlab/markdown/commit_reference_filter_spec.rb # spec/lib/gitlab/markdown/cross_project_reference_spec.rb # spec/lib/gitlab/markdown/emoji_filter_spec.rb # spec/lib/gitlab/markdown/external_issue_reference_filter_spec.rb # spec/lib/gitlab/markdown/external_link_filter_spec.rb # spec/lib/gitlab/markdown/issue_reference_filter_spec.rb # spec/lib/gitlab/markdown/label_reference_filter_spec.rb # spec/lib/gitlab/markdown/merge_request_reference_filter_spec.rb # spec/lib/gitlab/markdown/redactor_filter_spec.rb # spec/lib/gitlab/markdown/reference_gatherer_filter_spec.rb # spec/lib/gitlab/markdown/relative_link_filter_spec.rb # spec/lib/gitlab/markdown/sanitization_filter_spec.rb # spec/lib/gitlab/markdown/snippet_reference_filter_spec.rb # spec/lib/gitlab/markdown/syntax_highlight_filter_spec.rb # spec/lib/gitlab/markdown/table_of_contents_filter_spec.rb # spec/lib/gitlab/markdown/task_list_filter_spec.rb # spec/lib/gitlab/markdown/upload_link_filter_spec.rb # spec/lib/gitlab/markdown/user_reference_filter_spec.rb
| * Normalize email when looking for GitLab users from commit info. #3854issue_3854Rubén Dávila2015-12-091-2/+2
| |
* | Merge branch 'master' into reference-pipeline-and-cachingreference-pipeline-and-cachingDouwe Maan2015-12-081-2/+26
|\ \ | |/