diff --git a/java/com/google/gerrit/pgm/init/InitContainer.java b/java/com/google/gerrit/pgm/init/InitContainer.java index dea45a710a..0b19ca3b98 100644 --- a/java/com/google/gerrit/pgm/init/InitContainer.java +++ b/java/com/google/gerrit/pgm/init/InitContainer.java @@ -75,7 +75,11 @@ class InitContainer implements InitStep { final boolean copy; final Path siteWar = site.gerrit_war; if (Files.exists(siteWar)) { - copy = ui.yesno(true, "Upgrade %s", siteWar); + if (Files.isSameFile(siteWar, myWar)) { + copy = false; + } else { + copy = ui.yesno(true, "Upgrade %s", siteWar); + } } else { copy = ui.yesno(true, "Copy %s to %s", myWar.getFileName(), siteWar); if (copy) {