From: HUjuice <hujuice@inservibile.org>
To: gentoo-docs-it@lists.gentoo.org
Subject: Re: [gentoo-docs-it] Breviario del traduttore?
Date: Mon, 6 Feb 2012 00:32:29 +0100 [thread overview]
Message-ID: <CAP6dPAcxaKoTDaYNDMFgEDC9rKS01nbYLAHA_-MaLXhQzN+4hA@mail.gmail.com> (raw)
In-Reply-To: <4F2F07E1.4050204@gmail.com>
>> .git/hooks/pre-commit
>> ------------------------------
>> #!/bin/sh
>> for i in $(git diff --name-only); do
>> if ! xmllint --valid --noout $i; then
>> echo "Errori XML nel file $i"
>> exit 0
>> fi
>> done
>> -------
>> Secondo te si può migliorare?
>
> exit 0 mi pare dica "tutto ok"
Ovviamente hai ragione. E poi manca un --cached (dentro la
sostituzione di comando).
.git/hooks/pre-commit
------------------------------
#!/bin/sh
for i in $(git diff --cached --name-only); do
if ! xmllint --valid --noout $i; then
echo "Errori XML nel file $i"
exit 1
fi
done
--------------------------------
Un check globale, come dici tu, è anche meglio.
C'è anche da dire che questo controllo potrebbe essere troppo serrato.
Un commit si può fare anche a metà lavoro (ma allora c'è git commit
--no-verify).
È proprio per queste cose che troverei utile un piccolo host di
lavoro, invece di gitorious.
Sergio
HUjuice
mooodcast.net
next prev parent reply other threads:[~2012-02-05 23:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-04 10:27 [gentoo-docs-it] Breviario del traduttore? Daniele Segato
2012-02-04 14:55 ` HUjuice
2012-02-05 10:41 ` Daniele Segato
2012-02-05 22:30 ` HUjuice
2012-02-05 22:51 ` Daniele Segato
2012-02-05 23:32 ` HUjuice [this message]
2012-02-06 9:44 ` Daniele Segato
2012-02-06 9:53 ` Daniele Segato
2012-02-06 10:19 ` HUjuice
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAP6dPAcxaKoTDaYNDMFgEDC9rKS01nbYLAHA_-MaLXhQzN+4hA@mail.gmail.com \
--to=hujuice@inservibile.org \
--cc=gentoo-docs-it@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox