fix issue #383
Merge branch 'maint'
Merge branch 'master' into next
first shot at unit testing magit
use mocker

add nested repository init test
fix batch run
fail tests when mocker is not available
add basic tests for unstaged and staged files
add test for bug #383
Merge branch 'yh/unit-tests'
Merge branch 'master' into next
Make `magit-merge' work even if we're not in a magit buffer

This is a matter of not throwing errors when `magit-current-section'
returns nil.
Remove a TODO comment that's been done for a while.
Add "refs/stash" to magit-uninteresting-refs
Fix to magit-remote-branch-for

Give a sane result if LOCAL-BRANCH is really set up to track another
local branch.  In that case you should get something starting with
"heads/" instead of "remotes/".  Therefore, also change the name of
the parameter `prepend-remote-name' to the more general
`fully-qualified-name'.
Refactor magit-list-interesting-refs

Pull the logic that formats refs as either "remote/branch" or "branch
(remote)" out into its own function, called `magit-format-ref'
Fix default rev in magit-rebase-step

Before, it would default to a remote tracking branch in the format
"origin (master)", even if `magit-remote-ref-format` was set to
`remote-slash-branch`.  This means that if the user accepted the
default value, the command would fail because of the badly formatted
ref.

Now, use the same logic to put default value in the "user-friendly
format" that `magit-read-rev` will later use to translate it into the
canonical form.
Merge branch 'maint'
Merge branch 'master' into next
add magit-get-boolean