Brian Neel
9770c57fab
Re-enable SqlInjection and CommandInjection
2017-08-08 10:50:54 -04:00
Jacob Vosmaer
7b18c42464
Remove unused (?) code
2017-07-31 17:19:25 +02:00
Douwe Maan
5e8aca2152
Don't display comment on unchanged line on both sides in parallel diff
2017-06-19 11:50:46 -05:00
Douwe Maan
7944254563
Implement diff viewers
2017-06-14 10:12:21 -05:00
Sean McGivern
e9002222a0
Merge branch 'dm-diff-file-diffable' into 'master'
...
Move diffable? method from Repository to Diff::File
See merge request !11980
2017-06-08 16:14:56 +00:00
Douwe Maan
e6e29f9220
Use Diff::File blob methods from diff highlighter
2017-06-08 09:39:54 -05:00
Douwe Maan
ffbbd4112e
Move diffable? method from Repository to Diff::File
2017-06-08 09:32:57 -05:00
Douwe Maan
3a5d375e49
Fix Diff::Position#diff_file for positions on straight diffs
2017-06-06 14:48:05 -05:00
Sean McGivern
c1ee45953e
Merge branch 'fix_diff_line_comments' into 'master'
...
Fix: A diff comment on a change at last line of a file shows as two comments in discussion
Closes #32353
See merge request !11802
2017-06-01 10:30:46 +00:00
Valery Sizov
563c1ca01c
Fix: A diff comment on a change at last line of a file shows as two comments in discussion
2017-05-31 18:38:10 +03:00
Douwe Maan
aed0387f97
Consistent diff and blob size limit names
2017-05-29 17:02:02 -05:00
Robert Speicher
8e2fefc6c4
Merge branch 'dm-diff-cleanup' into 'master'
...
Clean up diff rendering
See merge request !11390
2017-05-25 22:15:57 +00:00
Douwe Maan
d88a5c1db1
Address feedback
2017-05-25 15:17:57 -05:00
Douwe Maan
0bf339f0ed
Address review
2017-05-24 10:10:10 -05:00
Douwe Maan
6e698b254e
Fix specs
2017-05-23 16:27:30 -05:00
Douwe Maan
ab91f76e8b
Add system note with link to diff comparison when MR discussion becomes outdated
2017-05-23 16:27:30 -05:00
Douwe Maan
7c479d88a9
Pass fallback_diff_refs to Diff::File instead of using view helpers
2017-05-23 15:37:05 -05:00
Douwe Maan
db40c668de
Rename Diff::File {old,new}_ref to {old,new}_sha
2017-05-23 15:37:04 -05:00
Douwe Maan
d9a0188d2f
Add question mark to Gitlab::Diff::File predicate methods
2017-05-23 15:37:04 -05:00
Douwe Maan
7a7e9288d4
Stop MR conflict code from blowing up when branches are missing
2017-05-18 15:48:42 -05:00
Douwe Maan
e179707844
Extract generic parts of Gitlab::Diff::InlineDiffMarker
2017-05-10 08:26:21 -05:00
Sean McGivern
a0979c05fd
Show correct size when MR diff overflows
...
The problem is that we often go via a diff object constructed from the diffs
stored in the DB. Those diffs, by definition, don't overflow, so we don't have
access to the 'correct' `real_size` - that is stored on the MR diff object
iself.
2017-04-25 16:54:10 +01:00
Douwe Maan
63d38a303b
Fix commenting on an existing discussion on an unchanged line that is no longer in the diff
2017-04-24 11:17:15 -05:00
Douwe Maan
2c0de7aaaf
Cache MR diffs by diff refs
2017-04-08 14:37:46 -05:00
Douwe Maan
afa53810de
Fix specs
2017-04-05 17:44:14 +01:00
Douwe Maan
bb8cc94668
Don't use original_discussion_id
2017-04-05 17:44:14 +01:00
Douwe Maan
f6f6aaf593
Better notification emails for notes and (diff) discussions
2017-04-05 17:44:14 +01:00
mhasbini
985af1a670
take nonewline context into account in diff parser
2017-03-13 22:09:43 +02:00
Douwe Maan
5c7f9d69e3
Fix code for cops
2017-02-23 09:31:57 -06:00
Douwe Maan
8a4d68c53e
Enable Style/ConditionalAssignment
2017-02-23 09:31:57 -06:00
Douwe Maan
ccbebbdfeb
Enable Performance/RedundantMatch
2017-02-23 09:31:57 -06:00
Douwe Maan
b7d8df503c
Enable Style/MutableConstant
2017-02-23 09:31:56 -06:00
Robert Speicher
17c8d15b14
Enable `Lint/EmptyWhen` cop and correct offense
2017-02-13 11:00:20 -05:00
Sean McGivern
1e5e56c698
Fix MR with files hidden by .gitattributes
...
Don't try to highlight and cache files hidden by .gitattributes entries.
2016-12-26 16:25:55 +00:00
Valery Sizov
f5d7a61760
Fixes ActionView::Template::Error: undefined method `text?` for nil:NilClass
2016-12-02 14:03:30 +02:00
Valery Sizov
847ada36c4
Fix: Timeout creating and viewing merge request for binary file
2016-11-25 15:25:01 +02:00
Stan Hu
0f61bb2dc5
Fix Error 500 when creating a merge request that contains an image that was deleted and added
...
Steps to reproduce:
1. Start with a repo with an image
2. Add a commit to delete the image
3. Add another commit to replace the image with another image
In a diff comparison, we really just compare about what the image was before the diff, not
the direct parent of the last commit. This MR fixes that.
Closes #3893 , gitlab-org/gitlab-ee#678
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-14 15:57:01 +01:00
Adam Niedzielski
3fa265d195
Fix expanding a collapsed diff when converting a symlink to a regular file
...
In this case comparing old_path and new_path is not enough because there
are two entires that match.
2016-11-10 18:24:12 +01:00
Adam Niedzielski
317e48193f
Fix the diff in the merge request view when converting a symlink to a regular file.
...
In this specific case using file_path as a cache key is not enough,
because there are two entries with the same path.
Closes #21610 .
2016-10-17 18:09:34 +02:00
Dmitriy Zaporozhets
9329436deb
Merge branch 'master' into dz-merge-request-version
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-08-22 11:34:41 +03:00
Sean McGivern
4a4c1765be
Fix line commenting for the initial commit
...
The initial commit doesn't have a parent, so explicitly pass the blank
SHA and handle that when calculating the position.
2016-08-19 16:35:44 +01:00
Dmitriy Zaporozhets
6db65143db
Merge branch 'master' into dz-merge-request-version
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-08-19 13:01:58 +03:00
Dmitriy Zaporozhets
643a368fa4
Make merge request diff works with new FileCollection logic
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-08-15 17:57:19 +03:00
Sean McGivern
261d47bce9
Fix specs
...
- Add match line header to expected result for `File#sections`.
- Lowercase CSS colours.
- Remove unused `diff_refs` keyword argument.
- Rename `parent` -> `parent_file`, to be more explicit.
- Skip an iteration when highlighting.
2016-08-12 23:24:46 +03:00
Sean McGivern
7af277f683
Auto-highlight conflict when rich_text is called
2016-08-12 23:24:43 +03:00
Sean McGivern
df2ed097b7
Add backend for merge conflicts reading
2016-08-12 23:24:43 +03:00
Paco Guzman
c86c1905b5
switch from diff_file_collection to diffs
...
So we have raw_diffs too
2016-08-03 07:00:20 +02:00
Paco Guzman
1d0c7b7492
Introduce Compare model in the codebase.
...
This object will manage Gitlab::Git::Compare instances
2016-08-03 07:00:20 +02:00
Paco Guzman
8f359ea917
Move to Gitlab::Diff::FileCollection
...
Instead calling diff_collection.count use diff_collection.size which is cache on the diff_collection
2016-08-03 07:00:20 +02:00
Paco Guzman
cd7c2cb6dd
Cache highlighted diff lines for merge requests
...
Introducing the concept of SafeDiffs which relates
diffs with UI highlighting.
2016-08-03 07:00:19 +02:00