fix deletion of .git/objects sub-directories in git-prune/repack

Both git-prune and git-repack (and thus, git-gc) try to rmdir while
holding a DIR* handle on the directory.  This can leave dangling
empty directories in the .git/objects on platforms where directory
cannot be removed while they are open.

First call closedir() and then rmdir(); that is more logical ordering.

Reported-by: John Chen <john0312@gmail.com>
Reported-by: Stefan Naewe <stefan.naewe@gmail.com>
Signed-off-by: Karsten Blees <blees@dcon.de>
Improved-and-Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jc/pickaxe-ignore-case'

By Junio C Hamano (2) and Ramsay Jones (1)
* jc/pickaxe-ignore-case:
  ctype.c: Fix a sparse warning
  pickaxe: allow -i to search in patch case-insensitively
  grep: use static trans-case table
Git 1.7.10-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge v1.7.10-rc0 for git l10n update
l10n: Update git.pot (1 new message)

Update file 'po/git.pot' to v1.7.10-rc0:

* Add 1 new l10n string in the new generated "git.pot" file at line:
  191

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
po/sv.po: add Swedish translation

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
(cherry picked from commit 54ce07007c7988268d43619c580e81fbca09d37b)
Update Swedish translation (732t0f0u).

This update includes a replay of some review fixes from the initial
translation run in 2010, which I cannot find having committed anywhere.

Add myself to the po/TEAMS file as well.

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
l10n: Update zh_CN translation for 1.7.10-rc0

Translate 1 new message from Git 1.7.10-rc0.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
l10n: Improve zh_CN trans for msg that cannot fast-forward

Signed-off-by: Thynson <lanxingcan@gmail.com>
l10n: Improve zh_CN translation for msg "not something we can merge"

Signed-off-by: Thynson <lanxingcan@gmail.com>
perf: load test-lib-functions from the correct directory

Loading it in the subshells still referred to $TEST_DIRECTORY/..,
which was only correct in preliminary versions of perf-lib.sh

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
perf: export some important test-lib variables

The only bug right now is that $GIT_TEST_CMP is needed for test_cmp to
work.

However, we also export the three most important paths for tests:

  TEST_DIRECTORY
  TRASH_DIRECTORY
  GIT_BUILD_DIR

Since they are available within test_expect_success, a future test
writer may expect them to also be defined in test_perf.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'vr/branch-doc'

By Vincent van Ravesteijn
* vr/branch-doc:
  Documentation/git-branch: add default for --contains
  Documentation/git-branch: fix a typo
  Documentation/git-branch: cleanups
Merge branch 'jn/maint-do-not-match-with-unsanitized-searchtext'

By Jakub Narebski
* jn/maint-do-not-match-with-unsanitized-searchtext:
  gitweb: Fix fixed string (non-regexp) project search

Conflicts:
	gitweb/gitweb.perl
Merge branch 'jl/maint-submodule-relative'

By Jens Lehmann (3) and Johannes Sixt (1)
* jl/maint-submodule-relative:
  submodules: fix ambiguous absolute paths under Windows
  submodules: refactor computation of relative gitdir path
  submodules: always use a relative path from gitdir to work tree
  submodules: always use a relative path to gitdir
Merge branch 'kb/maint-prune-rmdir-closedir'

By Karsten Blees
* kb/maint-prune-rmdir-closedir:
  fix deletion of .git/objects sub-directories in git-prune/repack
Update draft release notes to 1.7.10

Also apply typofixes people on the list helped spotting and
correcting.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
verify-tag: Parse GPG configuration options.

Modify verify-tag to load relevant GPG variables from the git
configuratio file.  This allows git tag -v to use an alternative
GPG binary in the same way that git tag -s does.

Signed-off-by: Alex Zepeda <alex@inferiorhumanorgans.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
rerere: Document 'rerere remaining'

This adds the 'remaining' command to the documentation of
'git rerere'. This command was added in ac49f5ca (Feb 16 2011;
Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>) but
it was never documented.

Touch up the other rerere commands to reduce noise.

First noticed by Vincent van Ravesteijn.

Signed-off-by: Phil Hord <phil.hord@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
p4000: use -3000 when promising -3000

The 'log -3000 (baseline)' test accidentally still used -1000 from an
earlier version.

Noticed-by: Lawrence Holding <Lawrence.Holding@cubic.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>