Commit Graph
43 Commits
Author SHA1 Message Date
Stan Hu 0fdfd2dd6e Fix Error 500 when viewing a blob with binary characters after the 1024-byte mark
Here was the problem:

1. When determining whether a given blob is viewable text, gitlab_git reads the first 1024 bytes and checks with Linguist whether it is a text or binary file.
2. If the blob is text, GitLab will attempt to display it.
3. However, if the text has binary characters after the first 1024 bytes, then GitLab will attempt to load the entire contents, but the encoding will be ASCII-8BIT since there are binary characters.
4. The Error 500 results when GitLab attempts to display a mix UTF-8 and ASCII-8BIT.

To fix this, we load as much data as we are willing to display so that the detection will work properly. Requires
an update to gitlab_git: gitlab-org/gitlab_git!86

Closes #13826
2016-06-12 07:36:25 -07:00
Douwe Maan fc1910ddc5 Merge branch 'adambutler/gitlab-ce-feature/support-diff-of-issue-title-rename'
# Conflicts:
#	app/services/system_note_service.rb
2016-05-20 16:23:04 -05:00
Adam ButlerandRémy Coutable 8a8b5497c5 Create DiffFilter and change SystemNoteService#change_title to use Gitlab::Diff::InlineDiff 2016-05-18 11:15:10 -05:00
Sean McGivern a9977f2b7a Syntax-highlight diffs in push emails
Based on:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/151
2016-05-17 13:23:17 +01:00
Matt Oakes 28dcdb2779 Support supressing text file diffs on the default branch with .gitattributes
This is a combination of 3 commits.

- Update the bare repositories info/attributes if the default branch is updated
- Check the diff attributes of a file before showing a diff
- Update CHANGELOG
2016-04-29 12:45:15 +01:00
Annabel Dunstone dab4ac54b6 Diff design updates 2016-04-07 15:33:18 -07:00
Annabel Dunstone de63de18d7 Update diff colors and icons 2016-04-07 15:33:18 -07:00
Arinde Eniola 367818d293 change the css class has_tooltip to has-tooltip universally 2016-03-20 21:37:22 +01:00
Stan Hu 79ad6e0e38 Fix bug where wrong commit ID was being used in a merge request diff to show old image
Closes #3769

Closes #14327
2016-03-19 13:28:40 -07:00
Yorick Peterse 3f0d780c19 Show a notice for diffs that are too large
This builds on the changes introduced in
https://gitlab.com/gitlab-org/gitlab_git/merge_requests/72 and results
in merge requests with large diffs (e.g. due to them containing minified
CSS) loading much faster.
2016-03-18 12:30:46 +01:00
Douwe Maan 677b4db9e6 Mark inline difference between old and new paths when a file is renamed 2016-01-29 19:37:17 +01:00
Douwe Maan 9369b7ec1f Fix MR diff 'Edit' button 2016-01-21 22:46:49 +01:00
Douwe Maan f4f4a6b530 Fix specs and behavior for LFS files 2015-12-18 16:14:12 +01:00
Douwe Maan d9c82d679f Automatically fork a project when not allowed to edit a file. 2015-12-18 10:03:34 +01:00
Douwe Maan 51ed5225ad Merge branch 'serve_lfs_object' into 'master'
Serve LFS object

Depends on gitlab-org/gitlab_git!57

See merge request !1976
2015-12-08 14:19:52 +00:00
Marin Jankovski bf17609e2a Rename blob helper, bump version of gitlab_git to 7.2.21. 2015-12-07 15:56:38 +01:00
Marin Jankovski e53b350cb6 Add specs for showing lfs object in UI. 2015-12-07 15:03:50 +01:00
Douglas Barbosa Alexandre 12fdc13ad3 Fix 500 error when creating a merge request that removes a submodule 2015-12-04 17:35:14 -02:00
Marin Jankovski b9a0f96d42 Don't show diffs for lfs pointers. 2015-12-04 12:01:08 +01:00
Douwe Maan 59c3ec4e67 Use file-type specific file icon in blame view and diff item 2015-12-02 14:55:36 +01:00
Douwe Maan e49190cad9 Don't use params[:view] directly. 2015-11-17 16:33:38 +01:00
Douwe Maan 8710739e4e Correctly find last known blob for file deleted in MR. 2015-10-20 14:24:02 +02:00
Stan Hu b5d9a613d9 Make diff file view easier to use on mobile screens 2015-10-09 05:01:27 -07:00
Dmitriy Zaporozhets fe7e97320c Fix bug when removed file was not appearing in merge request diff
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-09-30 12:31:23 +02:00
Dmitriy Zaporozhets e11e042d89 Fix diff header with submodule change
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-29 11:01:40 +02:00
Stan Hu 72a7febead Fix "Revspec not found" errors when viewing diffs in a forked project with submodules
Closes #1413
2015-04-27 20:42:38 -07:00
Dmitriy Zaporozhets 61700f619c Fix file mode going to next line in diff header 2015-03-23 09:38:52 -07:00
Dmitriy Zaporozhets 1cf138170c Add tooltip for comment toggle in diff. Add changelog item and fix tests 2015-03-18 20:12:19 -07:00
Dmitriy Zaporozhets e0f8e022f7 Improve comment toggle button in diff 2015-03-18 17:53:43 -07:00
Hannes Rosenögger 120f032b1a enable line wrapping by default and remove the checkbox to change it 2015-03-18 08:46:53 +01:00
Dmitriy Zaporozhets 30ca451fd4 Refactor buttons 2015-03-14 00:29:32 -07:00
Vinnie Okada 76aad9b76e Upgrade to Rails 4.1.9
Make the following changes to deal with new behavior in Rails 4.1.2:

* Use nested resources to avoid slashes in arguments to path helpers.
2015-02-14 11:09:23 -07:00
Headless 3d2aaa169e show diff in submodules 2015-01-19 17:18:08 +03:00
Dmitriy Zaporozhets eb84ee7a20 Better label for diffs 2015-01-15 15:19:58 -08:00
Arif Ali 1d8dcfaf8b fix deleted file display when using new gitlab_git gem, and add new gitlab_git gem 2014-12-30 21:59:38 +00:00
Dmitriy Zaporozhets e007d810c9 Merge pull request #7886 from cirosantilli/disable-blob-edit-mr
Disable / hide MR edit blob button if cannot edit.
2014-12-20 20:19:38 +02:00
Vinnie Okada 0084b8a776 Display renamed files in diff views
Show both the old and new filenames when viewing the diff for a renamed
file.
2014-10-06 21:42:07 -05:00
Sullivan SENECHAL 5d8be4438a Upgrade to Font Awesome v4.2 2014-10-03 12:19:24 +02:00
Ciro Santilli 81eacd1b2a Disable / hide MR edit blob button if cannot edit. 2014-10-02 12:12:51 +02:00
Ciro Santilli da4eff4add Only show text wrap and diff notes for text in MR. 2014-09-29 14:48:05 +02:00
Dmitriy Zaporozhets b897cc63a5 Fix 500 error on diff if file permission changed 2014-09-23 16:14:17 +03:00
Marin Jankovski 11eec88d97 Wrap should always be enabled for parallel diff. 2014-09-10 16:46:10 +02:00
Dmitriy Zaporozhets 218219abbd Refactoring inside refactoring. We need to go deeper
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-08 21:54:52 +03:00