Teach fetch to prune stale tracking branches
commit990f723523f24e7977d5374748b5a5cfa6448c79
authorShawn O. Pearce <spearce@spearce.org>
Thu, 12 Feb 2009 23:54:40 +0000 (12 15:54 -0800)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Wed, 18 Feb 2009 21:22:40 +0000 (18 22:22 +0100)
tree8d9ff54930a6a0e4c796883ac41a165b83e1492c
parent1c6e4586db9fa57e158265aa4a24af7eaebfa3b2
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>
org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/AbstractFetchCommand.java
org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/Fetch.java
org.spearce.jgit/src/org/spearce/jgit/transport/FetchProcess.java
org.spearce.jgit/src/org/spearce/jgit/transport/Transport.java