Commit Graph

39128 Commits

Author SHA1 Message Date
Sebastian Schuberth
4e2807d52c Makefile: Do not use OLD_ICONV on MINGW anymore
We are building libiconv now the same way as upstream MinGW does, so we do
not need OLD_ICONV anymore when compiling Git either in msysGit or
mingwGitDevEnv.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
2013-01-31 23:44:45 +00:00
Johannes Schindelin
db30315bfa Do not compile compat/**/*.c with -Wold-style-definition
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-01-31 23:44:44 +00:00
Johannes Schindelin
7138dbbc3d Make CFLAGS more strict
This is a gcc-ism, but as we use gcc exclusively, we can use them.

Taken from one of Junio's mails. (Reminded to cherry-pick this patch
by one of Karsten Blees' mails.)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-01-31 23:44:43 +00:00
Pat Thoyts
191fb70eb6 Start the merging-rebase to v1.8.1.2
This commit starts the rebase of effcff5 to 48d8bdf
using 0403cb9857 as base.
2013-01-31 23:44:41 +00:00
Junio C Hamano
53cdd4e1b2 Git 1.8.1.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.8.1.2
2013-01-28 11:17:54 -08:00
Junio C Hamano
a77133e383 Merge branch 'ss/help-htmlpath-config-doc' into maint
* ss/help-htmlpath-config-doc:
  config.txt: Document help.htmlpath config parameter
2013-01-28 11:13:31 -08:00
Junio C Hamano
6d7c1c8894 Merge branch 'nd/attr-debug-fix' into maint
* nd/attr-debug-fix:
  attr: make it build with DEBUG_ATTR again
2013-01-28 11:13:07 -08:00
Junio C Hamano
7025616048 Merge branch 'ds/completion-silence-in-tree-path-probe' into maint
* ds/completion-silence-in-tree-path-probe:
  git-completion.bash: silence "not a valid object" errors
2013-01-28 11:12:47 -08:00
Junio C Hamano
095d65d73b Merge branch 'jn/maint-trim-vim-contrib' into maint
* jn/maint-trim-vim-contrib:
  contrib/vim: simplify instructions for old vim support
2013-01-28 11:12:36 -08:00
Junio C Hamano
a94214b75e Merge branch 'pe/doc-email-env-is-trumped-by-config' into maint
* pe/doc-email-env-is-trumped-by-config:
  git-commit-tree(1): correct description of defaults
2013-01-28 11:12:31 -08:00
Junio C Hamano
c1640aa5d3 Merge branch 'mk/complete-tcsh' into maint
Command line completion for "tcsh" emitted an unwanted space
after completing a single directory name.

* mk/complete-tcsh:
  Prevent space after directories in tcsh completion
2013-01-28 11:11:51 -08:00
Junio C Hamano
85fd059a89 Merge branch 'ap/status-ignored-in-ignored-directory' into maint
Output from "git status --ignored" did not work well when used with
"--untracked".

* ap/status-ignored-in-ignored-directory:
  status: always report ignored tracked directories
  git-status: Test --ignored behavior
  dir.c: Make git-status --ignored more consistent
2013-01-28 11:10:25 -08:00
Junio C Hamano
3a51e4be9c Merge branch 'er/stop-recommending-parsecvs' into maint
* er/stop-recommending-parsecvs:
  Remove the suggestion to use parsecvs, which is currently broken.
2013-01-28 11:09:37 -08:00
Junio C Hamano
ce956fc48e Merge branch 'mh/ceiling' into maint
An element on GIT_CEILING_DIRECTORIES list that does not name the
real path to a directory (i.e. a symbolic link) could have caused
the GIT_DIR discovery logic to escape the ceiling.

* mh/ceiling:
  string_list_longest_prefix(): remove function
  setup_git_directory_gently_1(): resolve symlinks in ceiling paths
  longest_ancestor_length(): require prefix list entries to be normalized
  longest_ancestor_length(): take a string_list argument for prefixes
  longest_ancestor_length(): use string_list_split()
  Introduce new function real_path_if_valid()
  real_path_internal(): add comment explaining use of cwd
  Introduce new static function real_path_internal()
