Implement `git log` history simplification

When native `git log` is called with a pathspec, it only includes commits that
are not TREESAME to any parent (TREESAME means that pathspec is not modified
between the commit and its parent).  If more than one parent is TREESAME to the
commit, native git only follows the first one.  `Repository#log` now implements
these history simplification rules.
submodules in diff
Fix nested submodules

Make the `Repository#submodules` method work for submodules that are
nested below the root repo directory.
Adapt the tests to the latest gitlab-git-test repo
Add tests for nested submodules
Merge branch 'adapt_test_to_new_repo' into 'master'

Adapt the tests to the latest gitlab-git-test repo

See merge request !10
Merge branch 'nested-submodules' into 'master'

Fix nested submodules

Make the `Repository#submodules` method work with submodules that are nested beneath the repo's root directory.  This patch uses the existing `#tree_entry` method to recurse through the commit tree as an alternative to the patch in #6.

Fixes [issue 8135](https://github.com/gitlabhq/gitlabhq/issues/8135) on github.

/cc @jacobvosmaer @dzaporozhets

See merge request !9
Bump VERSION to 7.0.0.rc10
Fix .gitmodules parsing

Handle whitespace variations in the .gitmodules file when parsing it to
get submodule information.
Merge pull request #51 from mr-vinn/log-correctness

Implement `git log` history simplification
Merge branch 'master' of github.com:gitlabhq/gitlab_git
Merge pull request #37 from skv-headless/submodule-method

submodules in diff
Merge branch 'fix-submodule-parsing' into 'master'

Fix submodule parsing (again)

Fixes gitlab-org/gitlab-ce#714.  This addresses another bug in the `Repository#submodules` method, where the `.gitmodules` file is not parsed correctly if it contains unusual whitespace formatting.  I did not add any new tests for this change, but I did submit a merge request to the test repo at gitlab-org/gitlab-git-test!2 to introduce unusual whitespace in the test repo's `.gitmodules` file.  I have updated tests ready to go to handle the breakage inherent with a new commit in the test repo, I just need to plug in the SHAs of the merge commit and the new tag (if you create one).  When the test repo changes are merged, I'll open a new MR to update gitlab_git's tests.

/cc @jacobvosmaer @dzaporozhets

See merge request !11
Reduce memory use of Diff#strip_diff_headers

In a small test, this reduced the memory needed to load a large diff from
~1300MB to ~1000MB.
Guard against nil from sub! or chomp!
Merge branch 'avoid_string_copy' into 'master'

Reduce memory use of Diff#strip_diff_headers

In a small test, this reduced the memory needed to load a large diff from
~1300MB to ~1000MB.

See merge request !12
Do not hang on to Rugged::Patches inside Diff's

From what I can tell, we do not need the 'raw_diff' anymore after
initalizing the Gitlab::Git::Diff instance. By not sticking the
'raw_diff' in an instance variable we release it for garbage collection.
Use more Rugged enumerators

When you call Rugged::Diff#patches, you ask Rugged to instantiate all
patches in the diff and hand them to you in an array. This prevents
patches we no longer need from being garbage collected. By using
Rugged::Diff#each_patch we avoid creating an intermediate array.

The same applies to Rugged::Diff#deltas.
Improve submodule error handling

Add error handling for cases where the specified commit doesn't have a
.gitmodules file, or where the .gitmodules file contains a submodule
with an invalid path.
Avoid unnecessary string copies in #search_files

Before this change we were making multiple copies the file contents in
memory when searching for a line matching a pattern. This change loops
through lines one at a time, giving Ruby the opportunity to GC unused
strings.