git-svn: fix some potential bugs with --follow-parent
git-svn: fix some potential bugs with --follow-parent

When using do_switch:

  We only need to ensure the index is clean and set to that of the
  parent tree) we rely on being able to reconstruct full files
  with deltas transferred over the network.

When using do_update:

  We may safely unlink the index if we are fetching an entire
  new tree with do_update.  Having an old index (from a
  previously deleted/abandoned directory) around can cause
  irrelevant files to be mistakenly kept.

Signed-off-by: Eric Wong <8c2951295f8292b0c03727bc4652981172298eae@yhbt.net>

destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git