Use dirname instead of basename.

Fixes bug 924639, creation of spurious empty commit-msg directories.

Change-Id: I1416f058d4fe4fba59a1469fa35098674f9e1ab7
This commit is contained in:
James E. Blair 2012-02-01 03:47:28 +00:00
parent 3d6675958f
commit ff3d506aea

View File

@ -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)