git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jim Meyering <jim@meyering.net>
To: git@vger.kernel.org
Subject: [PATCH] cg-commit: Fix a typo that would inhibit running of post-commit script:
Date: Thu, 24 Aug 2006 20:19:54 +0200	[thread overview]
Message-ID: <8764giro6t.fsf@rho.meyering.net> (raw)

I tried cg-commit with a commit hook, but the hook never ran.
The problem was a typo:

Fix a typo that would inhibit running the post-commit script:
s/commit-post/post-commit/.

Signed-off-by: Jim Meyering <jim@meyering.net>
---
 cg-commit |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/cg-commit b/cg-commit
index 9d3b1a1..82eea60 100755
--- a/cg-commit
+++ b/cg-commit
@@ -604,15 +604,16 @@ if [ "$newhead" ]; then
 		branchname="$(cat "$_git/branch-name")"
 	fi
 	[ -z "$branchname" ] && [ "$_git_head" != "master" ] && branchname="$_git_head"
-	if [ -x "$_git/hooks/post-commit" -a ! "$no_hooks" ]; then
+	post_commit="$_git/hooks/post-commit"
+	if [ -x "$post_commit" -a ! "$no_hooks" ]; then
 		if [ "$(git-repo-config --bool cogito.hooks.commit.post.allmerged)" = "true" ]; then
 			# We just hope that for the initial commit, the user didn't
 			# manage to install the hook yet.
 			for merged in $(git-rev-list $newhead ^$oldhead | tac); do
-				"$_git/hooks/post-commit" "$merged" "$branchname"
+				"$post_commit" "$merged" "$branchname"
 			done
 		else
-			"$_git/hooks/post-commit" "$newhead" "$branchname"
+			"$post_commit" "$newhead" "$branchname"
 		fi
 	fi
 
-- 
1.4.1.1

             reply	other threads:[~2006-08-24 18:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-24 18:19 Jim Meyering [this message]
2006-08-25  0:20 ` [PATCH] cg-commit: Fix a typo that would inhibit running of post-commit script: Jonas Fonseca
2006-09-16 15:10   ` Jim Meyering
2006-09-24 17:39     ` Petr Baudis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8764giro6t.fsf@rho.meyering.net \
    --to=jim@meyering.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).