summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Kelly <doug.kelly@garmin.com>2013-11-27 17:38:58 -0600
committerDoug Kelly <doug.kelly@garmin.com>2013-11-27 17:41:54 -0600
commit6ffe7be996c84665aa10653231b5d8e390744b5f (patch)
tree327cf7b8bda80cdb2f5c598663a98595fa7e4f5f
parenta4a53664446b5f6a466b386773d89ff992093617 (diff)
Fix commit-msg hint to actually workupstream/stable-2.6
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
-rw-r--r--gerrit-server/src/main/java/com/google/gerrit/server/git/validators/CommitValidators.java6
1 files changed, 3 insertions, 3 deletions
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 d782cf02c4..5a2463d857 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 @@ public class CommitValidators {
// 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 @@ public class CommitValidators {
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);
}