Commit Graph

49641 Commits

Author SHA1 Message Date
Thomas Braun
70c1192ec7 t5503: Mark flaky tests as known breakages
As non reliable tests are nasty.

Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
2015-04-22 20:54:13 +01:00
Stepan Kasal
10dad54ac5 Revert "test: fix t7001 cp to use POSIX options"
This reverts commit 00764ca1, as our ancient version of "cp" has
problems about the "new" POSIX option "-P" (yields exit code 1).
2015-04-22 20:54:11 +01:00
Stepan Kasal
9dd155598b tests: turn off git-daemon tests if FIFOs are not available
Signed-off-by: Stepan Kasal <kasal@ucw.cz>
2015-04-22 20:54:10 +01:00
Karsten Blees
787108982a t800[12]: work around MSys limitation
MSys works very hard to convert Unix-style paths into DOS-style ones.
*Very* hard.

So hard, indeed, that

	git blame -L/hello/,/green/

is translated into something like

	git blame -LC:/msysgit/hello/,C:/msysgit/green/

As seen in msys_p2w in src\msys\msys\rt\src\winsup\cygwin\path.cc, line
3204ff:

	case '-':
	  //
	  // here we check for POSIX paths as attributes to a POSIX switch.
	  //
	...

seemingly absolute POSIX paths in single-letter options get expanded by
msys.dll unless they contain '=' or ';'.

So a quick and very dirty fix is to use '-L/;*evil/'. (Using an equal sign
works only when it is before a comma, so in the above example, /=*green/
would still be converted to a DOS-style path.)

Commit-message-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-22 20:54:09 +01:00
Pat Thoyts
0b60cf1850 t0008: avoid absolute path on Windows as colon is used in the tests
The test separator char is a colon which means any absolute paths on windows
confuse the tests that use global_excludes.

Suggested-by: Karsten Blees <karsten.blees@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2015-04-22 20:54:08 +01:00
Johannes Schindelin
ea19f79ebb 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>
2015-04-22 20:54:07 +01:00
Sverre Rabbelier
268051fcbe t9350: point out that refs are not updated correctly
This happens only when the corresponding commits are not exported in
the current fast-export run. This can happen either when the relevant
commit is already marked, or when the commit is explicitly marked
as UNINTERESTING with a negative ref by another argument.

This breaks fast-export basec remote helpers.

Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
2015-04-22 20:54:05 +01:00
Johannes Schindelin
99b8a4c6d2 Handle new t1501 test case properly with MinGW
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-22 20:54:03 +01:00
Johannes Schindelin
16685c2d7a Start the merging-rebase to v2.3.6
This commit starts the rebase of 0eff6b5 to 8e73045
2015-04-22 20:48:51 +01:00
dscho
027ca35366 Merge pull request #104 from dscho/super-config
Add support for %PROGRAMDATA%\Git\config
2015-04-22 21:42:17 +02:00
Johannes Schindelin
c963b8eef6 Document the Windows-wide config file
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-22 14:54:58 +01:00
Johannes Schindelin
255007634f Windows: use %PROGRAMDATA%\Git\config as Windows-wide configuration
Between the libgit2 and the Git for Windows project, there has been a
discussion how we could share Git configuration to avoid duplication (or
worse: skew).

Earlier, libgit2 was nice enough to just re-use Git for Windows'

	C:\Program Files (x86)\Git\etc\gitconfig

but with the upcoming Git for Windows 2.x, there would be more paths to
search, as we will have 64-bit and 32-bit versions, and the
corresponding config files will be in %PROGRAMFILES%\Git\mingw64\etc and
...\mingw32\etc, respectively.

Therefore we came to a consensus to use %PROGRAMDATA%\Git as the
location for Git-specific files that are of wider interest than just Git
for Windows.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-22 14:47:27 +01:00
dscho
7cee1210cf Merge pull request #60 from weakcamel/fscanf-64bit-constants
Correct fscanf formatting string for I64u values

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-22 13:23:04 +01:00
Waldek Maleska
1931c84a9e Correct fscanf formatting string for I64u values
Signed-off-by: Waldek Maleska <w.maleska@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-22 13:17:19 +01:00
dscho
14f6c21f88 Merge pull request #102 from kb/msys-tty
Better MSys PTY detection

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-22 13:03:51 +01:00
Johannes Schindelin
ba20c83cfc squash! Revert "mingw: Work around MSVCRT's isatty() not knowing about MSys2"
Replace commit subject with:

