summaryrefslogtreecommitdiff
path: root/shallow.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-10-24 14:59:10 -0700
committerJunio C Hamano <gitster@pobox.com>2014-10-24 14:59:10 -0700
commite4da4fbe0eea55c26f042f76df58bfc529b46ae0 (patch)
tree7ead155867beb400d6bed1d89be73803305f6d31 /shallow.c
parentbb8caad3814b49316f842a006082e79b4e46125c (diff)
parent0f4b6db3baeff8de53769b38f439408abd5a42f7 (diff)
downloadgit-e4da4fbe0eea55c26f042f76df58bfc529b46ae0.tar.gz
Merge branch 'eb/no-pthreads'
Allow us build with NO_PTHREADS=NoThanks compilation option. * eb/no-pthreads: Handle atexit list internaly for unthreaded builds pack-objects: set number of threads before checking and warning index-pack: fix compilation with NO_PTHREADS
Diffstat (limited to 'shallow.c')
-rw-r--r--shallow.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/shallow.c b/shallow.c
index bd7569e815..cdd0775146 100644
--- a/shallow.c
+++ b/shallow.c
@@ -227,7 +227,6 @@ static void remove_temporary_shallow_on_signal(int signo)
const char *setup_temporary_shallow(const struct sha1_array *extra)
{
- static int installed_handler;
struct strbuf sb = STRBUF_INIT;
int fd;
@@ -238,10 +237,8 @@ const char *setup_temporary_shallow(const struct sha1_array *extra)
strbuf_addstr(&temporary_shallow, git_path("shallow_XXXXXX"));
fd = xmkstemp(temporary_shallow.buf);
- if (!installed_handler) {
- atexit(remove_temporary_shallow);
- sigchain_push_common(remove_temporary_shallow_on_signal);
- }
+ atexit(remove_temporary_shallow);
+ sigchain_push_common(remove_temporary_shallow_on_signal);
if (write_in_full(fd, sb.buf, sb.len) != sb.len)
die_errno("failed to write to %s",