On Wed, Feb 22, 2012 at 2:49 PM, Torsten Krah
<tk...@fachschaft.imn.htwk-leipzig.de> wrote:

> If commit can not fail - for which ever reason - why the doc does state that
> the hook does only run if the commit is actual successful?
> So it is possible to fail or not?

Commits can fail.  A common reason would be that a file included in
the commit was not at the HEAD revision in your working copy.  I
believe these sort of checks do not happen until after the pre-commit
hook is called.

> I need to be sure that prepared external resources from pre-commit are
> cleaned up - even in case it did fail. If it would be run only on success,
> which does imply that it might fail, i am unable to clean up my work done in
> pre-commit.
>
> any other ideas how to do?

There is no hook called if the commit fails.  If you want to clean
something up that you created during your pre-commit hook then write a
background job that checks for stale information and cleans them up.
Without a lot more details about what you are doing in your pre-commit
hook I do not think there are any other suggestions that can be made.

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

Reply via email to