Handle directories in `magit-visit-item'.

Assume modified directories are submodules and open them with
`magit-status'.
magit-log-edit-toggle-amending: handle no commit message body

If there is no body, default trimming takes care of the first separator
newline but not the second, so we'll trim another time.
Add an option to select the length of abbreviated sha1.

This was previously not configurable and done inconsistently in three different
places:
+ in 'log', the full sha1 was obtained and truncated to 8 digits
+ in 'branch', the sha1 was abbreviated, by git, to the default 7 digits
+ in 'status', the sha1 was abbreviated, by git, to the default 7 digits
fix: don't rely on default-directory for git-init
Merge branch 'nd/uniform-sha1-length' into next
Reverting commit b57ac592 that was superseded by commit 116c70e.

Now that server.el is required there is no need to check if server-use-tcp is bound.
Fix "ambiguous argument" error when refspec contains {x,y,z}

My .git/config svn-remote section looked like this:

[svn-remote "svn"]
    url = https://server/svn/Product
    fetch = trunk:refs/remotes/trunk
    branches = branches/{a,b,c}:refs/remotes/*

I did this to only pull down the commits I needed to work with
branches a, b and c. However when I ran magit-status on my repository,
I'd see

Unpulled commits (SVN):
fatal: ambiguous argument 'HEAD..nil': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions

Unpushed commits (SVN):
fatal: ambiguous argument 'nil..HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions

This change adjusts magit-svn-get-local-ref to handle the "branches" format shown above by treating

     branches = branches/{a,b,c}:refs/remotes/*

like

     branches = branches/a:refs/remotes/a
     branches = branches/b:refs/remotes/b
     branches = branches/c:refs/remotes/c
Merge branch 'maint'
Merge branch 'master' into next
Do not remove magit.info when 'make clean' is run with dist tarball

Signed-off-by: Yann Hodique <yann.hodique@gmail.com>
Merge pull request #274 from azuk/04f0d0a9dfbe7cc14ffba824032e0983a9744848

magit-log-edit-toggle-amending: handle no commit message body
Merge pull request #262 from anwyn/master

Simple change to open changed submodules in their own magit-status window.
Merge branch 'maint'
Merge branch 'master' into next
Used magit-sha1-abbrev-length for the unpushed and unpulled commits in status.

Replaced %H with %h to have an abbreviated sha1.
Added the --abbrev option.
Renaming magit-show-branches to magit-branch-manager.
Adding some helper functions useful in modes derived from magit.
Rewrote properly magit-branch-manager.

A lot of the code was a rewriting of magit-mode-init.
It was further simplified by using magit-git-section.

The refresh function is here separated, which allows to use the 'g' key.
Changed the position of the current marker.

The current marker ('*') was moved to after the sha1.
This is closer in look to the status and log buffers.
Modified the symbol used to denote the current branch.

'*' is used in the log and the status buffer to represent a commit.
'#' is now used in the branch buffer to represent the currently checked-out
branch.