fromupstream: Support --replace for gitfetch commands

If the user wants to replace a CL with something from upstream while
using the git://url#branch/hash or https://url#branch/hash syntax it
will fail because we don't rewind HEAD to HEAD~. Add the replace code
that we use everywhere else.

BUG=None --replace git://

Change-Id: I1c7bde18b636b07900e43576bebda5b4079e6d18
Commit-Queue: Stephen Boyd <>
Commit-Queue: Douglas Anderson <>
Tested-by: Stephen Boyd <>
Auto-Submit: Stephen Boyd <>
Reviewed-by: Douglas Anderson <>
1 file changed