Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-04-17Method to track recoverable exceptions in sentryBob Van Landuyt
This adds a method to track errors that can be recovered from in sentry. It is useful when debugging performance issues, or exceptions that are hard to reproduce.
2018-03-16Ensure that we never assume old_blob or new_blob are nilSean McGivern
These can be a `BatchLoader` which is proxying a nil, while not being concrete nils themselves.
2018-03-15Only cache highlight results for latest MR diffsSean McGivern
Previously, we kept them all in the cache. We don't need the highlight results for older diffs - if someone does view that (which is rare), we can do the highlighting on the fly.
2018-02-22Fix 500 error when diff context line has broken encodingSean McGivern
Rugged sometimes chops a context line in between bytes, resulting in the context line having an invalid encoding: https://github.com/libgit2/rugged/issues/716 When that happens, we will try to detect the encoding for the diff, and sometimes we'll get it wrong. If that difference in encoding results in a difference in string lengths between the diff and the underlying blobs, we'd fail to highlight any inline diffs, and return a 500 status to the user. As we're using the underlying blobs, the encoding is 'correct' anyway, so if the string range is invalid, we can just discard the inline diff highlighting. We still report to Sentry to ensure that we can investigate further in future.
2018-01-07Fix error 500 when viewing commit and merge request diffsStan Hu
Due to the refactoring in !16082, `Blob#batch` no longer falls back to a default `blob_size_limit`. Since `Repository#batch_blobs` was using a default `nil` value, this would cause issues in the `Blob#find_by_rugged` method. This fix here is to be consistent and use a non-nil default value in `Repository#batch_blobs`. The problem was masked in development and tests because Gitaly is always enabled by default for all features. Closes #41735
2018-01-04Fix error when viewing diffs without blobsSean McGivern
Old merge requests can have diffs without corresponding blobs. (This also may be possible for commit diffs in corrupt repositories.) We can't use the `&.` operator on the blobs, because the blob objects are never nil, but `BatchLoader` instances that delegate to `Blob`. We can't use `Object#try`, because `Blob` doesn't inherit from `Object`. `BatchLoader` provides a `__sync` method that returns the delegated object, but using `itself` also works because it's forwarded, and will work for non-`BatchLoader` instances too. So the simplest solution is to just use that with the `&.` operator.
2017-12-07fix #39233 - 500 in merge requestMartin Nowak
- handle unchanged empty lines in inline diff
2017-11-28Ensure MRs always use branch refs for comparisonSean McGivern
If a merge request was created with a branch name that also matched a tag name, we'd generate a comparison to or from the tag respectively, rather than the branch. Merging would still use the branch, of course. To avoid this, ensure that when we get the branch heads, we prepend the reference prefix for branches, which will ensure that we generate the correct comparison.
2017-11-21Batchload blobs for diff generationZeger-Jan van de Weg
After installing a new gem, batch-loader, a construct can be used to queue data to be fetched in bulk. The gem was also introduced in both gitlab-org/gitlab-ce!14680 and gitlab-org/gitlab-ce!14846, but those mrs are not merged yet. For the generation of diffs, both the old blob and the new blob need to be loaded. This for every file in the diff, too. Now we collect all these so we do 1 fetch. Three `.allow_n_plus_1_calls` have been removed, which I expect to be valid, but this needs to be confirmed by a full CI run. Possibly closes: - https://gitlab.com/gitlab-org/gitlab-ce/issues/37445 - https://gitlab.com/gitlab-org/gitlab-ce/issues/37599 - https://gitlab.com/gitlab-org/gitlab-ce/issues/37431
2017-10-30Fix 500 error for old (somewhat) MRsAlexWayfer
2017-10-16Merge branch 'conflict-resolution-refactor' into 'master'Sean McGivern
Conflict resolution refactor See merge request gitlab-org/gitlab-ce!14747
2017-10-15Fix diff parser so it tolerates to diff special markers in the contentValery Sizov
2017-10-13Move line code generation into Gitlab::GitAlejandro Rodríguez
Having a distinct class just for that was a bit overkill
2017-10-13Create a Gitlab::Git submodule for conlict-related filesAlejandro Rodríguez
Rename classes to (hopefully) clearer names while we're doing that.
2017-10-13Move Gitlab::Diff::LineCode to module Gitlab::GitAlejandro Rodríguez
2017-10-07Commenting on image diffsFelipe Artur
2017-09-25Add specsDouwe Maan
2017-09-15Prepare Repository#merge for migration to GitalyJacob Vosmaer
2017-08-24Show un-highlighted diffs when blobs are the sameSean McGivern
For some old merge requests, we don't have enough information to figure out the old blob and the new blob for the file. This means that we can't highlight the diff correctly, but we can still display it without highlighting.
2017-08-22Always return a simple diff viewerSean McGivern
We didn't have a fallback case before, because we believed the conditions were exhaustive. They weren't, so we can always fallback to not previewing.
2017-08-17Don't escape html entities when rich == raw lineJarka Kadlecova
2017-08-01Ensure all project factories use `:repository` trait or `:empty_project`Robert Speicher
2017-07-31Remove unused (?) codeJacob Vosmaer
2017-07-27Use described_class when possibleRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27Remove superfluous lib: true, type: redis, service: true, models: true, ↵Rémy Coutable
services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-06-14Implement diff viewersDouwe Maan
2017-06-08Move diffable? method from Repository to Diff::FileDouwe Maan
2017-06-06Fix Diff::Position#diff_file for positions on straight diffsDouwe Maan
2017-05-26Merge branch 'dm-diff-cleanup' into 'master'Robert Speicher
Clean up diff rendering See merge request !11390
2017-05-24Add system note with link to diff comparison when MR discussion becomes outdatedDouwe Maan
2017-05-23Add question mark to Gitlab::Diff::File predicate methodsDouwe Maan
2017-05-12Merge branch 'dm-dependency-linker-gemfile' into 'master' Sean McGivern
Autolink package names in Gemfile See merge request !11224
2017-05-10Enable the Style/TrailingCommaInLiteral copRémy Coutable
Use the EnforcedStyleForMultiline: no_comma option. Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10Fix specsDouwe Maan
2017-05-10Extract generic parts of Gitlab::Diff::InlineDiffMarkerDouwe Maan
2017-04-24Fix commenting on an existing discussion on an unchanged line that is no ↵Douwe Maan
longer in the diff
2017-04-20Refactor changing files in web UIDouwe Maan
2017-03-15Fix specsDouwe Maan
2017-03-13take nonewline context into account in diff parsermhasbini
2017-02-23Revert "Enable Style/BarePercentLiterals"Douwe Maan
This reverts commit 96bef54154e669f9a3e92c3a4bc76c0be3a52e48.
2017-02-23Enable Style/BarePercentLiteralsDouwe Maan
2017-02-10Rename Files::DeleteService to Files::DestroyServicedixpac
Reason for renaming is to comply with naming convention of services in codebase.
2017-02-03Backport changes from EE squashSean McGivern
Backport changes from the EE-only squash implementation, which would otherwise conflict when merge CE into EE. <https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1024>
2017-02-03Merge branch 'fix-git-hooks-when-creating-file' into 'master' Douwe Maan
Don't execute git hooks if you create branch as part of other change Closes #23439 See merge request !7237
2017-02-02Active tense test coverageValery Sizov
Ports changes from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/642 back into CE
2017-01-26Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin
fix-git-hooks-when-creating-file * upstream/master: Ensure we have a project with a repo in GitlabMarkdownHelper specs Revert "Make sure TraceReader uses Encoding.default_external" Make sure TraceReader uses Encoding.default_external Update CONTRIBUTING.md after merging "up-for-grabs" and "Accepting Merge Requests" [ci skip] Use `:empty_project` where possible in finder specs Use `empty_project` where possible in controller specs Use `:empty_project` where possible in helper specs Don’t count tasks that are not defined as list items correctly Use a project factory with a repository where necessary Use `:empty_project` where possible throughout spec/lib Use hashrocket for dasherized attribute Remove markdown file extension and add anchor to link Fixed builds info link on project settings page Factories with a project association use `:empty_project` by default Update enviroments.md the example for deleting an environment is missing the "s" in environments. curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/environments/1" wil 404
2017-01-25Use `:empty_project` where possible throughout spec/libRobert Speicher
2017-01-06Fix renamingLin Jen-Shin
2016-12-26Fix MR with files hidden by .gitattributesSean McGivern
Don't try to highlight and cache files hidden by .gitattributes entries.
2016-12-02Fixes ActionView::Template::Error: undefined method `text?` for nil:NilClassValery Sizov