gitlab-org--gitlab-foss/app
Pierre de La Morinerie 18295585d9 Fix MergeRequest#source_sha when there is no diff
`MergeRequest#source_sha` is expected to return the sha of the source
branch last commit.

But when a open Merge Request has no diff (e.g. all commits have already
been merged to the target branch), `merge_request.source_sha`
incorrectly returns `nil`.

This was un-noticed before – but now that !2217 has been merged,
it makes `Gitlab::Git::Commit.between` raise an
"Unexpected nil argument" exception.

This fixes the crash, by making sure that `source_sha` returns a
correct result even when there is no diff available.
2016-03-16 14:02:04 +01:00
..
assets Merge branch 'dropdown-vertical-spacing' into 'master' 2016-03-15 20:18:56 +00:00
controllers Clearify who deletes the user 2016-03-15 21:09:25 +01:00
finders Merge branch 'share-project-ce' into 'master' 2016-03-14 16:38:52 +00:00
helpers Improving the original label-subscribing implementation 2016-03-15 18:22:02 +01:00
mailers Create a SentNotification record for #relabeled_issue_email / #relabeled_merge_request_email 2016-03-15 18:36:54 +01:00
models Fix MergeRequest#source_sha when there is no diff 2016-03-16 14:02:04 +01:00
services Clearify who deletes the user 2016-03-15 21:09:25 +01:00
uploaders Revert "Merge branch 'avatar-cropping' into 'master' " 2016-03-15 14:55:40 +01:00
validators Allow webhooks URL to have leading and trailing spaces 2016-02-26 14:34:06 -05:00
views Typo 2016-03-15 15:09:55 -05:00
workers Add ability to delete a user with force 2016-03-15 21:09:25 +01:00