Get commit message in Git hook

In the pre-commit hook, the commit message usually hasn’t been created yet 1. You probably want to use one of the prepare-commit-msg or commit-msg hooks instead. There’s a nice section in Pro Git on the order in which these hooks are run, and what you typically might do with them. 1. The exception is that … Read more

How to specify which SSH key to use within git for git push in order to have gitorious as a mirror?

The answer is to be found in the git reference manual. GIT_SSH If this environment variable is set then git fetch and git push will use this command instead of ssh when they need to connect to a remote system. The $GIT_SSH command will be given exactly two arguments: the username@host (or just host) from … Read more

How to require commit messages in VisualSVN server?

I’m glad you asked this question. This is our pre-commit hook script written in common Windows Batch. It denies commit if the log message is less than 6 characters. Just put the pre-commit.bat to your hooks directory. pre-commit.bat setlocal enabledelayedexpansion set REPOS=%1 set TXN=%2 set SVNLOOK=”%VISUALSVN_SERVER%\bin\svnlook.exe” SET M= REM Concatenate all the lines in the … Read more

How to get the word under the cursor in Windows?

On recent versions of Windows, the recommended way to gather information from one application to another (if you don’t own the targeted application of course) is to use the UI Automation technology. Wikipedia is pretty good for more information on this: Microsoft UI Automation Basically, UI automation will use all necessary means to gather what … Read more

tech