Commit 17d4b398 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'diff-parse-first-commit' into 'master'

Properly generate diff of orphan commits, like the first commit in a
repository

Fixes gitlab-org/gitlab_git#14

See merge request !2427
parents 65eae647 6b000bee
...@@ -5,6 +5,7 @@ v 8.5.0 (unreleased) ...@@ -5,6 +5,7 @@ v 8.5.0 (unreleased)
v 8.4.0 (unreleased) v 8.4.0 (unreleased)
- Add pagination headers to already paginated API resources - Add pagination headers to already paginated API resources
- Properly generate diff of orphan commits, like the first commit in a repository
- Improve the consistency of commit titles, branch names, tag names, issue/MR titles, on their respective project pages - Improve the consistency of commit titles, branch names, tag names, issue/MR titles, on their respective project pages
- Autocomplete data is now always loaded, instead of when focusing a comment text area (Yorick Peterse) - Autocomplete data is now always loaded, instead of when focusing a comment text area (Yorick Peterse)
- Improved performance of finding issues for an entire group (Yorick Peterse) - Improved performance of finding issues for an entire group (Yorick Peterse)
......
...@@ -56,8 +56,9 @@ module Gitlab ...@@ -56,8 +56,9 @@ module Gitlab
private private
def filename?(line) def filename?(line)
line.start_with?('--- /dev/null', '+++ /dev/null', '--- a', '+++ b', line.start_with?( '--- /dev/null', '+++ /dev/null', '--- a', '+++ b',
'--- /tmp/diffy', '+++ /tmp/diffy') '+++ a', # The line will start with `+++ a` in the reverse diff of an orphan commit
'--- /tmp/diffy', '+++ /tmp/diffy')
end end
def identification_type(line) def identification_type(line)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment