Commit Graph

45913 Commits

Author SHA1 Message Date
Theodore Leblond
ea5f4e2dc3 compat/poll: sleep 1 millisecond to avoid busy wait
SwitchToThread() only gives away the rest of the current time slice
to another thread in the current process. So if the thread that feeds
the file decscriptor we're polling is not in the current process, we
get busy-waiting.

I played around with this quite a bit. After trying some more complex
schemes, I found that what worked best is to just sleep 1 millisecond
between iterations. Though it's a very short time, it still completely
eliminates the busy wait condition, without hurting perf.

There code uses SleepEx(1, TRUE) to sleep. See this page for a good
discussion of why that is better than calling SwitchToThread, which
is what was used previously:
http://stackoverflow.com/questions/1383943/switchtothread-vs-sleep1

Note that calling SleepEx(0, TRUE) does *not* solve the busy wait.

The most striking case was when testing on a UNC share with a large repo,
on a single CPU machine. Without the fix, it took 4 minutes 15 seconds,
and with the fix it took just 1:08! I think it's because git-upload-pack's
busy wait was eating the CPU away from the git process that's doing the
real work. With multi-proc, the timing is not much different, but tons of
CPU time is still wasted, which can be a killer on a server that needs to
do bunch of other things.

I also tested the very fast local case, and didn't see any measurable
difference. On a big repo with 4500 files, the upload-pack took about 2
seconds with and without the fix.

[jc: this was first accepted in msysgit tree in May 2012 via a pull
request and Paolo Bonzini has also accepted the same fix to Gnulib
around the same time; see $gmane/247518 for a bit more detail]

Signed-off-by: Stepan Kasal <kasal@ucw.cz>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-29 10:39:25 +02:00
RomanBelinsky
d574dd21a7 SVN.pm::parse_svn_date: allow timestamps with a single-digit hour
Some broken subversion server gives timestamps with only one digit
in the hour part, like this:

    2014-01-07T5:01:02.048176Z

Loosen the regexp that expected to see two-digit hour, minute and
second parts to accept a single-digit hour (but not minute or
second).

Signed-off-by: Stepan Kasal <kasal@ucw.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-29 10:39:24 +02:00
Jean-Jacques Lafay
1e9a108249 git tag --contains: avoid stack overflow
In large repos, the recursion implementation of contains(commit,
commit_list) may result in a stack overflow. Replace the recursion with
a loop to fix it.

This problem is more apparent on Windows than on Linux, where the stack
is more limited by default.

See also this thread on the msysGit list:

	https://groups.google.com/d/topic/msysgit/FqT6boJrb2g/discussion

[jes: re-written to imitate the original recursion more closely]

Thomas Braun pointed out several documentation shortcomings.

Tests are run only if ulimit -s is available.  This means they cannot
be run on Windows.

Signed-off-by: Jean-Jacques Lafay <jeanjacques.lafay@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Tested-by: Stepan Kasal <kasal@ucw.cz>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-29 10:39:23 +02:00
Stepan Kasal
ec765f62e2 Start the merging-rebase to v2.0.0
This commit starts the rebase of 9469666 to 18a0735
2014-05-29 10:39:18 +02:00
Junio C Hamano
e156455ea4 Git 2.0 v2.0.0 2014-05-28 11:04:19 -07:00
dscho
6679ea9435 Merge pull request #190 from kasal/kb-long-paths-v3
Support long paths v3
2014-05-27 11:13:49 -05:00
Stepan Kasal
a15723c988 squash! Win32: support long paths
Squash in this commit text:
Test the case is when the full pathname length of a dir is close
to 260 (MAX_PATH).
Bug report and an original reproducer by Andrey Rogozhnikov:
https://github.com/msysgit/git/pull/122#issuecomment-43604199

Original-test-by: Andrey Rogozhnikov <rogozhnikov.andrey@gmail.com>
Signed-off-by: Stepan Kasal <kasal@ucw.cz>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-26 18:43:37 +02:00
Junio C Hamano
4a28f169ad Update draft release notes to 2.0
Hopefully for the last time ;-)

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-21 11:50:35 -07:00
Junio C Hamano
8ced8e40ac Git 2.0-rc4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v2.0.0-rc4
2014-05-20 14:51:11 -07:00
Jason St. John
3054c66bd4 RelNotes/2.0.0.txt: Fix several grammar issues, notably a lack of hyphens, double quotes, or articles
Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-20 14:51:06 -07:00
Junio C Hamano
b2c851a8e6 Revert "Merge branch 'jc/graduate-remote-hg-bzr' (early part)"
Instead of showing a warning and working as before, fail and show
the message and force immediate upgrade from their upstream
repositories when these tools are run, per request from their
primary author.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-20 14:48:11 -07:00
Junio C Hamano
00a5b79466 Merge branch 'jc/graduate-remote-hg-bzr' (early part)
* 'jc/graduate-remote-hg-bzr' (early part):
  remote-helpers: point at their upstream repositories
  contrib: remote-helpers: add move warnings (v2.0)
  Revert "Merge branch 'fc/transport-helper-sync-error-fix'"
