git-commit-vandalism/builtin
Johannes Schindelin cdf0553769 git grep: be careful to use mutexes only when they are initialized
Rather nasty things happen when a mutex is not initialized but locked
nevertheless. Now, when we're not running in a threaded manner, the mutex
is not initialized, which is correct. But then we went and used the mutex
anyway, which -- at least on Windows -- leads to a hard crash (ordinarily
it would be called a segmentation fault, but in Windows speak it is an
access violation).

This problem was identified by our faithful tests when run in the msysGit
environment.

To avoid having to wrap the line due to the 80 column limit, we use
the name "WHEN_THREADED" instead of "IF_USE_THREADS" because it is one
character shorter. Which is all we need in this case.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-26 11:35:49 -07:00
..
add.c
annotate.c
apply.c Merge branch 'jm/maint-apply-detects-corrupt-patch-header' 2011-10-19 10:48:29 -07:00
archive.c Merge branch 'il/archive-err-signal' 2011-10-13 19:03:23 -07:00
bisect--helper.c
blame.c
branch.c Merge branch 'mg/branch-list' 2011-10-05 12:36:23 -07:00
bundle.c
cat-file.c
check-attr.c Merge branch 'bc/attr-ignore-case' 2011-10-17 21:37:14 -07:00
check-ref-format.c Change check_refname_format() to reject unnormalized refnames 2011-10-05 13:45:30 -07:00
checkout-index.c
checkout.c Merge branch 'jc/checkout-from-tree-keep-local-changes' 2011-10-17 21:37:09 -07:00
clean.c
clone.c
commit-tree.c
commit.c Merge branch 'nd/maint-autofix-tag-in-head' 2011-10-13 19:03:19 -07:00
config.c Merge branch 'mm/maint-config-explicit-bool-display' 2011-10-17 21:37:12 -07:00
count-objects.c
describe.c
diff-files.c
diff-index.c
diff-tree.c
diff.c
fast-export.c
fetch-pack.c Merge branch 'mh/check-ref-format-3' 2011-10-10 15:56:18 -07:00
fetch.c Merge branch 'tc/fetch-leak' 2011-10-17 21:37:12 -07:00
fmt-merge-msg.c Accept tags in HEAD or MERGE_HEAD 2011-09-18 14:11:40 -07:00
for-each-ref.c
fsck.c
gc.c
grep.c git grep: be careful to use mutexes only when they are initialized 2011-10-26 11:35:49 -07:00
hash-object.c
help.c Cast execl*() NULL sentinels to (char *) 2010-07-25 23:14:18 -07:00
index-pack.c
init-db.c
log.c
ls-files.c Merge branch 'cb/common-prefix-unification' 2011-10-10 15:56:17 -07:00
ls-remote.c Merge branch 'jc/ls-remote-short-help' 2011-10-05 12:36:26 -07:00
ls-tree.c
mailinfo.c
mailsplit.c
merge-base.c
merge-file.c
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c
merge.c Merge branch 'js/merge-edit-option' 2011-10-19 10:49:27 -07:00
mktag.c
mktree.c
mv.c builtin/mv.c: plug miniscule memory leak 2011-10-06 13:54:32 -07:00
name-rev.c name-rev: split usage string 2011-10-03 11:55:57 -07:00
notes.c
pack-objects.c Merge branch 'jk/maint-pack-objects-compete-with-delete' 2011-10-21 16:04:33 -07:00
pack-redundant.c
pack-refs.c
patch-id.c
prune-packed.c
prune.c
push.c
read-tree.c
receive-pack.c Merge branch 'ph/push-to-delete-nothing' 2011-10-17 21:37:10 -07:00
reflog.c
remote-ext.c
remote-fd.c
remote.c Merge branch 'jc/match-refs-clarify' 2011-10-21 16:04:35 -07:00
replace.c Change check_ref_format() to take a flags argument 2011-10-05 13:45:29 -07:00
rerere.c
reset.c
rev-list.c
rev-parse.c
revert.c Merge branch 'js/no-cherry-pick-head-after-punted' 2011-10-19 10:49:05 -07:00
rm.c
send-pack.c
shortlog.c
show-branch.c
show-ref.c Change check_ref_format() to take a flags argument 2011-10-05 13:45:29 -07:00
stripspace.c
symbolic-ref.c
tag.c Merge branch 'mh/check-ref-format-3' 2011-10-10 15:56:18 -07:00
tar-tree.c
unpack-file.c
unpack-objects.c
update-index.c
update-ref.c
update-server-info.c
upload-archive.c
var.c
verify-pack.c
verify-tag.c
write-tree.c