Commit Graph

49218 Commits

Author SHA1 Message Date
Johannes Schindelin
ce76bbcc44 gitweb: Allow line number toggling with Javascript
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-24 11:23:48 +01:00
nalla
c25fa2e0f2 Start the merging-rebase to v2.3.4
This commit starts the rebase of 5adb572 to 1d11abb
2015-03-24 11:23:32 +01:00
Junio C Hamano
3a52578eef Git 2.3.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v2.3.4
2015-03-23 11:27:27 -07:00
Junio C Hamano
437ed4cea1 Merge branch 'rs/use-isxdigit' into maint
Code cleanup.

* rs/use-isxdigit:
  use isxdigit() for checking if a character is a hexadecimal digit
2015-03-23 11:23:41 -07:00
Junio C Hamano
a393c6bfd9 Merge branch 'rs/deflate-init-cleanup' into maint
Code simplification.

* rs/deflate-init-cleanup:
  zlib: initialize git_zstream in git_deflate_init{,_gzip,_raw}
2015-03-23 11:23:38 -07:00
Junio C Hamano
a4f287e5aa Merge branch 'ak/git-done-help-cleanup' into maint
Code simplification.

* ak/git-done-help-cleanup:
  git: make was_alias and done_help non-static
2015-03-23 11:23:35 -07:00
Junio C Hamano
7d6f6e3730 Merge branch 'sg/completion-remote' into maint
Code simplification.

* sg/completion-remote:
  completion: simplify __git_remotes()
  completion: add a test for __git_remotes() helper function
2015-03-23 11:23:33 -07:00
Junio C Hamano
ffac6258de Merge branch 'mg/doc-status-color-slot' into maint
Documentation fixes.

* mg/doc-status-color-slot:
  config,completion: add color.status.unmerged
2015-03-23 11:23:31 -07:00
Junio C Hamano
3f6f5c9dbe Merge branch 'jc/decorate-leaky-separator-color' into maint
"git log --decorate" did not reset colors correctly around the
branch names.

* jc/decorate-leaky-separator-color:
  log --decorate: do not leak "commit" color into the next item
  Documentation/config.txt: simplify boolean description in the syntax section
  Documentation/config.txt: describe 'color' value type in the "Values" section
  Documentation/config.txt: have a separate "Values" section
  Documentation/config.txt: describe the structure first and then meaning
  Documentation/config.txt: explain multi-valued variables once
  Documentation/config.txt: avoid unnecessary negation
2015-03-23 11:23:28 -07:00
Junio C Hamano
c97418466a Merge branch 'kn/git-cd-to-empty' into maint
"git -C '' subcmd" refused to work in the current directory, unlike
"cd ''" which silently behaves as a no-op.

* kn/git-cd-to-empty:
  git: treat "git -C '<path>'" as a no-op when <path> is empty
2015-03-23 11:23:25 -07:00
Junio C Hamano
84a37fae51 Merge branch 'km/imap-send-libcurl-options' into maint
"git imap-send" learned to optionally talk with an IMAP server via
libcURL; because there is no other option when Git is built with
NO_OPENSSL option, use that codepath by default under such
configuration.

* km/imap-send-libcurl-options:
  imap-send: use cURL automatically when NO_OPENSSL defined
2015-03-23 11:23:23 -07:00
Junio C Hamano
82b6e331a4 Merge branch 'mg/verify-commit' into maint
Workarounds for certain build of GPG that triggered false breakage
in a test.

* mg/verify-commit:
  t7510: do not fail when gpg warns about insecure memory
2015-03-23 11:23:20 -07:00
Junio C Hamano
f63ed085e2 Merge branch 'es/rebase-i-count-todo' into maint
"git rebase -i" recently started to include the number of
commits in the insn sheet to be processed, but on a platform
that prepends leading whitespaces to "wc -l" output, the numbers
are shown with extra whitespaces that aren't necessary.