2014-05-19 17:12:36 -07:00
Junio C Hamano
896ba14d65 remote-helpers: point at their upstream repositories
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-19 17:10:03 -07:00
Felipe Contreras
0311086351 contrib: remote-helpers: add move warnings (v2.0)
The tools are now maintained out-of-tree, and they have a regression
in v2.0. It's better to start warning the users as soon as possible.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-19 17:10:03 -07:00
Junio C Hamano
10e1feebb4 Revert "Merge branch 'fc/transport-helper-sync-error-fix'"
This reverts commit d508e4a8e2,
reversing changes made to e42552135a.

The author of the original topic says he broke the upcoming 2.0
release with something that relates to "synchronization crash
regression" while refusing to give further specifics, so this would
unfortunately be the safest option for the upcoming release.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-19 17:09:57 -07:00
Junio C Hamano
df43b41afc Merge branch 'rh/prompt-pcmode-avoid-eval-on-refname'
* rh/prompt-pcmode-avoid-eval-on-refname:
  git-prompt.sh: don't assume the shell expands the value of PS1
2014-05-19 16:10:10 -07:00
Richard Hansen
1e4119c81b git-prompt.sh: don't assume the shell expands the value of PS1
Not all shells subject the prompt string to parameter expansion.  Test
whether the shell will expand the value of PS1, and use the result to
control whether raw ref names are included directly in PS1.