fixup! mingw: Work around MSVCRT's isatty() not knowing about MSys2

to remind myself to drop that patch.
2015-04-22 09:27:02 +01:00
Johannes Schindelin
ce5ca1f9bb fixup! mingw: make isatty() recognize MSys pseudo terminals (/dev/pty*) 2015-04-22 09:26:24 +01:00
Junio C Hamano
ba63bfaa59 Git 2.3.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v2.3.6
2015-04-21 12:17:09 -07:00
Junio C Hamano
d544696afa Merge branch 'jk/colors' into maint
"diff-highlight" (in contrib/) used to show byte-by-byte
differences, which meant that multi-byte characters can be chopped
in the middle.  It learned to pay attention to character boundaries
(assuming the UTF-8 payload).

* jk/colors:
  diff-highlight: do not split multibyte characters
2015-04-21 12:12:25 -07:00
Junio C Hamano
d3115a35fc Merge branch 'jk/test-annoyances' into maint
Test fixes.

* jk/test-annoyances:
  t5551: make EXPENSIVE test cheaper
  t5541: move run_with_cmdline_limit to test-lib.sh
  t: pass GIT_TRACE through Apache
  t: redirect stderr GIT_TRACE to descriptor 4
  t: translate SIGINT to an exit
2015-04-21 12:12:24 -07:00
Junio C Hamano
42b2f894a0 Merge branch 'pt/enter-repo-comment-fix' into maint
Documentation update.

* pt/enter-repo-comment-fix:
  enter_repo(): fix docs to match code
2015-04-21 12:12:23 -07:00
Junio C Hamano
1c30f8efa4 Merge branch 'jz/gitweb-conf-doc-fix' into maint
Documentation update.

* jz/gitweb-conf-doc-fix:
  gitweb.conf.txt: say "build-time", not "built-time"
2015-04-21 12:12:22 -07:00
Junio C Hamano
c809f4258f Merge branch 'jk/cherry-pick-docfix' into maint
* jk/cherry-pick-docfix:
  cherry-pick: fix docs describing handling of empty commits
2015-04-21 12:12:21 -07:00
Junio C Hamano
c84364abe3 Merge branch 'iu/fix-parse-options-h-comment' into maint
* iu/fix-parse-options-h-comment:
  parse-options.h: OPTION_{BIT,SET_INT} do not store pointer to defval
2015-04-21 12:12:20 -07:00
Junio C Hamano
e8281f0164 Merge branch 'jg/cguide-we-cannot-count' into maint
* jg/cguide-we-cannot-count:
  CodingGuidelines: update 'rough' rule count
2015-04-21 12:12:19 -07:00
Junio C Hamano
2e0aabe602 Merge branch 'jk/pack-corruption-post-mortem' into maint
Documentation update.

* jk/pack-corruption-post-mortem:
  howto: document more tools for recovery corruption
2015-04-21 12:12:18 -07:00
Junio C Hamano
e9ab76da8f Merge branch 'jn/doc-fast-import-no-16-octopus-limit' into maint
Documentation update.

* jn/doc-fast-import-no-16-octopus-limit:
  fast-import doc: remove suggested 16-parent limit
2015-04-21 12:12:17 -07:00
Karsten Blees
7d57fb4511 mingw: make isatty() recognize MSys pseudo terminals (/dev/pty*)
MSys2 emulates pseudo terminals via named pipes, and isatty() returns 0
for such file descriptors. Therefore, some interactive functionality (such
as launching a pager, asking if a failed unlink should be repeated etc.)
doesn't work when run in a terminal emulator that uses MSys ptys (such as
mintty).

However, MSys uses special names for its pty pipes ('msys-*-pty*'), which
allows us to distinguish them from normal piped input / output.

On startup, check if stdin / stdout / stderr are connected to such pipes
using the NtQueryObject API from NTDll.dll. If the names match, adjust the
flags in MSVCRT's ioinfo structure accordingly.

