Refactor extract method.
Some more tests describing the git-source's behavior.