2013-01-28 11:07:18 -08:00
John Keeping
b344bb1935 git-for-each-ref.txt: 'raw' is a supported date format
Commit 7dff9b3 (Support 'raw' date format) added a raw date format.
Update the git-for-each-ref documentation to include this.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-21 16:26:26 -08:00
Junio C Hamano
74f3267b0c Start preparing for 1.8.1.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-20 17:26:04 -08:00
Junio C Hamano
cea1e2e94c Merge branch 'nz/send-email-headers-are-case-insensitive' into maint
When users spell "cc:" in lowercase in the fake "header" in the
trailer part, "git send-email" failed to pick up the addresses from
there. As e-mail headers field names are case insensitive, this
script should follow suit and treat "cc:" and "Cc:" the same way.

* nz/send-email-headers-are-case-insensitive:
  git-send-email: treat field names as case-insensitively
2013-01-20 17:22:49 -08:00
Junio C Hamano
ca7ccd5f46 Merge branch 'rs/zip-with-uncompressed-size-in-the-header' into maint
"git archive" did not record uncompressed size in the header when
streaming a zip archive, which confused some implementations of
unzip.

* rs/zip-with-uncompressed-size-in-the-header:
  archive-zip: write uncompressed size into header even with streaming
2013-01-20 17:22:27 -08:00
Junio C Hamano
1bc7a2b38f Merge branch 'rs/zip-tests' into maint
* rs/zip-tests:
  t5003: check if unzip supports symlinks
  t5000, t5003: move ZIP tests into their own script
  t0024, t5000: use test_lazy_prereq for UNZIP
  t0024, t5000: clear variable UNZIP, use GIT_UNZIP instead
2013-01-20 17:22:22 -08:00
Karsten Blees
effcff56a7 wincred: improve compatibility with windows versions
On WinXP, the windows credential helper doesn't work at all (due to missing
Cred[Un]PackAuthenticationBuffer APIs). On Win7, the credential format used
by wincred is incompatible with native Windows tools (such as the control
panel applet or 'cmdkey.exe /generic'). These Windows tools only set the
TargetName, UserName and CredentialBlob members of the CREDENTIAL
structure (where CredentialBlob is the UTF-16-encoded password).

Remove the unnecessary packing / unpacking of the password, along with the
related API definitions, for compatibility with Windows XP.

Don't use CREDENTIAL_ATTRIBUTEs to identify credentials for compatibility
with Windows credential manager tools. Parse the protocol, username, host
and path fields from the credential's target name instead.

Credentials created with an old wincred version will have mangled or empty
passwords after this change.

Signed-off-by: Karsten Blees <blees@dcon.de>
2013-01-16 09:55:05 +00:00
Karsten Blees
117343979f wincred: accept CRLF on stdin to simplify console usage
The windows credential helper currently only accepts LF on stdin, but bash
and cmd.exe both send CRLF. This prevents interactive use in the console.

Change the stdin parser to optionally accept CRLF.

Signed-off-by: Karsten Blees <blees@dcon.de>
2013-01-16 09:55:03 +00:00
Grahack
ca6dffac16 French translation: copy -> copie. 2013-01-16 09:55:02 +00:00
Pat Thoyts
0f7bf3815a wincred: add install target and avoid overwriting configured variables.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2013-01-16 09:55:01 +00:00
Pat Thoyts
99d198ac16 t1306: perform file comparisons using text mode for Windows support
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2013-01-16 09:55:00 +00:00
Johannes Schindelin
60fbbc5bd7 git stash: make sure that .git/logs/refs/ exists
If the user has not activated reflogs, or if nothing has been recorded
yet (as is the case directly after cloning), said directory may not
exist yet.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-01-16 09:54:59 +00:00
Sebastian Schuberth
4e3171aa32 gitk: Use an external icon file on Windows
Git for Windows now ships with the new Git icon from git-scm.com. Use that
icon file if it exists instead of the old procedurally drawn one.

