Re: [PATCH v4 07/12] run-command: add clean_on_exit_handler

2016-08-05 Thread Lars Schneider
> On 05 Aug 2016, at 23:19, Torsten Bögershausen wrote: > > On 2016-08-05 15.08, Lars Schneider wrote: > > [] >> Yeah it could do that. But then the filter cannot do things like >> modifying the index after the fact... however, that might be considered >> nasty by the Git

Re: [PATCH v4 07/12] run-command: add clean_on_exit_handler

2016-08-05 Thread Torsten Bögershausen
On 2016-08-05 15.08, Lars Schneider wrote: [] > Yeah it could do that. But then the filter cannot do things like > modifying the index after the fact... however, that might be considered > nasty by the Git community anyways... I am thinking about dropping > this patch in the next roll as it is

Re: [PATCH v4 07/12] run-command: add clean_on_exit_handler

2016-08-05 Thread Lars Schneider
> On 04 Aug 2016, at 01:15, Jeff King wrote: > > On Thu, Aug 04, 2016 at 01:09:57AM +0200, Lars Schneider wrote: > >>> Or better yet, do not require a shutdown at all. The filter sees EOF and >>> knows there is nothing more to do. If we are in the middle of an >>> operation,

Re: [PATCH v4 07/12] run-command: add clean_on_exit_handler

2016-08-03 Thread Jeff King
On Thu, Aug 04, 2016 at 01:09:57AM +0200, Lars Schneider wrote: > > Or better yet, do not require a shutdown at all. The filter sees EOF and > > knows there is nothing more to do. If we are in the middle of an > > operation, then it knows git died. If not, then presumably git had > > nothing else

Re: [PATCH v4 07/12] run-command: add clean_on_exit_handler

2016-08-03 Thread Lars Schneider
> On 04 Aug 2016, at 00:53, Jeff King wrote: > > On Thu, Aug 04, 2016 at 12:15:46AM +0200, Lars Schneider wrote: > >>> I'm not clear on why we want this cleanup filter. It looks like you use >>> it in the final patch to send an explicit shutdown to any filters we >>> start. But

Re: [PATCH v4 07/12] run-command: add clean_on_exit_handler

2016-08-03 Thread Jeff King
On Thu, Aug 04, 2016 at 12:15:46AM +0200, Lars Schneider wrote: > > I'm not clear on why we want this cleanup filter. It looks like you use > > it in the final patch to send an explicit shutdown to any filters we > > start. But I see two issues with that: > > > > 1. This shutdown may come at

Re: [PATCH v4 07/12] run-command: add clean_on_exit_handler

2016-08-03 Thread Lars Schneider
> On 03 Aug 2016, at 23:24, Jeff King wrote: > > On Wed, Aug 03, 2016 at 06:42:20PM +0200, larsxschnei...@gmail.com wrote: > >> From: Lars Schneider >> >> Some commands might need to perform cleanup tasks on exit. Let's give >> them an interface for

Re: [PATCH v4 07/12] run-command: add clean_on_exit_handler

2016-08-03 Thread Jeff King
On Wed, Aug 03, 2016 at 06:42:20PM +0200, larsxschnei...@gmail.com wrote: > From: Lars Schneider > > Some commands might need to perform cleanup tasks on exit. Let's give > them an interface for doing this. > > Please note, that the cleanup callback is not executed if

[PATCH v4 07/12] run-command: add clean_on_exit_handler

2016-08-03 Thread larsxschneider
From: Lars Schneider Some commands might need to perform cleanup tasks on exit. Let's give them an interface for doing this. Please note, that the cleanup callback is not executed if Git dies of a signal. The reason is that only "async-signal-safe" functions would be