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

Re: pre-commit hook and Aspell

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 30, 2010, 15:59 UTC
Message-ID
<7vd3u5rme0.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4C529290.7040509@zbh.uni-hamburg.de>
Stefan Bienert <bienert@zbh.uni-hamburg.de> writes:
Show 7 quoted lines
> 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 } }')

A tangent; perhaps "git status --porcelain '*.tex' '*.sty'" would help you lose the pipe and awk.

> do
>     aspell -c -l en_GB -p $(pwd)/${my_cdup}share/dict/aspell.corb.pws
> $my_p || exit 1

Not quite sure what my-cdup is here, but probably you would want to have something like this at the top of the script?

	#!/bin/sh
	"cd .."
Previous: Stefan BienertNext: Jeff King
Message 2 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.