* es/rebase-i-count-todo:
  rebase-interactive: re-word "item count" comment
  rebase-interactive: suppress whitespace preceding item count
2015-03-23 11:23:17 -07:00
Junio C Hamano
8c2ea51254 Merge branch 'tb/connect-ipv6-parse-fix' into maint
We did not parse username followed by literal IPv6 address in SSH
transport URLs, e.g. ssh://user@[2001:db8::1]:22/repo.git
correctly.

* tb/connect-ipv6-parse-fix:
  t5500: show user name and host in diag-url
  t5601: add more test cases for IPV6
  connect.c: allow ssh://user@[2001:db8::1]/repo.git
2015-03-23 11:23:13 -07:00
Johannes Schindelin
3ee6eff6fd Merge pull request #38 from dscho/mingw-environment
Fix access violations when cloning/fetching via HTTPS
2015-03-21 10:43:19 +01:00
Johannes Schindelin
e9d0cf4178 Merge pull request #40 from nalla/git-terminal-prompt
mingw: Proper `git_terminal_prompt` with `xterm`
2015-03-21 10:43:19 +01:00
Johannes Schindelin
12e5c37398 mingw: be *very* wary about outside environment changes
The environment is modified in most surprising circumstances, and not
all of them are under Git's control. For example, calling
curl_global_init() on Windows will ensure that the CHARSET variable is
set, adding one if necessary.

While the previous commit worked around crashes triggered by such
outside changes of the environment by relaxing the requirement that the
environment be terminated by a NULL pointer, the other assumption made
by `mingw_getenv()` and `mingw_putenv()` is that the environment is
sorted, for efficient lookup via binary search.

Let's make real sure that our environment is intact before querying or
modifying it, and reinitialize our idea of the environment if necessary.

With this commit, before working on the environment we look briefly for
indicators that the environment was modified outside of our control, and
to ensure that it is terminated with a NULL pointer and sorted again in
that case.

Note: the indicators are maybe not sufficient. For example, when a
variable is removed, it will not be noticed. It might also be a problem
if outside changes to the environment result in a modified `environ`
pointer: it is unclear whether such a modification could result in a
problem when `mingw_putenv()` needs to `realloc()` the environment
buffer.

For the moment, however, the current fix works well enough, so let's
only face the potential problems when (and if!) they occur.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-21 10:43:10 +01:00
Johannes Schindelin
6432af8787 mingw: be more defensive when making the environment block
Outside of our Windows-specific code, the end of the environment can be
marked also by a pointer to a NUL character, not only by a NULL pointer
as our code assumed so far.

That led to a buffer overrun in `make_environment_block()` when running
`git-remote-https` in `mintty` (because `curl_global_init()` added the
`CHARSET` environment variable *outside* of `mingw_putenv()`, ending the
environment in a pointer to an empty string).

Side note for future debugging on Windows: when running programs in
`mintty`, the standard input/output/error is not connected to a Win32
Console, but instead is pipe()d. That means that even stderr may not be
written completely before a crash, but has to be fflush()ed explicitly.
For example, when debugging crashes, the developer should insert an
`fflush(stderr);` at the end of the `error()` function defined in
usage.c.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-21 10:43:10 +01:00
Johannes Schindelin
66d271482b UTF-8 environment: be a little bit more defensive
It is unlikely that we have an empty environment, ever, but *if* we do,
when `environ_size - 1` is passed to `bsearchenv()` it is misinterpreted
as a real large integer.

To make the code truly defensive, refuse to do anything at all if the
size is negative (which should not happen, of course).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-21 10:43:10 +01:00
nalla
24f9b07c71 mingw: Support git_terminal_prompt with more terminals
The `git_terminal_prompt()` function expects the terminal window to be
attached to a Win32 Console. However, this is not the case with terminal
windows other than `cmd.exe`'s, e.g. with MSys2's own `mintty`.

