summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2010-07-15 16:35:40 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2010-07-15 16:35:40 +0100
commitf1dae75a1e567c6726be4c77db5c682e951178c2 (patch)
treef6c2ab1e92874342490f000a940a45fd4d8de538
parenta519571756752e8a10f89d2f9d569774c001bb83 (diff)
hooks: use 'git do-something' instead of the old 'git-do-something'
-rwxr-xr-xhooks/pre-commit.hook2
-rw-r--r--hooks/pre-receive.hook4
2 files changed, 3 insertions, 3 deletions
diff --git a/hooks/pre-commit.hook b/hooks/pre-commit.hook
index 607c991..aef1ce1 100755
--- a/hooks/pre-commit.hook
+++ b/hooks/pre-commit.hook
@@ -46,7 +46,7 @@ INDENT_PARAMETERS="--braces-on-if-line \
--leave-preprocessor-space"
echo "--Checking style--"
-for file in `git-diff-index --cached --name-only HEAD --diff-filter=ACMR| grep "\.c$"` ; do
+for file in `git diff-index --cached --name-only HEAD --diff-filter=ACMR| grep "\.c$"` ; do
# nf is the temporary checkout. This makes sure we check against the
# revision in the index (and not the checked out version).
nf=`git checkout-index --temp ${file} | cut -f 1`
diff --git a/hooks/pre-receive.hook b/hooks/pre-receive.hook
index 8ddcd87..ca1ef83 100644
--- a/hooks/pre-receive.hook
+++ b/hooks/pre-receive.hook
@@ -12,7 +12,7 @@ import subprocess
def commit_exists(sha1, gitdir):
"""Returns True if the sha1 is a valid commit in the given
git directory"""
- # FIXME: We're using git-show for the time being, but there's a small
+ # FIXME: We're using 'git show' for the time being, but there's a small
# risk that there might be a valid SHA1 for a non-commit object.
env = os.environ.copy()
env["GIT_DIR"] = gitdir
@@ -39,7 +39,7 @@ for line in sys.stdin.readlines():
old, new, ref = line.split(' ', 2)
# 1. Get the latest change to common (if there was any changes)
- sub = subprocess.Popen(["git-diff", "%s..%s" % (old, new, ), "--", "common"],
+ sub = subprocess.Popen(["git", "diff", "%s..%s" % (old, new, ), "--", "common"],
stdout=subprocess.PIPE)
stdout, stderr = sub.communicate()
if stdout != "":