OSDN Git Service

git-core/git.git
8 years agot9100: fix breakage when SHELL_PATH is not /bin/sh
Michael J Gruber [Sun, 7 Feb 2016 19:11:37 +0000 (20:11 +0100)]
t9100: fix breakage when SHELL_PATH is not /bin/sh

bcb11f1 (mingw: mark t9100's test cases with appropriate prereqs, 2016-01-27)
replaced "/bin/sh" in exec.sh by the shell specified in SHELL_PATH, but
that breaks the subtest which checks for a specific checksum of a tree
containing.

Revert that change that was not explained in the commit message anyways
(exec.sh is never executed).

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agogitignore: ignore generated test-fake-ssh executable
Johannes Schindelin [Sat, 6 Feb 2016 14:42:49 +0000 (15:42 +0100)]
gitignore: ignore generated test-fake-ssh executable

In "mingw: fix t5601-clone.sh", this developer introduced a new test
executable, test-fake-ssh but forgot to update the .gitignore file
accordingly. Fix that.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agomingw: do not bother to test funny file names
Johannes Schindelin [Wed, 27 Jan 2016 16:20:26 +0000 (17:20 +0100)]
mingw: do not bother to test funny file names

MSYS2 actually allows to create files or directories whose names contain
tabs, newlines or colors, even if plain Win32 API cannot access them.
As we are using an MSYS2 bash to run the tests, such files or
directories are created successfully, but Git itself has no chance to
work with them because it is a regular Windows program, hence limited by
the Win32 API.

With this change, on Windows otherwise failing tests in
t3300-funny-names.sh, t3600-rm.sh, t3703-add-magic-pathspec.sh,
t3902-quoted.sh, t4016-diff-quote.sh, t4135-apply-weird-filenames.sh,
t9200-git-cvsexportcommit.sh, and t9903-bash-prompt.sh are skipped.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agomingw: skip a test in t9130 that cannot pass on Windows
Johannes Schindelin [Wed, 27 Jan 2016 16:20:22 +0000 (17:20 +0100)]
mingw: skip a test in t9130 that cannot pass on Windows

On Windows, Git itself has no clue about POSIX paths, but its shell
scripts do. In this instance, we get mixed paths as a result, and when
comparing the path of the author file, we get a mismatch that is
entirely due to the POSIX path vs Windows path clash.

Let's just skip this test so that t9130-git-svn-authors-file.sh passes
in Git for Windows' SDK.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agomingw: handle the missing POSIXPERM prereq in t9124
Johannes Schindelin [Wed, 27 Jan 2016 16:20:15 +0000 (17:20 +0100)]
mingw: handle the missing POSIXPERM prereq in t9124

On Windows, the permission system works completely differently than
expected by some of the tests. So let's make sure that we do not test
POSIX functionality on Windows.

This lets t9124-git-svn-dcommit-auto-props.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>
8 years agomingw: avoid illegal filename in t9118
Johannes Schindelin [Wed, 27 Jan 2016 16:20:11 +0000 (17:20 +0100)]
mingw: avoid illegal filename in t9118

On Windows' file systems, file names with trailing dots are forbidden.
The POSIX emulation layer used by Git for Windows' Subversion emulates
those file names, therefore the test adding the file would actually
succeed, but when we would ask git.exe (which does not leverage the
POSIX emulation layer) to check out the tree, it would fail.

Let's just guard the test using a filename that is illegal on Windows
by the MINGW prereq.

This lets t9118-git-svn-funky-branch-names.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>
8 years agomingw: mark t9100's test cases with appropriate prereqs
Johannes Schindelin [Wed, 27 Jan 2016 16:20:08 +0000 (17:20 +0100)]
mingw: mark t9100's test cases with appropriate prereqs

Many a test requires either POSIXPERM (to change the executable bit) or
SYMLINKS, and neither are available on Windows.

This lets t9100-git-svn-basic.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>
8 years agot0008: avoid absolute path
Pat Thoyts [Wed, 27 Jan 2016 16:20:03 +0000 (17:20 +0100)]
t0008: avoid absolute path

The colon is used by check-ignore to separate paths from other output
values. If we use an absolute path, however, on Windows it will be
converted into a Windows path that very much contains a colon.

It is actually not at all necessary to make the path of the global
excludes absolute, so let's just not even do that.

Based on suggestions by Karsten Blees and Junio Hamano.

Suggested-by: Karsten Blees <karsten.blees@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agomingw: work around pwd issues in the tests
Johannes Schindelin [Wed, 27 Jan 2016 16:19:59 +0000 (17:19 +0100)]
mingw: work around pwd issues in the tests

In Git for Windows' SDK, the tests are run using a Bash that relies on
the POSIX emulation layer MSYS2 (itself a friendly fork of Cygwin). As
such, paths in tests can be POSIX paths. As soon as those paths are
passed to git.exe (which does *not* use the POSIX emulation layer),
those paths are converted into Windows paths, though. This happens
for command-line parameters, but not when reading, say, config variables.

To help with that, the `pwd` command is overridden to return the Windows
path of the current working directory when testing Git on Windows.

However, when talking to anything using the POSIX emulation layer, it is
really much better to use POSIX paths because Windows paths contain a
colon after the drive letter that will easily be mistaken for the common
separator in path lists.

So let's just use the $PWD variable when the POSIX path is needed.

This lets t7800-difftool.sh, t9400-git-cvsserver-server.sh,
t9402-git-cvsserver-refs.sh and t9401-git-cvsserver-crlf.sh pass in Git
for Windows' SDK.

Note: the cvsserver tests require not only the `cvs` package (install
it into Git for Windows' SDK via `pacman -S cvs`) but also the Perl
SQLite bindings (install them into Git for Windows' SDK via
`cpan DBD::SQLite`).

This patch is based on earlier work by 마누엘 and Karsten Blees.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agomingw: fix t9700's assumption about directory separators
Johannes Schindelin [Wed, 27 Jan 2016 16:19:56 +0000 (17:19 +0100)]
mingw: fix t9700's assumption about directory separators

This test assumed that there is only one directory separator (the
forward slash), not two equivalent directory separators.
However, on Windows, the back slash and the forward slash *are*
equivalent.

Let's paper over this issue by converting the backward slashes to
forward ones in the test that fails with MSYS2 otherwise.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agomingw: skip test in t1508 that fails due to path conversion
Johannes Schindelin [Wed, 27 Jan 2016 16:19:52 +0000 (17:19 +0100)]
mingw: skip test in t1508 that fails due to path conversion

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>
8 years agotests: turn off git-daemon tests if FIFOs are not available
Johannes Schindelin [Wed, 27 Jan 2016 16:19:48 +0000 (17:19 +0100)]
tests: turn off git-daemon tests if FIFOs are not available

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>
8 years agomingw: disable mkfifo-based tests
Johannes Schindelin [Wed, 27 Jan 2016 16:19:43 +0000 (17:19 +0100)]
mingw: disable mkfifo-based tests

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>
8 years agomingw: accomodate t0060-path-utils for MSYS2
Johannes Schindelin [Wed, 27 Jan 2016 16:19:40 +0000 (17:19 +0100)]
mingw: accomodate t0060-path-utils for MSYS2

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>
8 years agomingw: fix t5601-clone.sh
Johannes Schindelin [Wed, 27 Jan 2016 16:19:37 +0000 (17:19 +0100)]
mingw: fix t5601-clone.sh

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>
8 years agomingw: let lstat() fail with errno == ENOTDIR when appropriate
Johannes Schindelin [Tue, 26 Jan 2016 14:34:52 +0000 (15:34 +0100)]
mingw: let lstat() fail with errno == ENOTDIR when appropriate

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>
8 years agomingw: try to delete target directory before renaming
마누엘 [Tue, 26 Jan 2016 14:34:47 +0000 (15:34 +0100)]
mingw: try to delete target directory before renaming

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>
8 years agomingw: prepare the TMPDIR environment variable for shell scripts
Johannes Schindelin [Tue, 26 Jan 2016 14:34:43 +0000 (15:34 +0100)]
mingw: prepare the TMPDIR environment variable for shell scripts

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>
8 years agomingw: factor out Windows specific environment setup
Karsten Blees [Tue, 26 Jan 2016 14:34:38 +0000 (15:34 +0100)]
mingw: factor out Windows specific environment setup

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>
8 years agoGit.pm: stop assuming that absolute paths start with a slash
Johannes Schindelin [Tue, 26 Jan 2016 14:34:35 +0000 (15:34 +0100)]
Git.pm: stop assuming that absolute paths start with a slash

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>
8 years agomingw: do not trust MSYS2's MinGW gettext.sh
Johannes Schindelin [Tue, 26 Jan 2016 14:34:30 +0000 (15:34 +0100)]
mingw: do not trust MSYS2's MinGW gettext.sh

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>
8 years agomingw: let's use gettext with MSYS2
Johannes Schindelin [Tue, 26 Jan 2016 14:34:16 +0000 (15:34 +0100)]
mingw: let's use gettext with MSYS2

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>
8 years agomingw: uglify (a, 0) definitions to shut up warnings
Johannes Schindelin [Fri, 15 Jan 2016 13:24:45 +0000 (14:24 +0100)]
mingw: uglify (a, 0) definitions to shut up warnings

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>
8 years agomingw: squash another warning about a cast
Johannes Schindelin [Fri, 15 Jan 2016 13:24:39 +0000 (14:24 +0100)]
mingw: squash another warning about a cast

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>
8 years agomingw: avoid warnings when casting HANDLEs to int
Johannes Schindelin [Fri, 15 Jan 2016 13:24:34 +0000 (14:24 +0100)]
mingw: avoid warnings when casting HANDLEs to int

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>
8 years agomingw: avoid redefining S_* constants
Johannes Schindelin [Fri, 15 Jan 2016 13:24:29 +0000 (14:24 +0100)]
mingw: avoid redefining S_* constants

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>
8 years agocompat/winansi: support compiling with MSys2
Johannes Schindelin [Thu, 14 Jan 2016 16:52:02 +0000 (17:52 +0100)]
compat/winansi: support compiling with MSys2

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>
8 years agocompat/mingw: support MSys2-based MinGW build
Johannes Schindelin [Thu, 14 Jan 2016 16:51:59 +0000 (17:51 +0100)]
compat/mingw: support MSys2-based MinGW build

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>
8 years agonedmalloc: allow compiling with MSys2's compiler
Johannes Schindelin [Thu, 14 Jan 2016 16:51:54 +0000 (17:51 +0100)]
nedmalloc: allow compiling with MSys2's compiler

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>
8 years agoconfig.mak.uname: supporting 64-bit MSys2
Johannes Schindelin [Wed, 13 Jan 2016 13:31:01 +0000 (14:31 +0100)]
config.mak.uname: supporting 64-bit MSys2

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>
8 years agoconfig.mak.uname: support MSys2
Johannes Schindelin [Wed, 13 Jan 2016 13:30:53 +0000 (14:30 +0100)]
config.mak.uname: support MSys2

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>
8 years agoGit 2.7 v2.7.0
Junio C Hamano [Mon, 4 Jan 2016 22:08:04 +0000 (14:08 -0800)]
Git 2.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoSync with 2.6.5
Junio C Hamano [Mon, 4 Jan 2016 22:06:59 +0000 (14:06 -0800)]
Sync with 2.6.5

8 years agoGit 2.6.5 v2.6.5
Junio C Hamano [Mon, 4 Jan 2016 22:06:00 +0000 (14:06 -0800)]
Git 2.6.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'jk/pending-keep-tag-name' into maint
Junio C Hamano [Mon, 4 Jan 2016 22:03:07 +0000 (14:03 -0800)]
Merge branch 'jk/pending-keep-tag-name' into maint

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

8 years agoMerge branch 'jk/symbolic-ref-maint' into maint
Junio C Hamano [Mon, 4 Jan 2016 22:02:58 +0000 (14:02 -0800)]
Merge branch 'jk/symbolic-ref-maint' into maint

"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()

8 years agoMerge branch 'jk/ident-loosen-getpwuid' into maint
Junio C Hamano [Mon, 4 Jan 2016 22:02:57 +0000 (14:02 -0800)]
Merge branch 'jk/ident-loosen-getpwuid' into maint

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

8 years agoMerge branch 'jk/send-email-ssl-errors' into maint
Junio C Hamano [Mon, 4 Jan 2016 22:02:55 +0000 (14:02 -0800)]
Merge branch 'jk/send-email-ssl-errors' into maint

Improve error reporting when SMTP TLS fails.

* jk/send-email-ssl-errors:
  send-email: enable SSL level 1 debug output

8 years agoMerge branch 'sg/completion-no-column' into maint
Junio C Hamano [Mon, 4 Jan 2016 22:02:45 +0000 (14:02 -0800)]
Merge branch 'sg/completion-no-column' into maint

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

8 years agoMerge tag 'l10n-2.7.0-rnd2+de' of git://github.com/git-l10n/git-po
Junio C Hamano [Sat, 2 Jan 2016 19:31:43 +0000 (11:31 -0800)]
Merge tag 'l10n-2.7.0-rnd2+de' of git://github.com/git-l10n/git-po

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

8 years agol10n: de.po: translate 68 new messages
Ralf Thielow [Tue, 22 Dec 2015 17:08:06 +0000 (18:08 +0100)]
l10n: de.po: translate 68 new messages

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>
8 years agol10n: de.po: improve some translations
Ralf Thielow [Thu, 29 Oct 2015 21:18:32 +0000 (22:18 +0100)]
l10n: de.po: improve some translations

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Phillip Sz <phillip.szelat@gmail.com>
8 years agoGit 2.7-rc3 v2.7.0-rc3
Junio C Hamano [Mon, 28 Dec 2015 22:00:52 +0000 (14:00 -0800)]
Git 2.7-rc3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'sh/p4-multi-depot'
Junio C Hamano [Mon, 28 Dec 2015 21:58:57 +0000 (13:58 -0800)]
Merge branch 'sh/p4-multi-depot'

"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

8 years agoMerge branch 'jk/pending-keep-tag-name'
Junio C Hamano [Mon, 28 Dec 2015 21:58:03 +0000 (13:58 -0800)]
Merge branch 'jk/pending-keep-tag-name'

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

8 years agoMerge branch 'jk/symbolic-ref-maint'
Junio C Hamano [Mon, 28 Dec 2015 21:57:24 +0000 (13:57 -0800)]
Merge branch 'jk/symbolic-ref-maint'

"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()

8 years agoMerge tag 'l10n-2.7.0-rnd2' of git://github.com/git-l10n/git-po
Junio C Hamano [Mon, 28 Dec 2015 21:53:47 +0000 (13:53 -0800)]
Merge tag 'l10n-2.7.0-rnd2' of git://github.com/git-l10n/git-po

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

8 years agol10n: ru.po: update Russian translation
Dimitriy Ryazantcev [Fri, 25 Dec 2015 12:02:48 +0000 (14:02 +0200)]
l10n: ru.po: update Russian translation

Signed-off-by: Dimitriy Ryazantcev <dimitriy.ryazantcev@gmail.com>
8 years agoMerge branch 'master' of git://github.com/alshopov/git-po
Jiang Xin [Mon, 28 Dec 2015 15:13:15 +0000 (23:13 +0800)]
Merge branch 'master' of git://github.com/alshopov/git-po

* 'master' of git://github.com/alshopov/git-po:
  l10n: Updated Bulgarian translation of git (2477t,0f,0u)

8 years agol10n: Updated Bulgarian translation of git (2477t,0f,0u)
Alexander Shopov [Mon, 28 Dec 2015 09:33:41 +0000 (11:33 +0200)]
l10n: Updated Bulgarian translation of git (2477t,0f,0u)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
8 years agol10n: ca.po: update translation
Alex Henrie [Mon, 28 Dec 2015 04:42:59 +0000 (21:42 -0700)]
l10n: ca.po: update translation

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
8 years agol10n: zh_CN: for git v2.7.0 l10n round 2
Jiang Xin [Tue, 22 Dec 2015 15:06:59 +0000 (23:06 +0800)]
l10n: zh_CN: for git v2.7.0 l10n round 2

Update 2 translations (2477t0f0u) for git v2.7.0-rc1.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
8 years agoMerge branch 'master' of git://github.com/nafmo/git-l10n-sv
Jiang Xin [Sat, 26 Dec 2015 13:22:30 +0000 (21:22 +0800)]
Merge branch 'master' of git://github.com/nafmo/git-l10n-sv

* 'master' of git://github.com/nafmo/git-l10n-sv:
  l10n: sv.po: Update Swedish translation (2477t0f0u)
  l10n: sv: Fix bad translation

8 years agol10n: sv.po: Update Swedish translation (2477t0f0u)
Peter Krefting [Sat, 26 Dec 2015 11:27:15 +0000 (12:27 +0100)]
l10n: sv.po: Update Swedish translation (2477t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
8 years agol10n: sv: Fix bad translation
Peter Krefting [Sat, 7 Nov 2015 14:48:20 +0000 (15:48 +0100)]
l10n: sv: Fix bad translation

Found-by: Sebastian Rasmussen <sebras@gmail.com>
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
8 years agol10n: fr.po v2.7.0 round 2 (2477t)
Jean-Noel Avila [Thu, 24 Dec 2015 06:38:22 +0000 (07:38 +0100)]
l10n: fr.po v2.7.0 round 2 (2477t)

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
8 years agoGit 2.7-rc2 v2.7.0-rc2
Junio C Hamano [Tue, 22 Dec 2015 22:46:01 +0000 (14:46 -0800)]
Git 2.7-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'js/emu-write-epipe-on-windows'
Junio C Hamano [Tue, 22 Dec 2015 22:45:16 +0000 (14:45 -0800)]
Merge branch 'js/emu-write-epipe-on-windows'

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

8 years agopush: don't mark options of recurse-submodules for translation
Ralf Thielow [Tue, 22 Dec 2015 17:53:00 +0000 (18:53 +0100)]
push: don't mark options of recurse-submodules for translation

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agol10n: git.pot: v2.7.0 round 2 (2 new, 2 removed)
Jiang Xin [Tue, 22 Dec 2015 14:51:43 +0000 (22:51 +0800)]
l10n: git.pot: v2.7.0 round 2 (2 new, 2 removed)

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>
8 years agoMerge branch 'master' of git://github.com/git-l10n/git-po
Jiang Xin [Tue, 22 Dec 2015 14:50:24 +0000 (22:50 +0800)]
Merge branch 'master' of git://github.com/git-l10n/git-po

* 'master' of git://github.com/git-l10n/git-po:
  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

8 years agot1401: test reflog creation for git-symbolic-ref
Jeff King [Sun, 20 Dec 2015 07:27:23 +0000 (02:27 -0500)]
t1401: test reflog creation for git-symbolic-ref

The current code writes a reflog entry whenever we update a
symbolic ref, but we never test that this is so. Let's add a
test to make sure upcoming refactoring doesn't cause a
regression.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agosymbolic-ref: propagate error code from create_symref()
Jeff King [Sun, 20 Dec 2015 07:27:18 +0000 (02:27 -0500)]
symbolic-ref: propagate error code from create_symref()

If create_symref() fails, git-symbolic-ref will still exit
with code 0, and our caller has no idea that the command did
nothing.

This appears to have been broken since the beginning of time
(e.g., it is not a regression where create_symref() stopped
calling die() or something similar).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agogit-p4: reduce number of server queries for fetches
Sam Hocevar [Sat, 19 Dec 2015 09:39:40 +0000 (09:39 +0000)]
git-p4: reduce number of server queries for fetches

When fetching changes from a depot using a full client spec, there
is no need to perform as many queries as there are top-level paths
in the client spec.  Instead we query all changes in chronological
order, also getting rid of the need to sort the results and remove
duplicates.

Signed-off-by: Sam Hocevar <sam@hocevar.net>
Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agogit-p4: support multiple depot paths in p4 submit
Sam Hocevar [Sat, 19 Dec 2015 09:39:39 +0000 (09:39 +0000)]
git-p4: support multiple depot paths in p4 submit

When submitting from a repository that was cloned using a client spec,
use the full list of paths when ruling out files that are outside the
view.  This fixes a bug where only files pertaining to the first path
would be included in the p4 submit.

Signed-off-by: Sam Hocevar <sam@hocevar.net>
Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoUpdate release notes to 2.7
Junio C Hamano [Mon, 21 Dec 2015 19:08:20 +0000 (11:08 -0800)]
Update release notes to 2.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'bc/format-patch-null-from-line'
Junio C Hamano [Mon, 21 Dec 2015 18:59:07 +0000 (10:59 -0800)]
Merge branch 'bc/format-patch-null-from-line'

"format-patch" has learned a new option to zero-out the commit
object name on the mbox "From " line.

* bc/format-patch-null-from-line:
  format-patch: check that header line has expected format
  format-patch: add an option to suppress commit hash
  sha1_file.c: introduce a null_oid constant

8 years agoMerge branch 'jk/ident-loosen-getpwuid'
Junio C Hamano [Mon, 21 Dec 2015 18:59:07 +0000 (10:59 -0800)]
Merge branch 'jk/ident-loosen-getpwuid'

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

8 years agoMerge branch 'jk/send-email-ssl-errors'
Junio C Hamano [Mon, 21 Dec 2015 18:59:06 +0000 (10:59 -0800)]
Merge branch 'jk/send-email-ssl-errors'

Improve error reporting when SMTP TLS fails.

* jk/send-email-ssl-errors:
  send-email: enable SSL level 1 debug output

8 years agoMerge branch 'sg/completion-no-column'
Junio C Hamano [Mon, 21 Dec 2015 18:59:06 +0000 (10:59 -0800)]
Merge branch 'sg/completion-no-column'

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

8 years agoMerge branch 'mc/push-recurse-submodules-config'
Junio C Hamano [Mon, 21 Dec 2015 18:59:05 +0000 (10:59 -0800)]
Merge branch 'mc/push-recurse-submodules-config'

Add new config to avoid typing "--recurse-submodules" on each push.

* mc/push-recurse-submodules-config:
  push: follow the "last one wins" convention for --recurse-submodules
  push: test that --recurse-submodules on command line overrides config
  push: add recurseSubmodules config option

8 years agomingw: emulate write(2) that fails with a EPIPE
Johannes Schindelin [Thu, 17 Dec 2015 17:08:15 +0000 (18:08 +0100)]
mingw: emulate write(2) that fails with a EPIPE

On Windows, when writing to a pipe fails, errno is always
EINVAL. However, Git expects it to be EPIPE.

According to the documentation, there are two cases in which write()
triggers EINVAL: the buffer is NULL, or the length is odd but the mode
is 16-bit Unicode (the broken pipe is not mentioned as possible cause).
Git never sets the file mode to anything but binary, therefore we know
that errno should actually be EPIPE if it is EINVAL and the buffer is
not NULL.

See https://msdn.microsoft.com/en-us/library/1570wh78.aspx for more
details.

This works around t5571.11 failing with v2.6.4 on Windows.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge git://ozlabs.org/~paulus/gitk
Junio C Hamano [Mon, 21 Dec 2015 16:56:16 +0000 (08:56 -0800)]
Merge git://ozlabs.org/~paulus/gitk

* git://ozlabs.org/~paulus/gitk:
  gitk: sv.po: Update Swedish translation (311t)
  gitk: Let .bleft.mid widgets 'breathe'
  gitk: Match ttk fonts to gitk fonts
  gitk: Update revision date in Japanese PO file
  gitk: Update "Language:" header
  gitk: Improve translation message
  gitk: Remove unused line
  gitk: Update year
  gitk: Change last translator line
  gitk: Update fuzzy messages
  gitk: Update Japanese translation
  gitk: Fix translation around copyright sign
  gitk: Update Japanese translation
  gitk: Fix wrong translation
  gitk: Translate Japanese catalog
  gitk: Translate more to Japanese catalog
  gitk: Update Japanese message catalog
  gitk: Re-sync line number in Japanese message catalogue
  gitk: Color name update

8 years agol10n: zh_CN: for git v2.7.0 l10n round 1
Jiang Xin [Sun, 15 Nov 2015 23:02:11 +0000 (07:02 +0800)]
l10n: zh_CN: for git v2.7.0 l10n round 1

Update 66 translations (2477t0f0u) for git v2.7.0-rc0.

Reviewed-by: Ray Chen <oldsharp@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
8 years agoMerge branch 'master' of git://github.com/alexhenrie/git-po
Jiang Xin [Sun, 20 Dec 2015 11:32:26 +0000 (19:32 +0800)]
Merge branch 'master' of git://github.com/alexhenrie/git-po

* 'master' of git://github.com/alexhenrie/git-po:
  l10n: ca.po: update translation

8 years agoMerge branch 'fr_v2.7.0' of git://github.com/jnavila/git
Jiang Xin [Sun, 20 Dec 2015 11:31:47 +0000 (19:31 +0800)]
Merge branch 'fr_v2.7.0' of git://github.com/jnavila/git

* 'fr_v2.7.0' of git://github.com/jnavila/git:
  l10n: fr v2.7.0 round 1 (2477t)

8 years agoMerge branch 'master' of git://github.com/alshopov/git-po
Jiang Xin [Sun, 20 Dec 2015 11:30:52 +0000 (19:30 +0800)]
Merge branch 'master' of git://github.com/alshopov/git-po

* 'master' of git://github.com/alshopov/git-po:
  l10n: Updated Bulgarian translation of git (2477t,0f,0u)

8 years agol10n: ca.po: update translation
Alex Henrie [Sat, 19 Dec 2015 06:38:23 +0000 (23:38 -0700)]
l10n: ca.po: update translation

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
8 years agoMerge branch 'ja.po' of https://github.com/qykth-git/gitk
Paul Mackerras [Sat, 19 Dec 2015 02:33:16 +0000 (13:33 +1100)]
Merge branch 'ja.po' of https://github.com/qykth-git/gitk

8 years agoMerge branch 'color-fix' of https://github.com/qykth-git/gitk
Paul Mackerras [Sat, 19 Dec 2015 02:29:35 +0000 (13:29 +1100)]
Merge branch 'color-fix' of https://github.com/qykth-git/gitk

8 years agol10n: fr v2.7.0 round 1 (2477t)
Jean-Noel Avila [Fri, 18 Dec 2015 21:00:37 +0000 (22:00 +0100)]
l10n: fr v2.7.0 round 1 (2477t)

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
8 years agol10n: Updated Bulgarian translation of git (2477t,0f,0u)
Alexander Shopov [Sun, 13 Dec 2015 16:55:45 +0000 (18:55 +0200)]
l10n: Updated Bulgarian translation of git (2477t,0f,0u)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
8 years agol10n: sv.po: Update Swedish translation (2477t0f0u)
Peter Krefting [Fri, 18 Dec 2015 08:09:41 +0000 (09:09 +0100)]
l10n: sv.po: Update Swedish translation (2477t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
8 years agorevision.c: propagate tag names from pending array
Jeff King [Thu, 17 Dec 2015 06:47:07 +0000 (01:47 -0500)]
revision.c: propagate tag names from pending array

When we unwrap a tag to find its commit for a traversal, we
do not propagate the "name" field of the tag in the pending
array (i.e., the ref name the user gave us in the first
place) to the commit (instead, we use an empty string). This
means that "git log --source" will never show the tag-name
for commits we reach through it.

This was broken in 2073949 (traverse_commit_list: support
pending blobs/trees with paths, 2014-10-15). That commit
tried to be careful and avoid propagating the path
information for a tag (which would be nonsensical) to trees
and blobs. But it should not have cut off the "name" field,
which should carry forward to children.

Note that this does mean that the "name" field will carry
forward to blobs and trees, too. Whereas prior to 2073949,
we always gave them an empty string. This is the right thing
to do, but in practice no callers probably use it (since now
we have an explicit separate "path" field, which was the
point of 2073949).

We add tests here not only for the broken case, but also a
basic sanity test of "log --source" in general, which did
not have any coverage in the test suite.

Reported-by: Raymundo <gypark@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'fr/rebase-i-continue-preserve-options'
Junio C Hamano [Wed, 16 Dec 2015 22:42:52 +0000 (14:42 -0800)]
Merge branch 'fr/rebase-i-continue-preserve-options'

"git rebase -i" started with merge strategy options did not
propagate them upon "git rebase --continue".

* fr/rebase-i-continue-preserve-options:
  rebase -i: remember merge options beyond continue actions

8 years agoMerge branch 'maint'
Junio C Hamano [Wed, 16 Dec 2015 22:40:30 +0000 (14:40 -0800)]
Merge branch 'maint'

* maint:
  credential-store: don't pass strerror to die_errno()

8 years agoMerge branch 'sg/lock-file-commit-error' into maint
Junio C Hamano [Wed, 16 Dec 2015 18:27:22 +0000 (10:27 -0800)]
Merge branch 'sg/lock-file-commit-error' into maint

* sg/lock-file-commit-error:
  credential-store: don't pass strerror to die_errno()

8 years agocredential-store: don't pass strerror to die_errno()
SZEDER Gábor [Wed, 16 Dec 2015 11:22:55 +0000 (12:22 +0100)]
credential-store: don't pass strerror to die_errno()

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoformat-patch: check that header line has expected format
brian m. carlson [Tue, 15 Dec 2015 01:52:05 +0000 (01:52 +0000)]
format-patch: check that header line has expected format

The format of the "From " header line is very specific to allow
utilities to detect Git-style patches.  Add a test that the patches
created are in the expected format.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoformat-patch: add an option to suppress commit hash
brian m. carlson [Tue, 15 Dec 2015 01:52:04 +0000 (01:52 +0000)]
format-patch: add an option to suppress commit hash

Oftentimes, patches created by git format-patch will be stored in
version control or compared with diff.  In these cases, two otherwise
identical patches can have different commit hashes, leading to diff
noise.  Teach git format-patch a --zero-commit option that instead
produces an all-zero hash to avoid this diff noise.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoGit 2.7-rc1 v2.7.0-rc1
Junio C Hamano [Tue, 15 Dec 2015 17:47:11 +0000 (09:47 -0800)]
Git 2.7-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoSync with maint
Junio C Hamano [Tue, 15 Dec 2015 17:45:06 +0000 (09:45 -0800)]
Sync with maint

8 years agoUpdate draft release notes to 2.6.5
Junio C Hamano [Tue, 15 Dec 2015 17:43:01 +0000 (09:43 -0800)]
Update draft release notes to 2.6.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'dt/fsck-verify-pack-error' into maint
Junio C Hamano [Tue, 15 Dec 2015 17:42:16 +0000 (09:42 -0800)]
Merge branch 'dt/fsck-verify-pack-error' into maint

The exit code of git-fsck didnot reflect some types of errors found
in packed objects, which has been corrected.

* dt/fsck-verify-pack-error:
  verify_pack: do not ignore return value of verification function

8 years agoMerge branch 'ep/ident-with-getaddrinfo' into maint
Junio C Hamano [Tue, 15 Dec 2015 17:42:01 +0000 (09:42 -0800)]
Merge branch 'ep/ident-with-getaddrinfo' into maint

A fix-up for recent topic.

* ep/ident-with-getaddrinfo:
  ident: fix undefined variable when NO_IPV6 is set
  ident.c: add support for IPv6

8 years agoMerge branch 'ls/p4-keep-empty-commits' into maint
Junio C Hamano [Tue, 15 Dec 2015 17:34:18 +0000 (09:34 -0800)]
Merge branch 'ls/p4-keep-empty-commits' into maint

"git p4" used to import Perforce CLs that touch only paths outside
the client spec as empty commits.  It has been corrected to ignore
them instead, with a new configuration git-p4.keepEmptyCommits as a
backward compatibility knob.

* ls/p4-keep-empty-commits:
  git-p4: add option to keep empty commits

8 years agoMerge branch 'jk/send-email-complete-aliases'
Junio C Hamano [Tue, 15 Dec 2015 17:33:19 +0000 (09:33 -0800)]
Merge branch 'jk/send-email-complete-aliases'

A fix-up for recent topic.

* jk/send-email-complete-aliases:
  completion: fix completing unstuck email alias arguments

8 years agoMerge branch 'ep/ident-with-getaddrinfo'
Junio C Hamano [Tue, 15 Dec 2015 17:33:19 +0000 (09:33 -0800)]
Merge branch 'ep/ident-with-getaddrinfo'

A fix-up for recent topic.

* ep/ident-with-getaddrinfo:
  ident: fix undefined variable when NO_IPV6 is set

8 years agoMerge branch 'jk/prune-mtime' into maint
Junio C Hamano [Tue, 15 Dec 2015 17:27:11 +0000 (09:27 -0800)]
Merge branch 'jk/prune-mtime' into maint

The helper used to iterate over loose object directories to prune
stale objects did not closedir() immediately when it is done with a
directory--a callback such as the one used for "git prune" may want
to do rmdir(), but it would fail on open directory on platforms
such as WinXP.

* jk/prune-mtime:
  prune: close directory earlier during loose-object directory traversal

8 years agoMerge branch 'ls/p4-keep-empty-commits'
Junio C Hamano [Tue, 15 Dec 2015 16:02:18 +0000 (08:02 -0800)]
Merge branch 'ls/p4-keep-empty-commits'

"git p4" used to import Perforce CLs that touch only paths outside
the client spec as empty commits.  It has been corrected to ignore
them instead, with a new configuration git-p4.keepEmptyCommits as a
backward compatibility knob.

* ls/p4-keep-empty-commits:
  git-p4: add option to keep empty commits