Handle directories in `magit-visit-item'.

Assume modified directories are submodules and open them with
`magit-status'.
Support username in svn-remote URLs
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.
fix bytecode compilation

Moving the git feature detection block before any code that can use it.
This fixes issue #280
make better use of magit-svn cache
fetch only relevant log history

fixes issue #278
fix typo in manual
Use set-upstream when pushing.

Add a customization variable for controlling --set-upstream
Only use --set-upstream if a ref-branch has not been set.
Fix the logic of `magit-log-edit' function.

Previous version of `magit-log-edit' had two issues:
1. It didn't support splitting of commits, for example, here's the
workflow in question:

C-c g some-git-repo
M-x magit-interactive-rebase (to some old to be splitted commit)
<edit "git-rebase-todo" file, mark aforementioned commit to be edited>
x HEAD^

or, just for clarity's sake, its command-line equivalent:

cd some git-repo
git rebase -i <some old to be splitted commit>
<edit "git-rebase-todo" file, mark aforementioned commit to be edited>
git reset HEAD^

When then `magit-log-edit' was called in the middle of the ongoing
rebase, by typing "c" in the status buffer it would suggest to
continue it(rebase) and exit silently on user's refusal to do so. If
you were to answer "yes" to the proposal magit would try to continue
the rebase, fail miserably at said task and stop. So, it is easy to see
that after not so long a struggle you would find yourself in a Catch-22
type of a situation:
 - You need to commit changes in order to continue the rebase
 - You need to finish rebase in order to commit anything

New version addresses that problem by always ignoring ongoing rebase
and performing commit if the repository is dirty. And suggesting to
continue the rebase only if it is clean.

2. It somewhat ignored user's refusal to commit all unstaged changes
or stage them all and then commit. The code in the old version of the
function would still call `(magit-pop-to-log-edit "commit")' even if
user answered "no" to the asked questions.

This version hopefully addresses that too.
Removed two trailing whitespaces.
Fix double deleting of a remote branch.

When deleting the remote copy of a remote branch, there is no need to also delete the local copy.
The two commands used to delete branches are:
    + delete only the local copy of a remote branch:
      git branch [-d|-D] -r <remote>/<branch>
    + delete the remote copy AND the local copy of a remote branch:
      git push <remote> :<branch>

Here is, in pseudo-code, what this fix is doing.
    + before the fix:
      if (delete-remote-copy)
          git push <remote> :<branch>
      git branch [-d|-D] -r <remote>/<branch>
    + after the fix:
      if (delete-remote-copy)
          git push <remote> :<branch>
      else
          git branch [-d|-D] -r <remote>/<branch>
Removing an unused face.

Face magit-log-tag-label is not used anywhere.
Face magit-log-head-label-tag is used instead.
Removing another unused face.

magit-menu-selected-option is not used anywhere.
Merge pull request #290 from dudebout/fix-trailing-whitespace

Removed two trailing whitespaces.
Merge pull request #291 from dudebout/fix-remove-unused-face

Removing an unused face.
Make refresh keep the point on the correct line even when the point is not at the beginning of the line.

If you hit refresh (g) while the point is not at the beginning of the line,
the point will end up on the line below the one it is supposed to be on.

This is due to the way count-lines work. From the documentation:
  (count-lines START END)

  Return number of lines between START and END.
  This is usually the number of newlines between them,
  but can be one more if START is not equal to END
  and the greater of them is not at the start of a line.

If the point is not at the beginning of the line, the following expression is off by one:
(count-lines (magit-section-beginning old-section)
	     (point))
Additionaly conserve the position of point on the line after a refresh.
Fixed the behavior of highlighting in branch manager.

Added the newline "\n" to the current section.
This is the behavior in the status and the log buffer.

Two visible effects of making that change:
  + the highlight goes to the end of the line and not just to the last non-whitespace character
  + the line stays selected even when the point is at the end of the line
Fix `magit-save-buffers-predicate-tree-only' when checking unsaved buffers across
multiple repositories.

Old code would prompt to save *any* dirty buffer which was part of a git
repository, rather than just the specific repo for which `magit-status'
was invoked. Fixed to check only against magit-topdir of the invocation
directory.
Merge pull request #294 from shabble/fix-tree-pred

Fix `magit-save-buffers-predicate-tree-only' when checking unsaved buffers across multiple repositories.