This fixes a regression introduced in commit 8976500 ("git-prompt.sh:
don't put unsanitized branch names in $PS1"):  zsh does not expand PS1
by default, but that commit assumed it did.  The bug resulted in
prompts containing the literal string '${__git_ps1_branch_name}'
instead of the actual branch name.

Reported-by: Caleb Thompson <caleb@calebthompson.io>
Signed-off-by: Richard Hansen <rhansen@bbn.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-19 16:09:53 -07:00
Junio C Hamano
7dde48ea7a Merge branch 'lt/request-pull'
* lt/request-pull:
  request-pull: resurrect for-linus -> tags/for-linus DWIM
2014-05-19 10:35:36 -07:00
Junio C Hamano
5714722f71 Merge branch 'jl/use-vsatisfy-correctly-for-2.0'
* jl/use-vsatisfy-correctly-for-2.0:
  git-gui: tolerate major version changes when comparing the git version
2014-05-19 10:35:24 -07:00
Junio C Hamano
c29bf4a556 Merge git://github.com/git-l10n/git-po
* git://github.com/git-l10n/git-po:
  fr: a lot of good fixups
2014-05-19 10:32:56 -07:00
Junio C Hamano
3fc2aea770 Merge branch 'kb/fast-hashmap'
* kb/fast-hashmap:
  Documentation/technical/api-hashmap: remove source highlighting
2014-05-19 10:32:25 -07:00
Anders Kaseorg
c2538fd6ba Documentation/technical/api-hashmap: remove source highlighting
The highlighting was pretty, but unfortunately, the failure mode
when source-highlight is not installed was that the entire code
block disappears.

See https://bugs.debian.org/745591,
    https://bugs.launchpad.net/bugs/1316810.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-19 10:31:36 -07:00
Jens Lehmann
b3f0c5c04e git-gui: tolerate major version changes when comparing the git version
Since git 2.0.0 starting git gui in a submodule using a gitfile fails with
the following error:

   No working directory ../../../<path>

   couldn't change working directory
   to "../../../<path>": no such file or
   directory

This is because "git rev-parse --show-toplevel" is only run when git gui
sees a git version of at least 1.7.0 (which is the version in which the
--show-toplevel option was introduced). But "package vsatisfies" returns
false when the major version changes, which is not what we want here.

Fix that for both places where the git version is checked using vsatisfies
by appending a '-' to the version number. This tells vsatisfies that a
change of the major version is not considered to be a problem, as long as
the new major version is larger. This is done for both the place that
caused the reported bug and another spot where the git version is tested
for another feature.

Reported-by: Chris Packham <judge.packham@gmail.com>
Reported-by: Yann Dirson <ydirson@free.fr>
Helped-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Tested-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-19 10:12:45 -07:00
dscho
05160237ee Merge pull request #188 from kasal/revert-install-wincred
fixup! wincred: add install target and avoid overwriting configured vari...
2014-05-19 09:33:27 -05:00
Stepan Kasal
dbbfda0f22 fixup! wincred: add install target and avoid overwriting configured variables. 2014-05-19 15:43:36 +02:00
Grégoire Paris
a6e888397c fr: a lot of good fixups
Signed-off-by: Grégoire Paris <postmaster@greg0ire.fr>
Acked-by: Jean-Noel Avila <jn.avila@free.fr>
2014-05-17 19:08:59 +02:00
dscho
17e522f90a Merge pull request #184 from kasal/master
rebased on v1.9.3
2014-05-16 12:58:14 -05:00
Junio C Hamano
d952cbb190 request-pull: resurrect for-linus -> tags/for-linus DWIM
Older versions of Git before v1.7.10 did not DWIM

    $ git pull $URL for-linus

to the tag "tags/for-linus" and the users were required to say

    $ git pull $URL tags/for-linus

instead.  Because newer versions of Git works either way,
request-pull used to show tags/for-linus when asked

    $ git request-pull origin/master $URL for-linus

The recent updates broke this and in the output we see "for-linus"
without the "tags/" prefix.

As v1.7.10 is more than 2 years old, this should matter very little
in practice, but resurrecting it is very simple.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-16 10:18:25 -07:00
Stepan Kasal
22d6277408 Merge pull request #122 from kblees/kb/long-paths-v2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-15 09:44:23 +02:00
Stepan Kasal
03c05b9898 Merge remote-tracking branch 'kblees/kb/fscache-v4-tentative-1.8.5' into thicket-1.8.5.2 2014-05-15 09:44:22 +02:00
Stepan Kasal
28e6f34027 Merge pull request #181 from kasal/tests-no-posix
Revert "test: fix t7001 cp to use POSIX options"
2014-05-15 09:44:21 +02:00
Stepan Kasal
31dfc9cd78 Merge remote-tracking branch 't-b/sideband-bug'
This will allow us to work around the push issues pointed out in
https://github.com/msysgit/git/issues/101.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-15 09:44:20 +02:00
Stepan Kasal
26ae347a63 Merge branch 'kb/hashmap-v5-minimal' into kb/fscache-v4-t1.8.5 2014-05-15 09:44:18 +02:00
Stepan Kasal
0effa25e5d Merge pull request #115 from msysgit/tip4commit
Mention tip4commit
2014-05-15 09:44:17 +02:00
Stepan Kasal
c45221eeef Merge 'install-wincred' into HEAD 2014-05-15 09:44:16 +02:00
Stepan Kasal
6195099cb4 Merge 'fix-is-exe' into HEAD 2014-05-15 09:44:15 +02:00
Stepan Kasal
ca1a6ed229 Merge 'fix-externals' into HEAD 2014-05-15 09:44:14 +02:00
Stepan Kasal
8673fdf95d Merge 'stash-reflog' into HEAD 2014-05-15 09:44:12 +02:00
Stepan Kasal
4a2c3f4325 Merge 'http-msys-paths' into HEAD 2014-05-15 09:44:11 +02:00
Stepan Kasal
96af4a2fa0 Merge 'remote-hg-prerequisites' into HEAD
These fixes were necessary for Sverre Rabbelier's remote-hg to work,
but for some magic reason they are not necessary for the current
remote-hg. Makes you wonder how that one gets away with it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-15 09:44:10 +02:00
Stepan Kasal
1b38b9a4a1 Merge 'win-tests-fixes' into HEAD 2014-05-15 09:44:09 +02:00
Stepan Kasal
78abb544e6 Merge branch 'some-CR-fixes'
This branch contains some hacks so that Git produces less CR, and then
some tests.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-15 09:44:08 +02:00
Stepan Kasal
cfd98c3117 Merge 'pull-rebase-interactive' into HEAD 2014-05-15 09:44:06 +02:00
Stepan Kasal
34b69048eb Merge 'send-email' into HEAD 2014-05-15 09:44:05 +02:00
Stepan Kasal
eb1913f3fb Merge 'jberezanski/wincred-sso-r2' into HEAD 2014-05-15 09:44:04 +02:00
Stepan Kasal
c8cbdf0ed4 Merge 'gitweb-syntax' into HEAD 2014-05-15 09:44:03 +02:00
Stepan Kasal
c5331c411e Merge 'gitk' into HEAD 2014-05-15 09:44:02 +02:00
Stepan Kasal
36c14e5ae8 Merge 'git-gui' into HEAD 2014-05-15 09:44:00 +02:00
Stepan Kasal
496751e720 Merge 'deny-current-branch' into HEAD 2014-05-15 09:43:59 +02:00
Stepan Kasal
82f25bf2fe Merge 'criss-cross-merge' into HEAD 2014-05-15 09:43:58 +02:00