Signed-off-by: Karsten Blees <blees@dcon.de>
2015-04-20 19:24:29 +02:00
Johannes Schindelin
22a888ee66 Revert "mingw: Work around MSVCRT's isatty() not knowing about MSys2"
This reverts commit 04cde2429a.

The MSYS_TTY_HANDLES trick doesn't work in a second shell window.

Additionally, #undef'ing 'isatty()' at the top of mingw.c breaks yes / no
questions (ask_yes_no_if_possible()) and probably other uses of isatty()
in mingw.c.

Signed-off-by: Karsten Blees <blees@dcon.de>
2015-04-20 18:51:52 +02:00
dscho
ca15bb6c0b Merge pull request #98 from nalla/stdout-unbuffered
mingw: explicitly `fflush` stdout
2015-04-16 17:05:50 +02:00
nalla
c1c0e75123 mingw: explicitly fflush stdout
For performance reasons `stdout` is not unbuffered by default. That leads
to problems if after printing to `stdout` a read on `stdin` is performed.

For that reason interactive commands like `git clean -i` do not function
properly anymore if the `stdout` is not flushed by `fflush(stdout)` before
trying to read from `stdin`.

In the case of `git clean -i` all reads on `stdin` were preceded by a
`fflush(stdout)` call.

Signed-off-by: nalla <nalla@hamal.uberspace.de>
2015-04-16 13:09:16 +01:00
dscho
4213cee7a8 Merge pull request #95 from vitalyster/wcsicmp
git-wrapper: case-insensitive path comparison
2015-04-15 15:16:34 +02:00
Vitaly Takmazov
c1904dbee2 git-wrapper: case-insensitive path comparison 2015-04-15 15:18:14 +03:00
dscho
018d3a642c Merge pull request #93 from nalla/asciidoctor-fixes
Asciidoctor fixes
2015-04-15 11:26:09 +02:00
nalla
fa3bbfd839 asciidoctor: Fix giteveryday.txt to be built with asciidoctor.
When building the `doc` with `asciidoctor`, `asciidoctor` complains about
a nested code block in a callout list. This is a really dirty solution to
restore the callout list to function properly. There is a minimal visual
sideeffect; the *immitated* codeblock has no overall greyish background.
Instead the individual lines have it.

Note: When building this patch with `asciidoc` the background is totally
gone but the font is still monospaced.

Signed-off-by: nalla <nalla@hamal.uberspace.de>
2015-04-15 08:24:52 +01:00
nalla
1fdff65565 asciidoctor: Fix user-manual to be built by asciidoctor
The `user-manual.txt` ist designed as a `book` but the `Makefile` wants to
build it as an `article`. This seems to be a problem when building the
documentation with `asciidoctor`. Furthermore the parts *Git Glossary*
and *Apendix B* had no subsections which is not allowed when building with
`asciidoctor`. So lets add a *dummy* section.

Signed-off-by: nalla <nalla@hamal.uberspace.de>
2015-04-15 07:54:39 +01:00
Julian Gindi
6c3b2afe6f CodingGuidelines: update 'rough' rule count
Changed inaccurate count of "rough rules" from three to the more
generic 'a few'.

Signed-off-by: Julian Gindi <juliangindi@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-04-14 09:50:31 -07:00
Johannes Schindelin
27c85de082 Merge pull request #73 from kblees/kb/environment-fixes
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-10 02:58:19 +01:00
Johannes Schindelin
2f464fb92a fixup! gettext: always use UTF-8 on native Windows
Whoops... style fix.
2015-04-10 02:03:56 +01:00
Johannes Schindelin
9e6ddd0b5f squash! gettext: always use UTF-8 on native Windows
In this developers' setup, HAVE_LIBCHARSET_H is apparently defined, but
we *really* want to override the locale_charset() here.

Reminder: at the next merging rebase, fix the ACP typo as requested by
Karsten.
2015-04-10 00:40:01 +01:00
Karsten Blees
d4e943c8e7 git-wrapper: remove redundant TERM initialization
Remove redundant TERM initialization from git-wrapper in favor of TERM
initialization in git itself.

