mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
init: show a notice when reinitializing
Make it clear to users when we're reinitializing an existing checkout in case they weren't expecting it. Bug: https://crbug.com/gerrit/12396 Change-Id: I22e89ae041a8e7b147c9d06a82f1302dd5807ae0 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/343535 Reviewed-by: LaMont Jones <lamontjones@google.com> Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
parent
5a5cfce1b2
commit
488d54d4ee
@ -315,6 +315,13 @@ to update the working directory files.
|
|||||||
# Older versions of git supported worktree, but had dangerous gc bugs.
|
# Older versions of git supported worktree, but had dangerous gc bugs.
|
||||||
git_require((2, 15, 0), fail=True, msg='git gc worktree corruption')
|
git_require((2, 15, 0), fail=True, msg='git gc worktree corruption')
|
||||||
|
|
||||||
|
# Provide a short notice that we're reinitializing an existing checkout.
|
||||||
|
# Sometimes developers might not realize that they're in one, or that
|
||||||
|
# repo doesn't do nested checkouts.
|
||||||
|
existing_checkout = self.manifest.manifestProject.Exists
|
||||||
|
if not opt.quiet and existing_checkout:
|
||||||
|
print('repo: reusing existing repo client checkout in', self.manifest.topdir)
|
||||||
|
|
||||||
self._SyncManifest(opt)
|
self._SyncManifest(opt)
|
||||||
|
|
||||||
if os.isatty(0) and os.isatty(1) and not self.manifest.IsMirror:
|
if os.isatty(0) and os.isatty(1) and not self.manifest.IsMirror:
|
||||||
|
Loading…
Reference in New Issue
Block a user