This patch was sent upstream but so far no decision on its inclusion was
made, so commit it to our fork.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
2013-01-16 09:54:57 +00:00
Heiko Voigt
36a9489a2b help: correct behavior for is_executable on Windows
The previous implementation said that the filesystem information on
Windows is not reliable to determine whether a file is executable.
To find gather this information it was peeking into the first two bytes
of a file to see whether it looks executable.
Apart from the fact that on Windows executables are usually defined as
such by their extension it lead to slow opening of help file in some
situations.

When you have virus scanner running calling open on an executable file
is a potentially expensive operation. See the following measurements (in
seconds) for example.

With virus scanner running (coldcache):

$ ./a.exe /libexec/git-core/
before open (git-add.exe): 0.000000
after open (git-add.exe): 0.412873
before open (git-annotate.exe): 0.000175
after open (git-annotate.exe): 0.397925
before open (git-apply.exe): 0.000243
after open (git-apply.exe): 0.399996
before open (git-archive.exe): 0.000147
after open (git-archive.exe): 0.397783
before open (git-bisect--helper.exe): 0.000160
after open (git-bisect--helper.exe): 0.397700
before open (git-blame.exe): 0.000160
after open (git-blame.exe): 0.399136
...

With virus scanner running (hotcache):

$ ./a.exe /libexec/git-core/
before open (git-add.exe): 0.000000
after open (git-add.exe): 0.000325
before open (git-annotate.exe): 0.000229
after open (git-annotate.exe): 0.000177
before open (git-apply.exe): 0.000167
after open (git-apply.exe): 0.000150
before open (git-archive.exe): 0.000154
after open (git-archive.exe): 0.000156
before open (git-bisect--helper.exe): 0.000132
after open (git-bisect--helper.exe): 0.000180
before open (git-blame.exe): 0.000718
after open (git-blame.exe): 0.000724
...

This test did just list the given directory and open() each file in it.

With this patch I get:

$ time git help git
Launching default browser to display HTML ...

real    0m8.723s
user    0m0.000s
sys     0m0.000s

and without

$ time git help git
Launching default browser to display HTML ...

real    1m37.734s
user    0m0.000s
sys     0m0.031s

both tests with cold cache and giving the machine some time to settle
down after restart.

Signed-off-by: Heiko Voigt <heiko.voigt@mahr.de>
2013-01-16 09:53:02 +00:00
Pat Thoyts
f618ecb687 Set the default help format to html for msys builds.
This resolves issue #19 by setting the compiled default to html in msys
builds following the changes introduced by commit
1cc8af0 "help: use HTML as the default help format on Windows"

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2013-01-16 09:53:01 +00:00
Adam Roben
8094687e85 Make non-.exe externals work again
7ebac8cb94 made launching of .exe
externals work when installed in Unicode paths. But it broke launching
of non-.exe externals, no matter where they were installed. We now
correctly maintain the UTF-8 and UTF-16 paths in tandem in lookup_prog.

This fixes t5526, among others.

Signed-off-by: Adam Roben <adam@roben.org>
2013-01-16 09:53:00 +00:00
Pat Thoyts
4ff60df286 Ensure the resource file is rebuilt when the version changes.
Acked-by: Erik Faye-Lund <kusmabite@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2013-01-16 09:52:59 +00:00
Johannes Schindelin
7e34dd2854 Windows resource: handle dashes in the Git version gracefully
Reported by postiffm as issue #14.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-01-16 09:52:58 +00:00
Pat Thoyts
e3a78250db Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2013-01-16 09:52:56 +00:00
theoleblond
fa9e4010e9 Sleep 1 millisecond in poll() to avoid busy wait
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.
2013-01-16 09:52:55 +00:00
Johannes Schindelin
0ec21197db Work around a problem identified by BuildHive
Apparently the signal handling is not quite correct in the fsckobject
handling (most likely we rely on a side effect that lets us still output
some message after receiving a signal 13 but in the BuildHive setup this
fails intermittently).