Signed-off-by: Karsten Blees <blees@dcon.de>
2015-04-09 23:30:29 +01:00
Karsten Blees
a95753b365 mingw: initialize HOME on startup
HOME initialization was historically duplicated in many different places,
including /etc/profile, launch scripts such as git-bash.vbs and gitk.cmd,
and (although slightly broken) in the git-wrapper.

Even unrelated projects such as GitExtensions and TortoiseGit need to
implement the same logic to be able to call git directly.

Initialize HOME in git's own startup code so that we can eventually retire
all the duplicate initialization code.

Signed-off-by: Karsten Blees <blees@dcon.de>
2015-04-09 23:30:23 +01:00
Karsten Blees
0d6d6731a3 mingw: move MSys2 specific environment tweaks to setup_windows_environment
Lets keep the environment initialization and conversion section as lean as
possible and move recently added tweaks to setup_windows_environment().

This fixes the following potential problems:

 * Prevent duplicate TZ variables if both TZ and MSYS2_TZ are set.
 * Some of the higher level x* APIs from wrapper.c require a working
   getenv(), using e.g. xstrdup() during initialization is dangerous.
 * Slashifying the Windows TMP variable may break native Windows programs,
   use POSIX TMPDIR instead.
 * Properly slashify TMPDIR even if it is already set, and also if we only
   have TEMP, but not TMP.
 * Reduce complexity from O(n) to O(log n).

Signed-off-by: Karsten Blees <blees@dcon.de>
2015-04-09 23:30:17 +01:00
Karsten Blees
e678595d67 mingw: factor out Windows specific environment setup
Signed-off-by: Karsten Blees <blees@dcon.de>
2015-04-09 23:30:05 +01:00
Karsten Blees
d6271ce991 git-wrapper: fix HOME initialization
git-wrapper fails to initialize HOME correctly if $HOMEDRIVE$HOMEPATH
points to a disconnected network drive.

Check if the directory exists before using $HOMEDRIVE$HOMEPATH.

Signed-off-by: Karsten Blees <blees@dcon.de>
2015-04-09 23:29:52 +01:00
dscho
d8467171eb Merge pull request #83 from kblees/kb/gettext-encoding
gettext: always use UTF-8 on native Windows
2015-04-09 17:35:30 +02:00
Karsten Blees
d3b9944e10 gettext: always use UTF-8 on native Windows
Git on native Windows exclusively uses UTF-8 for console output (both with
mintty and native console windows). Gettext uses setlocale() to determine
the output encoding for translated text, however, MSVCRT's setlocale()
doesn't support UTF-8. As a result, translated text is encoded in system
encoding (GetAPC()), and non-ASCII chars are mangled in console output.

Use gettext's bind_textdomain_codeset() to force the encoding to UTF-8 on
native Windows.

Signed-off-by: Karsten Blees <blees@dcon.de>
2015-04-09 16:19:56 +01:00
Johannes Schindelin
ebc298daac squash! mingw: HOT FIX: work around environment issues -- again
cURL actually uses "cp" + GetACP():
https://github.com/bagder/curl/blob/aa5808b5/lib/easy.c#L157-L162
2015-04-07 14:48:32 +02:00
Johannes Schindelin
8d76720583 squash! mingw: HOT FIX: work around environment issues -- again
Add the following clarifier with the next merging rebase:

Note: cURL manages to set the variable CHARSET when nedmalloc is *not*
enabled, without causing an access violation. In that case, it sets it
successfully to the value "cp1252" (hence it is our choice, too, cURL may
need it, Git does not).
2015-04-07 14:28:53 +02:00
Johannes Schindelin
5ccd51f85e mingw: HOT FIX: work around environment issues -- again
This developer should really, really have known better. The fact that we
are changing the environment in ways for which the MSVCRT is not
prepared for is bad enough. But then this developer followed the request
to re-enable nedmalloc -- despite the prediction that it would cause an
access violation, predicting it in the same message as the request to
re-enable nedmalloc, no less!

To paper over the issue until the time when this developer finds the
time to re-design the Unicode environment handling from scratch, let's
hope that cURL is the only library we are using that *may* set an
environment variable using MSVCRT's putenv() after we fscked the
environment up.

Note: this commit can serve as no source of pride to anyone, certainly
not yours truly. It is necessary as a quick and pragmatic stop gap,
though, to prevent worse problems.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-07 10:24:55 +01:00