Fix commit-msg hint to actually work

The change Ie4fcd0a73bd1cee12a052f38541f83aa8821c886 incorrectly
changed the command to suggest to install the commit-msg hook --
without the additional semicolon, the environment variable doesn't
seem to get set right. The braces are a cosmetic change, but nice
nonetheless.

Change-Id: Ia0a5c8f4304fb2402da8e7ea05a736bd762f3f49
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/validators/CommitValidators.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/validators/CommitValidators.java
index d782cf0..5a2463d 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/git/validators/CommitValidators.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/validators/CommitValidators.java
@@ -507,9 +507,9 @@
     // If there are no SSH keys, the commit-msg hook must be installed via
     // HTTP(S)
     if (hostKeys.isEmpty()) {
-      String p = "$gitdir/hooks/commit-msg";
+      String p = "${gitdir}/hooks/commit-msg";
       return String.format(
-          "  gitdir=$(git rev-parse --git-dir) curl -o %s %s/tools/hooks/commit-msg ; chmod +x %s", p,
+          "  gitdir=$(git rev-parse --git-dir); curl -o %s %s/tools/hooks/commit-msg ; chmod +x %s", p,
           getGerritUrl(canonicalWebUrl), p);
     }
 
@@ -530,7 +530,7 @@
       sshPort = 22;
     }
 
-    return String.format("  gitdir=$(git rev-parse --git-dir) scp -p -P %d %s@%s:hooks/commit-msg $gitdir/hooks/",
+    return String.format("  gitdir=$(git rev-parse --git-dir); scp -p -P %d %s@%s:hooks/commit-msg ${gitdir}/hooks/",
         sshPort, currentUser.getUserName(), sshHost);
   }