As a consequence, the push in t5504 does fail as expected, but fails to
output anything (unexpected). Since this is good enough for now, let's
handle an empty output as success, too.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-01-16 09:52:54 +00:00
Johannes Schindelin
28a935a352 t1050: Fix invalid call to dd(1)
This is a companion patch to fce52b4(t4012: Fix invalid call to dd(1)).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-01-16 09:52:53 +00:00
Michael J Gruber
933cfe53f6 t5801: skip without hg
The tests for remote-hg require hg, so skip them all when there is no
hg available.
2013-01-16 09:52:51 +00:00
Johannes Schindelin
80ad4b00cb Always auto-gc after calling a fast-import transport
After importing anything with fast-import, we should always let the
garbage collector do its job, since the objects are written to disk
inefficiently.

This brings down an initial import of http://selenic.com/hg from about
230 megabytes to about 14.

In the future, we may want to make this configurable on a per-remote
basis, or maybe teach fast-import about it in the first place.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-01-16 09:52:50 +00:00
Johannes Schindelin
725a3d77af remote-hg: do not interfer with hg's revs() method
Matt Mackall introduced a revs() method to the localrepo class on Wed
Nov 2 13:37:34 2011 in the commit 'localrepo: add revs helper method'.
It is used when constructing a commit in memory.

If we store the set of revs we want to handle under the same name, it
overrides that method, resulting in an unpleasant 'TypeError: 'set'
object is not callable' whenever we want to push (as we are constructing
commits in memory, then).

So let's work around that by renaming our field to 'revs_' and hope that
upstream Mercurial does not introduce a field of that name, too.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-01-16 09:52:49 +00:00
Johannes Schindelin
3d3cd442af remote-hg: handle another funny author line from http://scelenic.com/hg
In this case: David Soria Parra <dsp <at> php.net>.

With this last of three Postel patches, remote-hg can import the
Mercurial repository completely.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-01-16 09:52:48 +00:00
Johannes Schindelin
fac173a5d8 remote-hg: another case of Postel's law
This change allows invalid input from Mercurial repositories where the
author is recorded as 'Name <email@blah' (missing the closing '>').

With this change, importing http://scelenic.com/hg itself no longer fails
with:

	fatal: Missing > in ident string: Benoit Boissinot
	<benoit.boissinot@ens-lyon.org <none@none> 1129685868 -0700

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-01-16 09:52:47 +00:00
Johannes Schindelin
2773579464 remote-hg: Postel's law dictates we should handle Author<author@mail>
We should handle a missing space before the email part of an author ident
gracefully. See for example the icedtea6 repository.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-01-16 09:52:46 +00:00
Sverre Rabbelier
3f39192c84 git-remote-hg: add tests 2013-01-16 09:52:44 +00:00
Sverre Rabbelier
6f962b3c49 git-remote-hg: add the helper
The helper uses the previously added infrastructure.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
2013-01-16 09:52:43 +00:00
Michael J Gruber
c539d0cca2 remote-hg: adjust to hg 1.9
hg 1.0 changed the signature of hg.clone(). Adjust to it.

A real fix would need to check the hg version or try/catch.
2013-01-16 09:52:42 +00:00
Sverre Rabbelier
e053c71966 git-remote-hg: add GitExporter/GitImporter/NonLocalGit
This is inftrastructure required to implement git-remote-hg.
2013-01-16 09:52:41 +00:00
Sverre Rabbelier
63c271e0ef git-remote-hg: add hgexport, an hg-fast-export equivalent
This class will be used by git-remote-hg to do the heavy lifting.
2013-01-16 09:52:39 +00:00
Sverre Rabbelier
f6ad47345a git-remote-hg: add GitHg, a helper class for converting hg commits to git
This class will be used by HgExport.
2013-01-16 09:52:38 +00:00
Sverre Rabbelier
e2fe2416bf git-remote-hg: add hgimport, an hg-fast-import equivalent
This class will be used by git-remote-hg to do the heavy lifting.
2013-01-16 09:52:37 +00:00
Sverre Rabbelier
8b32b4019f git_remote_helpers: add fastimport library 2013-01-16 09:52:36 +00:00
Sverre Rabbelier
1087df68b7 git-remote-testgit: make local a function
Other helpers (such as git-remote-hg) require that 'self.local' is a
function, rather than a variable.
2013-01-16 09:52:35 +00:00