[PATCH v5] Handle atexit list internaly for unthreaded builds

2014-10-18 Thread Etienne Buira
-by: Andreas Schwab sch...@linux-m68k.org Helped-by: Junio C Hamano gits...@pobox.com Signed-off-by: Etienne Buira etienne.bu...@gmail.com --- builtin/clone.c | 5 - git-compat-util.h | 5 + run-command.c | 40 shallow.c | 7 ++- 4

Re: [PATCH 2/2] Remove spurious 'no threads support' warnings

2014-10-14 Thread Etienne Buira
On Mon, Oct 13, 2014 at 9:54 PM, Junio C Hamano gits...@pobox.com wrote: Etienne Buira etienne.bu...@gmail.com writes: Threads count being defaulted to 0 (autodetect), and --disable-pthreads build checking that thread count==1, there were spurious warnings about threads being ignored, despite

Re: [PATCH v4] Handle atexit list internaly for unthreaded builds

2014-10-14 Thread Etienne Buira
On Mon, Oct 13, 2014 at 10:00 PM, Junio C Hamano gits...@pobox.com wrote: Etienne Buira etienne.bu...@gmail.com writes: Wrap atexit()s calls on unthreaded builds to handle callback list internally. This is needed because on unthreaded builds, asyncs inherits parent's atexit() list

Re: [PATCH v2] Handle atexit list internaly for unthreaded builds

2014-10-13 Thread Etienne Buira
On Mon, Oct 13, 2014 at 2:56 AM, Duy Nguyen pclo...@gmail.com wrote: On Sun, Oct 12, 2014 at 4:09 PM, Etienne Buira etienne.bu...@gmail.com wrote: Replace atexit()s calls with cmd_atexit that is atexit() on threaded builds, but handles the callbacks list internally for unthreaded builds

[PATCH v3] Handle atexit list internaly for unthreaded builds

2014-10-13 Thread Etienne Buira
too early. Fixes test 5537 (temporary shallow file vanished before unpack-objects could open it) V2: remove an obvious mistake V3: wrap, rename and add define in git-compat-util.h Thanks-to: Duy Nguyen pclo...@gmail.com Signed-off-by: Etienne Buira etienne.bu...@gmail.com --- builtin/clone.c

[PATCH v4] Handle atexit list internaly for unthreaded builds

2014-10-13 Thread Etienne Buira
too early. Fixes test 5537 (temporary shallow file vanished before unpack-objects could open it) V4: fix bogus preprocessor directives Thanks-to: Duy Nguyen pclo...@gmail.com Thanks-to: Andreas Schwab sch...@linux-m68k.org Signed-off-by: Etienne Buira etienne.bu...@gmail.com --- builtin/clone.c

[PATCH v2] Handle atexit list internaly fo unthreaded builds

2014-10-12 Thread Etienne Buira
of the parent process). That led to remove temporary and lock files too early. Fixes test 5537 (temporary shallow file vanished before unpack-objects could open it) V2: remove an obvious mistake Signed-off-by: Etienne Buira etienne.bu...@gmail.com --- builtin/clone.c | 7 +-- builtin/fetch.c

[PATCH 1/2] fix compilation with --disable-pthreads

2014-10-11 Thread Etienne Buira
Signed-off-by: Etienne Buira etienne.bu...@gmail.com --- builtin/index-pack.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index eebf1a8..0f88f4b 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -185,6 +185,9 @@ static void

[PATCH 2/2] Remove spurious 'no threads support' warnings

2014-10-11 Thread Etienne Buira
of those warnings. Signed-off-by: Etienne Buira etienne.bu...@gmail.com --- builtin/pack-objects.c | 2 +- thread-utils.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index b59f5d8..7b51453 100644 --- a/builtin/pack

[PATCH] Handle atexit list internaly fo unthreaded builds

2014-10-11 Thread Etienne Buira
of the parent process). That led to remove temporary and lock files too early. Fixes test 5537 (temporary shallow file vanished before unpack-objects could open it) Signed-off-by: Etienne Buira etienne.bu...@gmail.com --- builtin/clone.c | 7 +-- builtin/fetch.c | 2 +- builtin/gc.c| 2