summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-01-28mingw: skip test in t1508 that fails due to path conversionLibravatar Johannes Schindelin1-1/+5
In Git for Windows, the MSYS2 POSIX emulation layer used by the Bash converts command-line arguments that looks like they refer to a POSIX path containing a file list (i.e. @<absolute-path>) into a Windows path equivalent when calling non-MSYS2 executables, such as git.exe. Let's just skip the test that uses the parameter `@/at-test` that confuses the MSYS2 runtime. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-28tests: turn off git-daemon tests if FIFOs are not availableLibravatar Johannes Schindelin1-0/+5
The Git daemon tests create a FIFO first thing and will hang if said FIFO is not available. This is a problem with Git for Windows, where `mkfifo` is an MSYS2 program that leverages MSYS2's POSIX emulation layer, but `git-daemon.exe` is a MINGW program that has not the first clue about that POSIX emulation layer and therefore blinks twice when it sees MSYS2's emulated FIFOs and then just stares into space. This lets t5570-git-daemon.sh and t5811-proto-disable-git.sh pass. Signed-off-by: Stepan Kasal <kasal@ucw.cz> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-27mingw: disable mkfifo-based testsLibravatar Johannes Schindelin1-1/+1
MSYS2 (the POSIX emulation layer used by Git for Windows' Bash) actually has a working mkfifo. The only problem is that it is only emulating named pipes through the MSYS2 runtime; The Win32 API has no idea about named pipes, hence the Git executable cannot access those pipes either. The symptom is that Git fails with a '<name>: No such file or directory' because MSYS2 emulates named pipes through special-crafted '.lnk' files. The solution is to tell the test suite explicitly that we cannot use named pipes when we want to test on Windows. This lets t4056-diff-order.sh, t9010-svn-fe.sh and t9300-fast-import.sh pass. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-27mingw: accomodate t0060-path-utils for MSYS2Libravatar Johannes Schindelin1-0/+9
On Windows, there are no POSIX paths, only Windows ones (an absolute Windows path looks like "C:\Program Files\Git\ReleaseNotes.html", under most circumstances, forward slashes are also allowed and synonymous to backslashes). So when a POSIX shell (such as MSYS2's Bash, which is used by Git for Windows to execute all those shell scripts that are part of Git) passes a POSIX path to test-path-utils.exe (which is not POSIX-aware), the path is translated into a Windows path. For example, /etc/profile becomes C:/Program Files/Git/etc/profile. This path translation poses a problem when passing the root directory as parameter to test-path-utils.exe, as it is not well defined whether the translated root directory should end in a slash or not. MSys1 stripped the trailing slash, but MSYS2 does not. Originally, the Git for Windows project patched MSYS2's runtime to accomodate Git's regression test, but we really should do it the other way round. To work with both of MSys1's and MSYS2's behaviors, we simply test what the current system does in the beginning of t0060-path-utils.sh and then adjust the expected longest ancestor length accordingly. It looks quite a bit tricky what we actually do in this patch: first, we adjust the expected length for the trailing slash we did not originally expect (subtracting one). So far, so good. But now comes the part where things work in a surprising way: when the expected length was 0, the prefix to match is the root directory. If the root directory is converted into a path with a trailing slash, however, we know that the logic in longest_ancestor_length() cannot match: to avoid partial matches of the last directory component, it verifies that the character after the matching prefix is a slash (but because the slash was part of the matching prefix, the next character cannot be a slash). So the return value is -1. Alas, this is exactly what the expected length is after subtracting the value of $rootslash! So we skip adding the $rootoff value in that case (and only in that case). Directories other than the root directory are handled fine (as they are specified without a trailing slash, something not possible for the root directory, and MSYS2 converts them into Windows paths that also lack trailing slashes), therefore we do not need any more special handling. Thanks to Ray Donnelly for his patient help with this issue. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-27mingw: fix t5601-clone.shLibravatar Johannes Schindelin3-10/+39
Since baaf233 (connect: improve check for plink to reduce false positives, 2015-04-26), t5601 writes out a `plink.exe` for testing that is actually a shell script. So the assumption that the `.exe` extension implies that the file is *not* a shell script is now wrong. Since there was no love for the idea of allowing `.exe` files to be shell scripts on Windows, let's go the other way round: *make* `plink.exe` a real `.exe`. This fixes t5601-clone.sh in Git for Windows' SDK. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-26mingw: let lstat() fail with errno == ENOTDIR when appropriateLibravatar Johannes Schindelin1-0/+39
POSIX semantics requires lstat() to fail with ENOTDIR when "[a] component of the path prefix names an existing file that is neither a directory nor a symbolic link to a directory". See http://pubs.opengroup.org/onlinepubs/9699919799/functions/lstat.html This behavior is expected by t1404-update-ref-df-conflicts now. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-26mingw: try to delete target directory before renamingLibravatar 마누엘1-1/+6
When the rename() function tries to move a directory it fails if the target directory exists. It should check if it can delete the (possibly empty) target directory and then try again to move the directory. This partially fixes t9100-git-svn-basic.sh. Signed-off-by: 마누엘 <nalla@hamal.uberspace.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-26mingw: prepare the TMPDIR environment variable for shell scriptsLibravatar Johannes Schindelin1-4/+19
When shell scripts access a $TMPDIR variable containing backslashes, they will be mistaken for escape characters. Let's not let that happen by converting them to forward slashes. This partially fixes t7800 with MSYS2. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-26mingw: factor out Windows specific environment setupLibravatar Karsten Blees1-13/+17
We will add more environment-related code to that new function in the next patch. Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-26Git.pm: stop assuming that absolute paths start with a slashLibravatar Johannes Schindelin1-1/+2
On Windows, absolute paths never start with a slash, unless a POSIX emulation layer is used. The latter is the case for MSYS2's Perl that Git for Windows leverages. However, in the tests we also go through plain `git.exe`, which does *not* leverage the POSIX emulation layer, and therefore the paths we pass to Perl may actually be DOS-style paths such as C:/Program Files/Git. So let's just use Perl's own way to test whether a given path is absolute or not instead of home-brewing our own. This patch partially fixes t7800 and t9700 when running in Git for Windows' SDK. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-26mingw: do not trust MSYS2's MinGW gettext.shLibravatar Johannes Schindelin1-0/+1
It does not quite work because it produces DOS line endings which the shell does not like at all. This lets t0200-gettext-basic.sh, t0204-gettext-reencode-sanity.sh, t3406-rebase-message.sh, t3903-stash.sh, t7400-submodule-basic.sh, t7401-submodule-summary.sh, t7406-submodule-update.sh and t7407-submodule-foreach.sh pass in Git for Windows' SDK. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-26mingw: let's use gettext with MSYS2Libravatar Johannes Schindelin1-1/+1
This solves two problems: - we now have proper localisation even on Windows - we sidestep the infamous "BUG: your vsnprintf is broken (returned -1)" message when running "git init" (which otherwise prevents the entire test suite from running) because libintl.h overrides vsnprintf() with libintl_vsnprintf() [*1*] The latter issue is rather crucial, as *no* test passes in Git for Windows without this fix. Footnote *1*: gettext_git=http://git.savannah.gnu.org/cgit/gettext.git $gettext_git/tree/gettext-runtime/intl/libgnuintl.in.h#n380 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-15mingw: uglify (a, 0) definitions to shut up warningsLibravatar Johannes Schindelin2-2/+6
When the result of a (a, 0) expression is not used, MSys2's GCC version finds it necessary to complain with a warning: right-hand operand of comma expression has no effect Let's just pretend to use the 0 value and have a peaceful and quiet life again. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-15mingw: squash another warning about a castLibravatar Johannes Schindelin1-1/+1
MSys2's compiler is correct that casting a "void *" to a "DWORD" loses precision, but in the case of pthread_exit() we know that the value fits into a DWORD. Just like casting handles to DWORDs, let's work around this issue by casting to "intrptr_t" first, and immediately cast to the final type. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-15mingw: avoid warnings when casting HANDLEs to intLibravatar Johannes Schindelin3-5/+9
HANDLE is defined internally as a void *, but in many cases it is actually guaranteed to be a 32-bit integer. In these cases, GCC should not warn about a cast of a pointer to an integer of a different type because we know exactly what we are doing. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-15mingw: avoid redefining S_* constantsLibravatar Johannes Schindelin1-0/+4
When compiling with MSys2's compiler, these constants are already defined. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-14compat/winansi: support compiling with MSys2Libravatar Johannes Schindelin1-0/+2
MSys2 already defines the _CONSOLE_FONT_INFOEX structure. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-14compat/mingw: support MSys2-based MinGW buildLibravatar Johannes Schindelin1-1/+23
The excellent MSys2 project brings a substantially updated MinGW environment including newer GCC versions and new headers. To support compiling Git, let's special-case the new MinGW (tell-tale: the _MINGW64_VERSION_MAJOR constant is defined). Note: this commit only addresses compile failures, not compile warnings (that task is left for a future patch). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-14nedmalloc: allow compiling with MSys2's compilerLibravatar Johannes Schindelin1-0/+4
With MSys2's GCC, `ReadWriteBarrier` is already defined, and FORCEINLINE unfortunately gets defined incorrectly. Let's work around both problems, using the MSys2-specific __MINGW64_VERSION_MAJOR constant to guard the FORCEINLINE definition so as not to affect other platforms. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-13config.mak.uname: supporting 64-bit MSys2Libravatar Johannes Schindelin1-3/+11
This just makes things compile, the test suite needs extra tender loving care in addition to this change. We will address these issues in later commits. While at it, also allow building MSys2 Git (i.e. a Git that uses MSys2's POSIX emulation layer). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-13config.mak.uname: support MSys2Libravatar Johannes Schindelin1-2/+19
For a long time, Git for Windows lagged behind Git's 2.x releases because the Git for Windows developers wanted to let that big jump coincide with a well-needed jump away from MSys to MSys2. To understand why this is such a big issue, it needs to be noted that many parts of Git are not written in portable C, but instead Git relies on a POSIX shell and Perl to be available. To support the scripts, Git for Windows has to ship a minimal POSIX emulation layer with Bash and Perl thrown in, and when the Git for Windows effort started in August 2007, this developer settled on using MSys, a stripped down version of Cygwin. Consequently, the original name of the project was "msysGit" (which, sadly, caused a *lot* of confusion because few Windows users know about MSys, and even less care). To compile the C code of Git for Windows, MSys was used, too: it sports two versions of the GNU C Compiler: one that links implicitly to the POSIX emulation layer, and another one that targets the plain Win32 API (with a few convenience functions thrown in). Git for Windows' executables are built using the latter, and therefore they are really just Win32 programs. To discern executables requiring the POSIX emulation layer from the ones that do not, the latter are called MinGW (Minimal GNU for Windows) when the former are called MSys executables. This reliance on MSys incurred challenges, too, though: some of our changes to the MSys runtime -- necessary to support Git for Windows better -- were not accepted upstream, so we had to maintain our own fork. Also, the MSys runtime was not developed further to support e.g. UTF-8 or 64-bit, and apart from lacking a package management system until much later (when mingw-get was introduced), many packages provided by the MSys/MinGW project lag behind the respective source code versions, in particular Bash and OpenSSL. For a while, the Git for Windows project tried to remedy the situation by trying to build newer versions of those packages, but the situation quickly became untenable, especially with problems like the Heartbleed bug requiring swift action that has nothing to do with developing Git for Windows further. Happily, in the meantime the MSys2 project (https://msys2.github.io/) emerged, and was chosen to be the base of the Git for Windows 2.x. Just like MSys, MSys2 is a stripped down version of Cygwin, but it is actively kept up-to-date with Cygwin's source code. Thereby, it already supports Unicode internally, and it also offers the 64-bit support that we yearned for since the beginning of the Git for Windows project. MSys2 also ported the Pacman package management system from Arch Linux and uses it heavily. This brings the same convenience to which Linux users are used to from `yum` or `apt-get`, and to which MacOSX users are used to from Homebrew or MacPorts, or BSD users from the Ports system, to MSys2: a simple `pacman -Syu` will update all installed packages to the newest versions currently available. MSys2 is also *very* active, typically providing package updates multiple times per week. It still required a two-month effort to bring everything to a state where Git's test suite passes, many more months until the first official Git for Windows 2.x was released, and a couple of patches still await their submission to the respective upstream projects. Yet without MSys2, the modernization of Git for Windows would simply not have happened. This commit lays the ground work to supporting MSys2-based Git builds. Assisted-by: Waldek Maleska <weakcamel@users.github.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-04Git 2.7Libravatar Junio C Hamano2-1/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-04Sync with 2.6.5Libravatar Junio C Hamano2-1/+21
2016-01-04Git 2.6.5Libravatar Junio C Hamano3-2/+22
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-04Merge branch 'jk/pending-keep-tag-name' into maintLibravatar Junio C Hamano2-2/+30
History traversal with "git log --source" that starts with an annotated tag failed to report the tag as "source", due to an old regression in the command line parser back in v2.2 days. * jk/pending-keep-tag-name: revision.c: propagate tag names from pending array
2016-01-04Merge branch 'jk/symbolic-ref-maint' into maintLibravatar Junio C Hamano2-1/+23
"git symbolic-ref" forgot to report a failure with its exit status. * jk/symbolic-ref-maint: t1401: test reflog creation for git-symbolic-ref symbolic-ref: propagate error code from create_symref()
2016-01-04Merge branch 'jk/ident-loosen-getpwuid' into maintLibravatar Junio C Hamano3-24/+40
When getpwuid() on the system returned NULL (e.g. the user is not in the /etc/passwd file or other uid-to-name mappings), the codepath to find who the user is to record it in the reflog barfed and died. Loosen the check in this codepath, which already accepts questionable ident string (e.g. host part of the e-mail address is obviously bogus), and in general when we operate fmt_ident() function in non-strict mode. * jk/ident-loosen-getpwuid: ident: loosen getpwuid error in non-strict mode ident: keep a flag for bogus default_email ident: make xgetpwuid_self() a static local helper
2016-01-04Merge branch 'jk/send-email-ssl-errors' into maintLibravatar Junio C Hamano1-0/+7
Improve error reporting when SMTP TLS fails. * jk/send-email-ssl-errors: send-email: enable SSL level 1 debug output
2016-01-04Merge branch 'sg/completion-no-column' into maintLibravatar Junio C Hamano1-0/+1
The completion script (in contrib/) used to list "git column" (which is not an end-user facing command) as one of the choices * sg/completion-no-column: completion: remove 'git column' from porcelain commands
2016-01-02Merge tag 'l10n-2.7.0-rnd2+de' of git://github.com/git-l10n/git-poLibravatar Junio C Hamano1-1489/+1723
l10n-2.7.0-rnd2+de * tag 'l10n-2.7.0-rnd2+de' of git://github.com/git-l10n/git-po: l10n: de.po: translate 68 new messages l10n: de.po: improve some translations
2015-12-29l10n: de.po: translate 68 new messagesLibravatar Ralf Thielow1-1486/+1720
Translate 68 new messages came from git.pot update in f4f2c8f (l10n: git.pot: v2.7.0 round 1 (66 new, 29 removed)) and 2c0ca05 (l10n: git.pot: v2.7.0 round 2 (2 new, 2 removed)). Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Acked-by: Matthias Rüster <matthias.ruester@gmail.com>
2015-12-29l10n: de.po: improve some translationsLibravatar Ralf Thielow1-3/+3
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Acked-by: Phillip Sz <phillip.szelat@gmail.com>
2015-12-28Git 2.7-rc3Libravatar Junio C Hamano2-1/+12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-28Merge branch 'sh/p4-multi-depot'Libravatar Junio C Hamano2-26/+57
"git p4" when interacting with multiple depots at the same time used to incorrectly drop changes. * sh/p4-multi-depot: git-p4: reduce number of server queries for fetches git-p4: support multiple depot paths in p4 submit git-p4: failing test case for skipping changes with multiple depots
2015-12-28Merge branch 'jk/pending-keep-tag-name'Libravatar Junio C Hamano2-2/+30
History traversal with "git log --source" that starts with an annotated tag failed to report the tag as "source", due to an old regression in the command line parser back in v2.2 days. * jk/pending-keep-tag-name: revision.c: propagate tag names from pending array
2015-12-28Merge branch 'jk/symbolic-ref-maint'Libravatar Junio C Hamano2-1/+23
"git symbolic-ref" forgot to report a failure with its exit status. * jk/symbolic-ref-maint: t1401: test reflog creation for git-symbolic-ref symbolic-ref: propagate error code from create_symref()
2015-12-28Merge tag 'l10n-2.7.0-rnd2' of git://github.com/git-l10n/git-poLibravatar Junio C Hamano8-12723/+14731
l10n-2.7.0-rnd2 * tag 'l10n-2.7.0-rnd2' of git://github.com/git-l10n/git-po: l10n: ru.po: update Russian translation l10n: Updated Bulgarian translation of git (2477t,0f,0u) l10n: ca.po: update translation l10n: zh_CN: for git v2.7.0 l10n round 2 l10n: sv.po: Update Swedish translation (2477t0f0u) l10n: sv: Fix bad translation l10n: fr.po v2.7.0 round 2 (2477t) l10n: git.pot: v2.7.0 round 2 (2 new, 2 removed) l10n: zh_CN: for git v2.7.0 l10n round 1 l10n: ca.po: update translation l10n: fr v2.7.0 round 1 (2477t) l10n: Updated Bulgarian translation of git (2477t,0f,0u) l10n: sv.po: Update Swedish translation (2477t0f0u) l10n: vi.po: Updated translation (2477t) l10n: git.pot: v2.7.0 round 1 (66 new, 29 removed) l10n: fr.po: Fix typo l10n: fr.po: Fix typo
2015-12-28l10n: ru.po: update Russian translationLibravatar Dimitriy Ryazantcev1-1492/+1663
Signed-off-by: Dimitriy Ryazantcev <dimitriy.ryazantcev@gmail.com>
2015-12-28Merge branch 'master' of git://github.com/alshopov/git-poLibravatar Jiang Xin1-120/+119
* 'master' of git://github.com/alshopov/git-po: l10n: Updated Bulgarian translation of git (2477t,0f,0u)
2015-12-28l10n: Updated Bulgarian translation of git (2477t,0f,0u)Libravatar Alexander Shopov1-120/+119
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2015-12-27l10n: ca.po: update translationLibravatar Alex Henrie1-118/+117
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2015-12-26l10n: zh_CN: for git v2.7.0 l10n round 2Libravatar Jiang Xin1-118/+124
Update 2 translations (2477t0f0u) for git v2.7.0-rc1. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2015-12-26Merge branch 'master' of git://github.com/nafmo/git-l10n-svLibravatar Jiang Xin1-120/+125
* 'master' of git://github.com/nafmo/git-l10n-sv: l10n: sv.po: Update Swedish translation (2477t0f0u) l10n: sv: Fix bad translation
2015-12-26l10n: sv.po: Update Swedish translation (2477t0f0u)Libravatar Peter Krefting1-119/+124
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2015-12-26l10n: sv: Fix bad translationLibravatar Peter Krefting1-1/+1
Found-by: Sebastian Rasmussen <sebras@gmail.com> Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2015-12-24l10n: fr.po v2.7.0 round 2 (2477t)Libravatar Jean-Noel Avila1-128/+148
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
2015-12-22Git 2.7-rc2Libravatar Junio C Hamano2-1/+4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-22Merge branch 'js/emu-write-epipe-on-windows'Libravatar Junio C Hamano2-0/+20
The write(2) emulation for Windows learned to set errno to EPIPE when necessary. * js/emu-write-epipe-on-windows: mingw: emulate write(2) that fails with a EPIPE
2015-12-22push: don't mark options of recurse-submodules for translationLibravatar Ralf Thielow1-1/+1
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-22l10n: git.pot: v2.7.0 round 2 (2 new, 2 removed)Libravatar Jiang Xin1-117/+116
Generate po/git.pot from v2.7.0-rc1-44-g1d88dab for git v2.7.0 l10n round 2. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>