summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-03-10Enable threaded async procedures whenever pthreads is availableJohannes Sixt
Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-07Dying in an async procedure should only exit the thread, not the process.Johannes Sixt
Async procedures are intended as helpers that perform a very restricted task, and the caller usually has to manage them in a larger context. Conceptually, the async procedure is not concerned with the "bigger picture" in whose context it is run. When it dies, it is not supposed to destroy this "bigger picture", but rather only its own limit view of the world. On POSIX, the async procedure is run in its own process, and exiting this process naturally had only these limited effects. On Windows (or when ASYNC_AS_THREAD is set), calling die() exited the whole process, destroying the caller (the "big picture") as well. This fixes it to exit only the thread. Without ASYNC_AS_THREAD, one particular effect of exiting the async procedure process is that it automatically closes file descriptors, most notably the writable end of the pipe that the async procedure writes to. The async API already requires that the async procedure closes the pipe ends when it exits normally. But for calls to die() no requirements are imposed. In the non-threaded case the pipe ends are closed implicitly by the exiting process, but in the threaded case, the die routine must take care of closing them. Now t5530-upload-pack-error.sh passes on Windows. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-07Reimplement async procedures using pthreadsJohannes Sixt
On Windows, async procedures have always been run in threads, and the implementation used Windows specific APIs. Rewrite the code to use pthreads. A new configuration option is introduced so that the threaded implementation can also be used on POSIX systems. Since this option is intended only as playground on POSIX, but is mandatory on Windows, the option is not documented. One detail is that on POSIX it is necessary to set FD_CLOEXEC on the pipe handles. On Windows, this is not needed because pipe handles are not inherited to child processes, and the new calls to set_cloexec() are effectively no-ops. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-07Windows: more pthreads functionsJohannes Sixt
This adds: pthread_self pthread_equal pthread_exit pthread_key_create pthread_setspecific pthread_getspecific Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-07Fix signature of fcntl() compatibility dummyJohannes Sixt
Obviously, this function was never called with two arguments in Windows code sections, but this will be the case in a subsequent patch. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-07Make report() from usage.c public as vreportf() and use it.Johannes Sixt
There exist already a number of static functions named 'report', therefore, the function name was changed. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-07Modernize t5530-upload-pack-error.Johannes Sixt
Some tests did not use test_must_fail. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-05Merge branch 'maint'Junio C Hamano
* maint: Update draft release notes to 1.7.0.2 Remove extra '-' from git-am(1)
2010-03-05Update draft release notes to 1.7.0.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-05Merge branch 'jn/gitweb-config-error-die' into maintJunio C Hamano
* jn/gitweb-config-error-die: gitweb: Die if there are parsing errors in config file
2010-03-05Merge branch 'jn/maint-fix-pager' into maintJunio C Hamano
* jn/maint-fix-pager: tests: Fix race condition in t7006-pager t7006-pager: if stdout is not a terminal, make a new one tests: Add tests for automatic use of pager am: Fix launching of pager git svn: Fix launching of pager git.1: Clarify the behavior of the --paginate option Make 'git var GIT_PAGER' always print the configured pager Fix 'git var' usage synopsis
2010-03-05Merge branch 'tr/maint-cherry-pick-list' into maintJunio C Hamano
* tr/maint-cherry-pick-list: cherry_pick_list: quit early if one side is empty
2010-03-05Merge branch 'ld/maint-diff-quiet-w' into maintJunio C Hamano
* ld/maint-diff-quiet-w: git-diff: add a test for git diff --quiet -w git diff --quiet -w: check and report the status
2010-03-05Merge branch 'rs/optim-text-wrap' into maintJunio C Hamano
* rs/optim-text-wrap: utf8.c: speculatively assume utf-8 in strbuf_add_wrapped_text() utf8.c: remove strbuf_write() utf8.c: remove print_spaces() utf8.c: remove print_wrapped_text()
2010-03-05Merge branch 'dp/read-not-mmap-small-loose-object' into maintJunio C Hamano
* dp/read-not-mmap-small-loose-object: hash-object: don't use mmap() for small files
2010-03-05Merge branch 'np/compress-loose-object-memsave' into maintJunio C Hamano
* np/compress-loose-object-memsave: sha1_file: be paranoid when creating loose objects sha1_file: don't malloc the whole compressed result when writing out objects
2010-03-05Merge branch 'jc/maint-status-preload' into maintJunio C Hamano
* jc/maint-status-preload: status: preload index to optimize lstat(2) calls
2010-03-05Merge branch 'gf/maint-sh-setup-nongit-ok' into maintJunio C Hamano
* gf/maint-sh-setup-nongit-ok: require_work_tree broken with NONGIT_OK
2010-03-05Merge branch 'cc/maint-bisect-paths' into maintJunio C Hamano
* cc/maint-bisect-paths: bisect: error out when passing bad path parameters
2010-03-05Merge branch 'maint-1.6.6' into maintJunio C Hamano
* maint-1.6.6: Remove extra '-' from git-am(1)
2010-03-05Merge branch 'maint-1.6.5' into maint-1.6.6Junio C Hamano
* maint-1.6.5: Remove extra '-' from git-am(1)
2010-03-05Remove extra '-' from git-am(1)Michal Sojka
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-04t9119-git-svn-info.sh: test with svn 1.6.* as wellMichael J Gruber
All tests in t9119 were disabled for subversion versions other than 1.[45].*. Make the test script run with subversion 1.[456].*. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Acked-by: Eric Wong <normalperson@yhbt.net>
2010-03-04git-svn: req_svn when neededMichael J Gruber
The delayed loading of SVN missed a place where SVN::Core is used. Make sure to load the package before trying to use it. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Acked-by: Eric Wong <normalperson@yhbt.net>
2010-03-03Merge branch 'maint'Junio C Hamano
* maint: Start preparing for 1.7.0.2 Conflicts: RelNotes
2010-03-03Merge branch 'jh/maint-submodule-status-in-void' (early part)Junio C Hamano
* 'jh/maint-submodule-status-in-void' (early part): submodule summary: do not shift a non-existent positional variable
2010-03-03submodule summary: do not shift a non-existent positional variableJeff King
When "git submodule summary" is run without any argument, we default to compare the state of index with the HEAD, but tried to shift out $1 that does not exist (and worse yet, we didn't use it). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-03Start preparing for 1.7.0.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-03Merge branch 'tc/maint-transport-ls-remote-with-void' into maintJunio C Hamano
* tc/maint-transport-ls-remote-with-void: transport: add got_remote_refs flag
2010-03-03Merge branch 'hm/maint-imap-send-crlf' into maintJunio C Hamano
* hm/maint-imap-send-crlf: git-imap-send: Convert LF to CRLF before storing patch to draft box
2010-03-03Merge branch 'sp/maint-push-sideband' into maintJunio C Hamano
* sp/maint-push-sideband: receive-pack: Send internal errors over side-band #2 t5401: Use a bare repository for the remote peer receive-pack: Send hook output over side band #2 receive-pack: Wrap status reports inside side-band-64k receive-pack: Refactor how capabilities are shown to the client send-pack: demultiplex a sideband stream with status data run-command: support custom fd-set in async run-command: Allow stderr to be a caller supplied pipe Conflicts: builtin-receive-pack.c run-command.c t/t5401-update-hooks.sh
2010-03-03Merge branch 'jc/maint-fix-test-perm' into maintJunio C Hamano
* jc/maint-fix-test-perm: lib-patch-mode.sh: Fix permission t6000lib: Fix permission
2010-03-03Merge branch 'np/fast-import-idx-v2' into maintJunio C Hamano
* np/fast-import-idx-v2: fast-import: use the diff_delta() max_delta_size argument fast-import: honor pack.indexversion and pack.packsizelimit config vars fast-import: make default pack size unlimited fast-import: use write_idx_file() instead of custom code fast-import: use sha1write() for pack data fast-import: start using struct pack_idx_entry
2010-03-02Merge branch 'maint'Junio C Hamano
* maint: gitweb: Fix project-specific feature override behavior gitweb multiple project roots documentation
2010-03-02Merge branch 'jn/maint-fix-pager'Junio C Hamano
* jn/maint-fix-pager: tests: Fix race condition in t7006-pager t7006-pager: if stdout is not a terminal, make a new one tests: Add tests for automatic use of pager am: Fix launching of pager git svn: Fix launching of pager git.1: Clarify the behavior of the --paginate option Make 'git var GIT_PAGER' always print the configured pager Fix 'git var' usage synopsis
2010-03-02Merge branch 'ml/encode-header-refactor'Junio C Hamano
* ml/encode-header-refactor: move encode_in_pack_object_header() to a better place refactor duplicated encode_header in pack-objects and fast-import
2010-03-02Merge branch 'jn/gitweb-config-error-die'Junio C Hamano
* jn/gitweb-config-error-die: gitweb: Die if there are parsing errors in config file
2010-03-02Merge branch 'jc/for-each-ref'Junio C Hamano
* jc/for-each-ref: for-each-ref --format='%(flag)' for-each-ref --format='%(symref) %(symref:short)' builtin-for-each-ref.c: check if we need to peel onion while parsing the format builtin-for-each-ref.c: comment fixes
2010-03-02Merge branch 'ld/maint-diff-quiet-w'Junio C Hamano
* ld/maint-diff-quiet-w: git-diff: add a test for git diff --quiet -w git diff --quiet -w: check and report the status
2010-03-02Merge branch 'tr/maint-cherry-pick-list'Junio C Hamano
* tr/maint-cherry-pick-list: cherry_pick_list: quit early if one side is empty
2010-03-02Merge branch 'rs/optim-text-wrap'Junio C Hamano
* rs/optim-text-wrap: utf8.c: speculatively assume utf-8 in strbuf_add_wrapped_text() utf8.c: remove strbuf_write() utf8.c: remove print_spaces() utf8.c: remove print_wrapped_text()
2010-03-02Merge branch 'ml/send-pack-transport-refactor'Junio C Hamano
* ml/send-pack-transport-refactor: refactor duplicated code in builtin-send-pack.c and transport.c
2010-03-02Merge branch 'ml/fill-mm-refactor'Junio C Hamano
* ml/fill-mm-refactor: refactor duplicated fill_mm() in checkout and merge-recursive
2010-03-02Merge branch 'ml/connect-refactor'Junio C Hamano
* ml/connect-refactor: connect.c: move duplicated code to a new function 'get_host_and_port'
2010-03-02Merge branch 'np/compress-loose-object-memsave'Junio C Hamano
* np/compress-loose-object-memsave: sha1_file: be paranoid when creating loose objects sha1_file: don't malloc the whole compressed result when writing out objects
2010-03-02Merge branch 'dp/read-not-mmap-small-loose-object'Junio C Hamano
* dp/read-not-mmap-small-loose-object: hash-object: don't use mmap() for small files
2010-03-02Merge branch 'jn/makedepend'Junio C Hamano
* jn/makedepend: Makefile: clarify definition of TEST_OBJS Makefile: always remove .depend directories on 'make clean' Makefile: tuck away generated makefile fragments in .depend Teach Makefile to check header dependencies Makefile: list standalone program object files in PROGRAM_OBJS Makefile: lazily compute header dependencies Makefile: list generated object files in OBJECTS Makefile: disable default implicit rules Makefile: rearrange dependency rules Makefile: transport.o depends on branch.h now Makefile: drop dependency on $(wildcard */*.h) Makefile: clean up http-walker.o dependency rules Makefile: remove wt-status.h from LIB_H Makefile: make sure test helpers are rebuilt when headers change Makefile: add missing header file dependencies Conflicts: Makefile
2010-03-02Merge branch 'jc/maint-status-preload'Junio C Hamano
* jc/maint-status-preload: status: preload index to optimize lstat(2) calls
2010-03-02Merge branch 'gf/maint-sh-setup-nongit-ok'Junio C Hamano
* gf/maint-sh-setup-nongit-ok: require_work_tree broken with NONGIT_OK
2010-03-02Merge branch 'jh/maint-submodule-status-in-void'Junio C Hamano
* jh/maint-submodule-status-in-void: submodule summary: Don't barf when invoked in an empty repo