From: Tim-Philipp Müller Date: Thu, 15 Jul 2010 15:35:40 +0000 (+0100) Subject: hooks: use 'git do-something' instead of the old 'git-do-something' X-Git-Tag: upstream/20130618~112 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f1dae75a1e567c6726be4c77db5c682e951178c2;p=platform%2Fupstream%2Fgst-common.git hooks: use 'git do-something' instead of the old 'git-do-something' --- 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 != "":