From ff3d506aea79a446e5438bc8691b09a3deea4acb Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 1 Feb 2012 03:47:28 +0000 Subject: [PATCH] Use dirname instead of basename. Fixes bug 924639, creation of spurious empty commit-msg directories. Change-Id: I1416f058d4fe4fba59a1469fa35098674f9e1ab7 --- git-review | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-review b/git-review index cb86e1d1..c2ebd5d1 100755 --- a/git-review +++ b/git-review @@ -113,7 +113,7 @@ def set_hooks_commit_msg(remote, target_file): """ Install the commit message hook if needed. """ # Create the hooks directory if it's not there already - hooks_dir = os.path.basename(target_file) + hooks_dir = os.path.dirname(target_file) if not os.path.isdir(hooks_dir): os.mkdir(hooks_dir)