Merge "Fix formatting of message when retrying clone"
diff --git a/manifest_xml.py b/manifest_xml.py
index 7e71960..6dc01a4 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -303,6 +303,9 @@
if p.sync_s:
e.setAttribute('sync-s', 'true')
+ if p.clone_depth:
+ e.setAttribute('clone-depth', str(p.clone_depth))
+
if p.subprojects:
subprojects = set(subp.name for subp in p.subprojects)
output_projects(p, e, list(sorted(subprojects)))
diff --git a/project.py b/project.py
index ac60ccc..d82f3d7 100644
--- a/project.py
+++ b/project.py
@@ -2320,7 +2320,10 @@
# Fail if the links are pointing to the wrong place
if src != dst:
raise GitError('--force-sync not enabled; cannot overwrite a local '
- 'work tree')
+ 'work tree. If you\'re comfortable with the '
+ 'possibility of losing the work tree\'s git metadata,'
+ ' use `repo sync --force-sync {0}` to '
+ 'proceed.'.format(self.relpath))
def _ReferenceGitDir(self, gitdir, dotgit, share_refs, copy_all):
"""Update |dotgit| to reference |gitdir|, using symlinks where possible.