Teach fetch to prune stale tracking branches
If the source branch for a local tracking branch has been removed
from the remote repository, users may also want (or need) to delete
it from the local repository. A good example is when a branch named
"refs/heads/bar" switches from a file to a directory, and the local
path name in "refs/remotes/origin/bar" must also change.
Local deletes are done before updates, to handle this special case
of file to directory (or directory to file) conversions with as few
errors as possible.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>