I'm using gitscc with Visual Studio 2010, and would like to run some hooks. If I run git from the command line or with git extensions it will run my hooks just fine (specifically a post-commit hook), but if I commit using the gitscc window it does not execute my hook. My Google searches have been fruitless.
My directory structure looks like this (other files omitted):
Solution Dir/
Project Dir/
.git/
hooks/
post-commit
The contents of my post-commit
file are:
#!/bin/sh
C:/Python32/python.exe "C:/scripts/test.py"
and test.py
contains:
from tkinter import *
root = Tk()
root.mainloop()
with open('run.txt', 'w') as f:
f.write('I ran!')
My gitscc.config file contains the following:
<?xml version="1.0" encoding="utf-8"?>
<GitSccOptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GitBashPath>C:\Program Files\Git\bin\sh.exe</GitBashPath>
<GitExtensionPath>C:\Program Files\GitExtensions\GitExtensions.exe</GitExtensionPath>
<DifftoolPath>c:\Program Files\WinMerge\WinMergeU.exe</DifftoolPath>
<TortoiseGitPath>C:\Program Files\TortoiseGit\bin\TortoiseProc.exe</TortoiseGitPath>
<NotExpandTortoiseGit>false</NotExpandTortoiseGit>
<NotExpandGitExtensions>fals开发者_StackOverflowe</NotExpandGitExtensions>
<UseTGitIconSet>false</UseTGitIconSet>
</GitSccOptions>
When I commit from the command line, it generates ran.txt
in my Project Dir, and a Tkinter window pops up. When I run from the 'Git Pending Changes' window in Visual Studio, I get bupkis.
Is there some setting I need to change, am I missing something, does gitscc just not run hooks, or is there something else?
Thanks!
Turns out that the previous version of gitscc didn't fire off the hooks. I posted a bug report.
The newest version should fire the hooks.
精彩评论