Non-cmd terminals such as `mintty` still have to have a Win32 Console
to be proper console programs, but have to hide the Win32 Console to
be able to provide more flexibility (such as being resizeable not only
vertically but also horizontally). By writing to that Win32 Console,
`git_terminal_prompt()` manages only to send the prompt to nowhere and
to wait for input from a Console to which the user has no access.

This commit introduces a function specifically to support `mintty` -- or
other terminals that are compatible with MSys2's `/dev/tty` emulation. We
use the `TERM` environment variable as an indicator for that: if the value
starts with "xterm" (such as `mintty`'s "xterm_256color"), we prefer to
let `xterm_prompt()` handle the user interaction.

To handle the case when standard input/output are redirected – as is the
case when pushing via HTTPS: `git-remote-https`' standard input and
output are pipes from/to the main Git executable – we make use of the
`MSYS_TTY_HANDLES` environment variable that was introduced to
fix another bug in MSys2-based Git: this environment variable contains
the Win32 `HANDLE`s of the standard input, output and error as originally
passed from MSys2 to the Git executable, enclosed within space
characters, skipping handles that do not refer to the terminal window
(e.g. when they were redirected). We will only use those handles when
that environment variable lists all three handles because then we can be
100% certain that we are running inside a terminal window, and that we
know exactly which Win32 handles to use to communicate with it.

Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: nalla <nalla@hamal.uberspace.de>
2015-03-21 10:43:09 +01:00
Johannes Schindelin
68a8e3108e Merge 'poll_inftim' into HEAD
This was originally 'pull request #330 from ethomson/poll_inftim' in
msysgit/git.

poll: honor the timeout on Win32

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-20 15:04:57 +01:00
Johannes Schindelin
d002525dd2 Merge pull request #34 from dscho/git-wrapper
Use msysGit's `git-wrapper` instead of the builtins
2015-03-20 15:04:55 +01:00
Johannes Schindelin
42d76bbd4c Merge 'non-win-fixes' into HEAD 2015-03-20 15:04:54 +01:00
Johannes Schindelin
6563b9afea Merge pull request #239 from sschuberth/taskkill
git-gui/gitk: Do not use a Cygwin-specific kill flag on Windows
2015-03-20 15:04:52 +01:00
Johannes Schindelin
d818c047bc Merge pull request #122 from kblees/kb/long-paths-v2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-20 15:04:47 +01:00
Johannes Schindelin
931ec5dd53 Merge remote-tracking branch 'kblees/kb/fscache-v4-tentative-1.8.5' into thicket-1.8.5.2 2015-03-20 15:04:45 +01:00
Johannes Schindelin
d2acc15662 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>
2015-03-20 15:04:42 +01:00
Johannes Schindelin
4831e658a0 Merge pull request #24 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2015-03-20 15:04:38 +01:00
Johannes Schindelin
c0b066f044 Merge pull request #14 from dscho/readme
Add a README.md for GitHub goodness.
2015-03-20 15:04:38 +01:00
Johannes Schindelin
e502303a1b Merge 'fix-is-exe' into HEAD 2015-03-20 15:04:36 +01:00
Johannes Schindelin
a8e39d4c40 Merge 'fix-externals' into HEAD 2015-03-20 15:04:35 +01:00
Johannes Schindelin
cb4b9e1855 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>
2015-03-20 15:04:33 +01:00
Johannes Schindelin
9a373ad136 Merge 'win-tests-fixes' into HEAD 2015-03-20 15:04:31 +01:00
Johannes Schindelin
e9700bf8ac 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>
2015-03-20 15:04:28 +01:00
Johannes Schindelin
02e2dfebf8 Merge pull request #28 from dscho/tty-handles
Teach msys2-runtime to hand the tty through to Git
2015-03-20 15:04:27 +01:00
Johannes Schindelin
59967c3f79 Merge pull request #33 from dscho/manifest
Embed a manifest into git.exe
2015-03-20 15:04:26 +01:00
Johannes Schindelin
5d039ed525 Merge pull request #26 from dscho/msys2
Fixes required to build Git for Windows with MSys2
2015-03-20 15:04:23 +01:00
Johannes Schindelin
199ea6df41 Merge 'pull-rebase-interactive' into HEAD 2015-03-20 15:04:21 +01:00
Johannes Schindelin
ffaa9326b9 Merge 'jberezanski/wincred-sso-r2' into HEAD 2015-03-20 15:04:17 +01:00
Johannes Schindelin
9f82c7a30b Merge 'gitweb-syntax' into HEAD 2015-03-20 15:04:14 +01:00
Johannes Schindelin
158d02449a Merge 'gitk' into HEAD 2015-03-20 15:04:07 +01:00
Johannes Schindelin
bd81a43e3f Merge 'git-gui' into HEAD 2015-03-20 15:04:05 +01:00
Johannes Schindelin
0d23ef0eb6 Merge 'criss-cross-merge' into HEAD 2015-03-20 15:04:04 +01:00
Johannes Schindelin
c282cb6495 Merge 'am-submodules' into HEAD 2015-03-20 15:04:03 +01:00
Johannes Schindelin
dd9c6db316 Merge 'hide-dotgit' into HEAD 2015-03-20 15:04:01 +01:00
Johannes Schindelin
43a1473c13 Merge 'unicode' into HEAD 2015-03-20 15:03:59 +01:00
Karsten Blees
dc595c0bd4 git-gui:handle the encoding of Git's output correctly
If we use 'eval exec $opt $cmdp $args' to execute git command,
tcl engine will convert the output of the git comand with the rule
system default code page to unicode.

But cp936 -> unicode conversion implicitly done by exec is not reversible.
So we have to use git_read instead.

Bug report and an original reproducer by Cloud Chou:
https://github.com/msysgit/git/issues/302

Karsten Blees writes this code patch.
Cloud Chou find the reason of the bug.

Thanks-to: dscho
Thanks-to: patthoyts
Signed-off-by: Karsten Blees <blees@dcon.de>
Original-test-by: Cloud Chou <515312382@qq.com>
Signed-off-by: Cloud Chou <515312382@qq.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-20 15:00:54 +01:00
Edward Thomson
1d99025822 poll: honor the timeout on Win32
Ensure that when passing a pipe, the gnulib poll replacement will not
return 0 before the timeout has passed.

Not obeying the timeout (and merely returning 0) causes pathological
behavior when preparing a packfile for a repository and taking a
long time to do so.  If poll were to return 0 immediately, this would
cause keep-alives to get sent as quickly as possible until the packfile
was created.  Such deviance from the standard would cause megabytes (or
more) of keep-alive packets to be sent.

GetTickCount is used as it is efficient, stable and monotonically
increasing.  (Neither GetSystemTime nor QueryPerformanceCounter have
all three of these properties.)
2015-03-20 14:34:59 +01:00
마누엘
2d12bb799c mingw: Fix CVS-related tests
The CVS tests expect `pwd` to return a POSIX-style directory. Let's skip
our MinGW-specific override to let `pwd` output a Windows-style directory
for that reason.

Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: 마누엘 <nalla@hamal.uberspace.de>
2015-03-20 14:34:49 +01:00
Johannes Schindelin
5727569a2c mingw: Use the Git wrapper for builtins
This reduces the disk footprint of a full Git for Windows setup
dramatically because on Windows, one cannot assume that hard links are
supported.

The net savings are calculated easily: the 32-bit `git.exe` file weighs
in with 7662 kB while the `git-wrapper.exe` file (modified to serve as a
drop-in replacement for builtins) weighs a scant 21 kB. At this point,
there are 109 builtins which results in a total of 813 MB disk space
being freed up by this commit.

Yes, that is really more than half a gigabyte.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-20 14:34:42 +01:00