git/list[1] front-page[2] threads[3] people[4] search[5] about
 

pre-commit hook and Aspell

From
SBStefan Bienert <bienert@zbh.uni-hamburg.de>
Date
Jul 30, 2010, 08:51 UTC
Message-ID
<4C529290.7040509@zbh.uni-hamburg.de>
Hi gits,

as instructed by the wiki, I just sent an request to the list without being subscribed...

I'm trying to setup a hook for my project which forces me to check the spelling of text (here: TeX) files, whenever they change. As spellchecker I use Aspell, which is giving me a headache at the moment. The problem is: Running the pre-commit script in the shell works, started as hook does not.

Here is my script (cut down to a minimalist version resembling the problem):

# SNIP #!/bin/sh

for my_p in $(git status --porcelain | awk '{ if ($0 ~ /\.(tex|sty)$/) {
print $2 } }')
do
    aspell -c -l en_GB -p $(pwd)/${my_cdup}share/dict/aspell.corb.pws
$my_p || exit 1
done
# SNAP
regards,
Stefan
-- 
Stefan Bienert
Zentrum fuer Bioinformatik
Universitaet Hamburg
Bundesstrasse 43
20146 Hamburg
Germany

Email: bienert@zbh.uni-hamburg.de
Phone:  +49 (40) 42838 7345
Fax:    +49 (40) 42838 7332
Next: Junio C Hamano
Message 1 of 3 in “pre-commit hook and Aspell”
  1. Stefan BienertJul 30, 2010
  2. Junio C HamanoJul 30, 2010
  3. Jeff KingJul 30, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.