git/mingw/j6t.git
8 years agoSkip tests that fail due to incomplete implementations, missing tools...master
Johannes Sixt [Tue, 10 Nov 2015 09:17:08 +0000 (10 10:17 +0100)]
Skip tests that fail due to incomplete implementations, missing tools...

8 years agot5813: avoid creating urls that break on cygwin
Dennis Kaarsemaker [Mon, 9 Nov 2015 17:49:35 +0000 (9 18:49 +0100)]
t5813: avoid creating urls that break on cygwin

When passed an ssh:// url, git strips ssh://host from the url but does
not remove leading slashes from the path. So when this test used
ssh://remote//path/to/pwd, the path accessed by our fake SSH is
//path/to/pwd, which cygwin interprets as a UNC path, causing the test
to fail.

We may want to actually fix this in git itself, making it remove extra
slashes from urls before feeding them to transports or helpers, but
that's for another topic as it could cause regressions.

Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
8 years agoMerge branch 'modernize-t9300' into devel
Johannes Sixt [Tue, 10 Nov 2015 09:14:14 +0000 (10 10:14 +0100)]
Merge branch 'modernize-t9300' into devel

8 years agoMerge branch 'sb/submodule-parallel-update' of git://github.com/gitster/git into...
Johannes Sixt [Tue, 10 Nov 2015 09:13:54 +0000 (10 10:13 +0100)]
Merge branch 'sb/submodule-parallel-update' of git://github.com/gitster/git into devel

8 years agorun-command: detect finished children by closed pipe rather than waitpid
Stefan Beller [Fri, 6 Nov 2015 23:48:57 +0000 (6 15:48 -0800)]
run-command: detect finished children by closed pipe rather than waitpid

Detect if a child stopped working by checking if their stderr pipe
was closed instead of checking their state with waitpid.
As waitpid is not fully working in Windows, this is an approach which
allows for better cross platform operation. (It's less code, too)

Previously we did not close the read pipe of finished children, which we
do now.

The old way missed some messages on an early abort. We just killed the
children and did not bother to look what was left over. With this approach
we'd send a signal to the children and wait for them to close the pipe to
have all the messages (including possible "killed by signal 15" messages).

To have the test suite passing as before, we allow for real graceful
abortion now. In case the user wishes to abort parallel execution
the user needs to provide either the signal used to kill all children
or the children are let run until they finish normally.

Signed-off-by: Stefan Beller <sbeller@google.com>
8 years agoMerge branch 'sb/submodule-parallel-fetch' of git://github.com/gitster/git into devel
Johannes Sixt [Tue, 10 Nov 2015 09:13:07 +0000 (10 10:13 +0100)]
Merge branch 'sb/submodule-parallel-fetch' of git://github.com/gitster/git into devel

# Conflicts:
# run-command.c

8 years agoMerge branch 'jk/prune-mtime' of git://github.com/gitster/git into devel
Johannes Sixt [Tue, 10 Nov 2015 09:12:44 +0000 (10 10:12 +0100)]
Merge branch 'jk/prune-mtime' of git://github.com/gitster/git into devel

8 years agoMerge branch 'rebase-p-first-parent' into devel
Johannes Sixt [Tue, 10 Nov 2015 09:12:27 +0000 (10 10:12 +0100)]
Merge branch 'rebase-p-first-parent' into devel

8 years agoMerge branch 'mingw-send-pack' into devel
Johannes Sixt [Tue, 10 Nov 2015 09:12:15 +0000 (10 10:12 +0100)]
Merge branch 'mingw-send-pack' into devel

# Conflicts:
# compat/mingw.h

8 years agoMerge branch 'misc-long-term-test-fixes' into devel
Johannes Sixt [Tue, 10 Nov 2015 09:11:55 +0000 (10 10:11 +0100)]
Merge branch 'misc-long-term-test-fixes' into devel

8 years agoMerge branch 'misc-patches' into devel
Johannes Sixt [Tue, 10 Nov 2015 09:11:45 +0000 (10 10:11 +0100)]
Merge branch 'misc-patches' into devel

8 years agoMerge branch 'master' of ..\git-gui into devel
Johannes Sixt [Tue, 10 Nov 2015 09:11:22 +0000 (10 10:11 +0100)]
Merge branch 'master' of ..\git-gui into devel

8 years agoMerge branch 'master' of ..\gitk into devel
Johannes Sixt [Tue, 10 Nov 2015 09:11:15 +0000 (10 10:11 +0100)]
Merge branch 'master' of ..\gitk into devel

8 years agoRenaming .gitk-new to .gitk fails if there is already a .gitk.
Johannes Sixt [Wed, 31 Jan 2007 17:04:12 +0000 (31 18:04 +0100)]
Renaming .gitk-new to .gitk fails if there is already a .gitk.

Remove the existing one before renaming.

8 years agorebase -p --first-parent: redo merge by cherry-picking first-parent change
Johannes Sixt [Sun, 16 Jun 2013 13:50:42 +0000 (16 15:50 +0200)]
rebase -p --first-parent: redo merge by cherry-picking first-parent change

When rebase -p had to replay a merge commit, it repeats the merge. But
this has drawbacks:

- When the merge has conflicts, then the rebase stops to request user
  interaction. Conflict resolutions are only carried along as far as they
  have been picked up by the rerere machinery.

- When the merge is evil, i.e., contains changes that are in neither of
  the parents, these changes are not preserved.

- The 'git merge' invocation passes the commit message of the old merge
  commit, but it still obeys the merge.log option. If it is set, the log
  ends up twice in the commit message.

Add option --first-parent to redo the merge by picking the changes that
the merge introduces with respect to the first parent.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
8 years agowe do have libgen.h on MinGW
Johannes Sixt [Fri, 21 Aug 2015 06:08:14 +0000 (21 08:08 +0200)]
we do have libgen.h on MinGW

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
8 years agorevisions --stdin: accept CRLF line terminators
Johannes Sixt [Tue, 11 Aug 2015 08:30:27 +0000 (11 10:30 +0200)]
revisions --stdin: accept CRLF line terminators

On Windows, 'git rebase -i' with rebase.missingCommitsCheck set to
warn or error reports:

   Dropped commits (newer to older):
   'atal: bad revision '410dee56...

The error comes from the git rev-list --stdin invocation in
git-rebase--interactive.sh (function check_todo_list). It is caused by
CRs that end up in the file "$todo".miss, because many tools of the MSYS
toolset force LF to CRLF conversion when files are written via stdout.

To fix the error, permit CRLF line terminations when revisions and
pathspec are read using the --stdin option.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
8 years agoupdate-ref --stdin: skip trailing space
Johannes Sixt [Fri, 29 May 2015 07:45:58 +0000 (29 09:45 +0200)]
update-ref --stdin: skip trailing space

8 years agolog --merge: recognize CHERRY_PICK_HEAD and REVERT_HEAD
Johannes Sixt [Tue, 11 Nov 2014 07:56:58 +0000 (11 08:56 +0100)]
log --merge: recognize CHERRY_PICK_HEAD and REVERT_HEAD

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
8 years agofixup build in msysgit environment.
Johannes Sixt [Wed, 1 Oct 2014 05:33:35 +0000 (1 07:33 +0200)]
fixup build in msysgit environment.

8 years agoMinGW: work around gzip doing LF->CRLF conversion when it writes to a file
Johannes Sixt [Fri, 27 Jun 2014 07:38:29 +0000 (27 09:38 +0200)]
MinGW: work around gzip doing LF->CRLF conversion when it writes to a file

When output of MinGW's gzip goes to a file, it converts from LF to CRLF.
It does not covert when the output goes to a pipe. Therefore, work it
around by inserting a pipe. Fortunately, cat does not convert in a similar
way.

8 years agotest-lib: add support for colors without tput
Erik Faye-Lund [Fri, 14 Sep 2012 16:41:45 +0000 (14 18:41 +0200)]
test-lib: add support for colors without tput

For platforms that does not have tput we can still perform coloring
by manually emitting the ANSI control codes. If tput is missing from
$PATH, install a replacement function.

The exact strings has been dumped from a machine that has tput, by
piping the output of tput through 'od -c -An'.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
8 years agoTreat Windows style paths in daemon_avoid_alias.
Johannes Sixt [Tue, 19 Jan 2010 12:50:35 +0000 (19 13:50 +0100)]
Treat Windows style paths in daemon_avoid_alias.

Without this increased portability, http-backend always dies with code
500 because it mistakes a path beginning with a drive prefix as a relative
path.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
8 years agodump rename retry statistics
Johannes Sixt [Tue, 21 Apr 2009 08:24:09 +0000 (21 10:24 +0200)]
dump rename retry statistics

8 years agoAdd test-fstat.c
Johannes Sixt [Mon, 20 Apr 2009 14:13:09 +0000 (20 16:13 +0200)]
Add test-fstat.c

Compile with

 gcc -o test-fstat.exe test-fstat.c -Wall -Icompat/fnmatch -Icompat/regex \
   -DNO_OPENSSL -DNO_MMAP libgit.a xdiff/lib.a -lz -liconv -lws2_32

8 years agoImplement test-stat, which prints the modification time.
Johannes Sixt [Thu, 22 Jan 2009 10:26:41 +0000 (22 11:26 +0100)]
Implement test-stat, which prints the modification time.

Compile with

   gcc -o test-stat -Wall test-stat.c -DEMULATE
or
   gcc -o test-stat -Wall test-stat.c

8 years agoRevert "Git.pm: Always set Repository to absolute path if autodetecting"
Johannes Sixt [Mon, 25 May 2009 08:34:12 +0000 (25 10:34 +0200)]
Revert "Git.pm: Always set Repository to absolute path if autodetecting"

This reverts commit fe53bbc9bebb853f97f0da3f63f7fca5774e3f95.

Unfortunately, this change breaks MinGW git because the absolute path that
this produces is MSYS-style /c/path/to/repo, but git does not understand
this; it should be c:/path/to/repo. This value is ultimately assigned to
GIT_DIR, but the path name mangling that usually happens when an MSYS
program (like perl) spawns a non-MSYS program (like git) does not happen.

8 years agoTighten error check in improved pager support.
Johannes Sixt [Mon, 22 Feb 2010 08:27:18 +0000 (22 09:27 +0100)]
Tighten error check in improved pager support.

The improved pager support first tries to run the pager command directly,
and if it fails, it tries again as a shell command.

However, previously the retry in a shell was attempted regardless of the
failure condition in the first try. This fixes it to retry only if the
failure was because the command was not found.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
8 years agoWindows: Better support PAGER settings with spaces in the path
Johannes Sixt [Tue, 22 Jul 2008 11:42:58 +0000 (22 13:42 +0200)]
Windows: Better support PAGER settings with spaces in the path

On Windows, the pager was always run via a shell, which is not the case
on Unix, where the shell variant was only used as a fallback.

Thus, setting the pager, for example, like this:

  PAGER="C:/Program Files/msys/bin/less"

would fail; an extra set of quotes is needed:

  PAGER="\"C:/Program Files/msys/bin/less\""

With this patch the former setting works as well.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
8 years agoAvoid Windows's sort by using the full path of /usr/bin/sort.
Johannes Sixt [Mon, 8 Jan 2007 17:15:58 +0000 (8 18:15 +0100)]
Avoid Windows's sort by using the full path of /usr/bin/sort.

8 years agot3903-stash: Work around a racily-clean index that is not detected.
Johannes Sixt [Fri, 7 Nov 2008 12:52:12 +0000 (7 13:52 +0100)]
t3903-stash: Work around a racily-clean index that is not detected.

We still have the problem that sometimes the time returned by stat() is off
by a second into the past. As a consequence, git cannot detect when a file
was modified such that only the content changed but no other aspect of the
meta-data that stat() retrieves. So we artificially delay the modification
so that at least the timestamp is different from the one recorded in the
index.

8 years agotests: overwrite bytes in files using a perl script instead of dd
Johannes Sixt [Fri, 21 Aug 2015 07:00:38 +0000 (21 09:00 +0200)]
tests: overwrite bytes in files using a perl script instead of dd

The dd in my build environment on Windows crashes unpredictably. Work it
around by rewriting most instances with a helper function that uses perl
behind the scenes.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
8 years agot3404: fix test cases under -x
Johannes Sixt [Tue, 11 Aug 2015 08:31:13 +0000 (11 10:31 +0200)]
t3404: fix test cases under -x

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
8 years agot5601-clone: remove broken and pointless check for plink.exe
Johannes Sixt [Tue, 11 Aug 2015 20:51:50 +0000 (11 22:51 +0200)]
t5601-clone: remove broken and pointless check for plink.exe

Invoking plink requires special treatment, and we have support and even
test cases for the commands 'plink' and 'tortoiseplink'. We also support
.exe variants for these two and there is a test for 'plink.exe'.

On Windows, however, where support for plink.exe would be relevant, the
test case fails because it is not possible to execute a file with a .exe
extension that is actually not a binary executable---it is a shell
script in our test. We have to disable the test case on Windows.

Considering, that 'plink.exe' is irrelevant on non-Windows, let's just
remove the test and assume that the code "just works".

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agot7001: drop -P to allow tests to pass with old GNU cp
Johannes Sixt [Wed, 23 Apr 2014 07:38:00 +0000 (23 09:38 +0200)]
t7001: drop -P to allow tests to pass with old GNU cp

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
8 years agoMore annotate tests to fix.
Johannes Sixt [Thu, 12 Sep 2013 07:21:20 +0000 (12 09:21 +0200)]
More annotate tests to fix.

8 years agot3032 - make compatible with systems using \r\n as a line ending
Mark Levedahl [Tue, 16 Jul 2013 20:32:49 +0000 (16 16:32 -0400)]
t3032 - make compatible with systems using \r\n as a line ending

Subtests 6, 7, and 9 rely test that merge-recursive correctly
ignores whitespace when so directed. These tests create and test for
lines ending in \r\n, but as this is a valid line separator on Windows,
convert such lines in the output to avoid confusion by line-oriented
grep.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
8 years agot800[12]: work around MSys limitation
Karsten Blees [Tue, 10 Sep 2013 18:50:19 +0000 (10 13:50 -0500)]
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>
8 years agocriss cross rename failure workaround
Johannes Sixt [Wed, 16 Sep 2009 14:06:53 +0000 (16 16:06 +0200)]
criss cross rename failure workaround

8 years agot5510: skip rsync tests by checking a prerequisite
Johannes Sixt [Tue, 16 Jun 2009 07:09:32 +0000 (16 09:09 +0200)]
t5510: skip rsync tests by checking a prerequisite

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
8 years agoWIP modernize t9300: move test preparations into test_expect_success TODO more of it
Johannes Sixt [Fri, 7 Aug 2015 13:43:34 +0000 (7 15:43 +0200)]
WIP modernize t9300: move test preparations into test_expect_success TODO more of it

Our usual style these days is to execute everything inside
test_expect_success. Make it so.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
8 years agomodernize t9300: use test_when_finished for clean-up
Johannes Sixt [Fri, 7 Aug 2015 12:33:44 +0000 (7 14:33 +0200)]
modernize t9300: use test_when_finished for clean-up

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
8 years agomodernize t9300: &&-chain a command sequence
Johannes Sixt [Fri, 7 Aug 2015 12:24:10 +0000 (7 14:24 +0200)]
modernize t9300: &&-chain a command sequence

The purpose of this change is to reduce the diff -b output when this
command sequence that is currently outside test_expect_success is moved
into test_expect_success in a later change.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
8 years agomodernize t9300: wrap lines after && and indent a sub-shell
Johannes Sixt [Fri, 7 Aug 2015 12:19:03 +0000 (7 14:19 +0200)]
modernize t9300: wrap lines after && and indent a sub-shell

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
8 years agomodernize t9300: use test_must_be_empty
Johannes Sixt [Thu, 6 Aug 2015 20:22:00 +0000 (6 22:22 +0200)]
modernize t9300: use test_must_be_empty

Instead of comparing actual output to an empty file, use
test_must_be_empty. In addition to the better error message provided by
the helper, allocation of an empty file during the setup sequence can be
avoided.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
8 years agomodernize t9300: use test_must_fail
Johannes Sixt [Thu, 6 Aug 2015 20:11:40 +0000 (6 22:11 +0200)]
modernize t9300: use test_must_fail

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
8 years agomodernize t9300: single-quote placement and indentation
Johannes Sixt [Thu, 6 Aug 2015 19:48:27 +0000 (6 21:48 +0200)]
modernize t9300: single-quote placement and indentation

8 years agoEleventh batch for 2.7
Junio C Hamano [Thu, 5 Nov 2015 23:26:08 +0000 (5 15:26 -0800)]
Eleventh batch for 2.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'ea/checkout-progress'
Junio C Hamano [Thu, 5 Nov 2015 23:24:28 +0000 (5 15:24 -0800)]
Merge branch 'ea/checkout-progress'

"git checkout" did not follow the usual "--[no-]progress"
convention and implemented only "--quiet" that is essentially
a superset of "--no-progress".  Extend the command to support the
usual "--[no-]progress".

* ea/checkout-progress:
  checkout: add --progress option

8 years agoMerge branch 'dt/http-range'
Junio C Hamano [Thu, 5 Nov 2015 23:24:27 +0000 (5 15:24 -0800)]
Merge branch 'dt/http-range'

A Range: request can be responded with a full response and when
asked properly libcurl knows how to strip the result down to the
requested range.  However, we were hand-crafting a range request
and it did not kick in.

* dt/http-range:
  http: use off_t to store partial file size
  http.c: use CURLOPT_RANGE for range requests

8 years agoclone: allow an explicit argument for parallel submodule clones
Stefan Beller [Wed, 28 Oct 2015 23:21:44 +0000 (28 16:21 -0700)]
clone: allow an explicit argument for parallel submodule clones

Just pass it along to "git submodule update", which may pick reasonable
defaults if you don't specify an explicit number.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agosubmodule update: expose parallelism to the user
Stefan Beller [Wed, 28 Oct 2015 23:21:43 +0000 (28 16:21 -0700)]
submodule update: expose parallelism to the user

Expose possible parallelism either via the "--jobs" CLI parameter or
the "submodule.jobs" setting.

By having the variable initialized to -1, we make sure 0 can be passed
into the parallel processing machine, which will then pick as many parallel
workers as there are CPUs.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agogit submodule update: have a dedicated helper for cloning
Stefan Beller [Wed, 28 Oct 2015 23:21:42 +0000 (28 16:21 -0700)]
git submodule update: have a dedicated helper for cloning

This introduces a new helper function in git submodule--helper
which takes care of cloning all submodules, which we want to
parallelize eventually.

Some tests (such as empty URL, update_mode=none) are required in the
helper to make the decision for cloning. These checks have been
moved into the C function as well (no need to repeat them in the
shell script).

As we can only access the stderr channel from within the parallel
processing engine, we need to reroute the error message for
specified but initialized submodules to stderr. As it is an error
message, this should have gone to stderr in the first place, so it
is a bug fix along the way.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agofetching submodules: respect `submodule.jobs` config option
Stefan Beller [Wed, 28 Oct 2015 23:21:41 +0000 (28 16:21 -0700)]
fetching submodules: respect `submodule.jobs` config option

This allows to configure fetching and updating in parallel
without having the command line option.

This moved the responsibility to determine how many parallel processes
to start from builtin/fetch to submodule.c as we need a way to communicate
"The user did not specify the number of parallel processes in the command
line options" in the builtin fetch. The submodule code takes care of
the precedence (CLI > config > default)

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agosubmodule config: update parse_config()
Stefan Beller [Wed, 28 Oct 2015 23:21:40 +0000 (28 16:21 -0700)]
submodule config: update parse_config()

This rewrites parse_config to distinguish between configs specific to
one submodule and configs which apply generically to all submodules.
We do not have generic submodule configs yet, but the next patch will
introduce "submodule.jobs".

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agosubmodule config: remove name_and_item_from_var
Stefan Beller [Wed, 28 Oct 2015 23:21:39 +0000 (28 16:21 -0700)]
submodule config: remove name_and_item_from_var

By inlining `name_and_item_from_var` it is easy to add later options
which are not required to have a submodule name.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agosubmodule config: keep update strategy around
Stefan Beller [Wed, 28 Oct 2015 23:21:38 +0000 (28 16:21 -0700)]
submodule config: keep update strategy around

We need the submodule update strategies in a later patch.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agorun_processes_parallel: add output to tracing messages
Stefan Beller [Wed, 28 Oct 2015 23:21:37 +0000 (28 16:21 -0700)]
run_processes_parallel: add output to tracing messages

This commit serves 2 purposes. First this may help the user who
tries to diagnose intermixed process calls. Second this may be used
in a later patch for testing. As the output of a command should not
change visibly except for going faster, grepping for the trace output
seems like a viable testing strategy.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'rs/daemon-plug-child-leak' into sb/submodule-parallel-update
Junio C Hamano [Thu, 5 Nov 2015 22:06:47 +0000 (5 14:06 -0800)]
Merge branch 'rs/daemon-plug-child-leak' into sb/submodule-parallel-update

* rs/daemon-plug-child-leak:
  daemon: plug memory leak
  run-command: factor out child_process_clear()

8 years agoMerge branch 'sb/submodule-parallel-fetch' into sb/submodule-parallel-update
Junio C Hamano [Thu, 5 Nov 2015 22:06:14 +0000 (5 14:06 -0800)]
Merge branch 'sb/submodule-parallel-fetch' into sb/submodule-parallel-update

* sb/submodule-parallel-fetch:
  strbuf: update documentation for strbuf_read_once()
  run-command: remove set_nonblocking()
  run-command: fix missing output from late callbacks
  test-run-command: increase test coverage
  test-run-command: test for gracefully aborting
  run-command: initialize the shutdown flag
  run-command: clear leftover state from child_process structure
  run-command: fix early shutdown
  submodules: allow parallel fetching, add tests and documentation
  fetch_populated_submodules: use new parallel job processing
  run-command: add an asynchronous parallel child processor
  sigchain: add command to pop all common signals
  strbuf: add strbuf_read_once to read without blocking
  xread_nonblock: add functionality to read from fds without blocking
  xread: poll on non blocking fds
  submodule.c: write "Fetching submodule <foo>" to stderr

8 years agoSync with 2.6.3
Junio C Hamano [Thu, 5 Nov 2015 20:22:13 +0000 (5 12:22 -0800)]
Sync with 2.6.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoGit 2.6.3
Junio C Hamano [Thu, 5 Nov 2015 20:20:34 +0000 (5 12:20 -0800)]
Git 2.6.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'rs/daemon-plug-child-leak' into maint
Junio C Hamano [Thu, 5 Nov 2015 20:18:16 +0000 (5 12:18 -0800)]
Merge branch 'rs/daemon-plug-child-leak' into maint

"git daemon" uses "run_command()" without "finish_command()", so it
needs to release resources itself, which it forgot to do.

* rs/daemon-plug-child-leak:
  daemon: plug memory leak
  run-command: factor out child_process_clear()

8 years agoMerge branch 'rs/wt-status-detached-branch-fix' into maint
Junio C Hamano [Thu, 5 Nov 2015 20:18:15 +0000 (5 12:18 -0800)]
Merge branch 'rs/wt-status-detached-branch-fix' into maint

"git status --branch --short" accessed beyond the constant string
"HEAD", which has been corrected.

* rs/wt-status-detached-branch-fix:
  wt-status: use skip_prefix() to get rid of magic string length constants
  wt-status: don't skip a magical number of characters blindly
  wt-status: avoid building bogus branch name with detached HEAD
  wt-status: exit early using goto in wt_shortstatus_print_tracking()
  t7060: add test for status --branch on a detached HEAD

8 years agoMerge branch 'jk/initialization-fix-to-add-submodule-odb' into maint
Junio C Hamano [Thu, 5 Nov 2015 20:18:14 +0000 (5 12:18 -0800)]
Merge branch 'jk/initialization-fix-to-add-submodule-odb' into maint

We peek objects from submodule's object store by linking it to the
list of alternate object databases, but the code to do so forgot to
correctly initialize the list.

* jk/initialization-fix-to-add-submodule-odb:
  add_submodule_odb: initialize alt_odb list earlier

8 years agoMerge branch 'js/misc-fixes' into maint
Junio C Hamano [Thu, 5 Nov 2015 20:18:13 +0000 (5 12:18 -0800)]
Merge branch 'js/misc-fixes' into maint

Various compilation fixes and squelching of warnings.

* js/misc-fixes:
  Correct fscanf formatting string for I64u values
  Silence GCC's "cast of pointer to integer of a different size" warning
  Squelch warning about an integer overflow

8 years agoMerge branch 'jc/add-u-A-default-to-top' into maint
Junio C Hamano [Thu, 5 Nov 2015 20:18:12 +0000 (5 12:18 -0800)]
Merge branch 'jc/add-u-A-default-to-top' into maint

"git --literal-pathspecs add -u/-A" without any command line
argument misbehaved ever since Git 2.0.

* jc/add-u-A-default-to-top:
  add: simplify -u/-A without pathspec

8 years agoMerge branch 'jk/delete-modechange-conflict' into maint
Junio C Hamano [Thu, 5 Nov 2015 20:18:11 +0000 (5 12:18 -0800)]
Merge branch 'jk/delete-modechange-conflict' into maint

Merging a branch that removes a path and another that changes the
mode bits on the same path should have conflicted at the path, but
it didn't and silently favoured the removal.

* jk/delete-modechange-conflict:
  merge: detect delete/modechange conflict
  t6031: generalize for recursive and resolve strategies
  t6031: move triple-rename test to t3030

8 years agoMerge branch 'js/imap-send-curl-compilation-fix' into maint
Junio C Hamano [Thu, 5 Nov 2015 20:18:10 +0000 (5 12:18 -0800)]
Merge branch 'js/imap-send-curl-compilation-fix' into maint

"git imap-send" did not compile well with older version of cURL library.

* js/imap-send-curl-compilation-fix:
  imap-send: only use CURLOPT_LOGIN_OPTIONS if it is actually available

8 years agoMerge branch 'rp/link-curl-before-ssl' into maint
Junio C Hamano [Thu, 5 Nov 2015 20:18:08 +0000 (5 12:18 -0800)]
Merge branch 'rp/link-curl-before-ssl' into maint

The linkage order of libraries was wrong in places around libcurl.

* rp/link-curl-before-ssl:
  configure.ac: detect ssl need with libcurl
  Makefile: make curl-config path configurable
  Makefile: link libcurl before zlib

8 years agoMerge branch 'nd/clone-linked-checkout' into maint
Junio C Hamano [Thu, 5 Nov 2015 20:18:07 +0000 (5 12:18 -0800)]
Merge branch 'nd/clone-linked-checkout' into maint

It was not possible to use a repository-lookalike created by "git
worktree add" as a local source of "git clone".

* nd/clone-linked-checkout:
  clone: better error when --reference is a linked checkout
  clone: allow --local from a linked checkout
  enter_repo: allow .git files in strict mode
  enter_repo: avoid duplicating logic, use is_git_directory() instead
  t0002: add test for enter_repo(), non-strict mode
  path.c: delete an extra space

8 years agoMerge branch 'sa/send-email-smtp-batch-data-limit' into maint
Junio C Hamano [Thu, 5 Nov 2015 20:18:06 +0000 (5 12:18 -0800)]
Merge branch 'sa/send-email-smtp-batch-data-limit' into maint

When "git send-email" wanted to talk over Net::SMTP::SSL,
Net::Cmd::datasend() did not like to be fed too many bytes at the
same time and failed to send messages.  Send the payload one line
at a time to work around the problem.

* sa/send-email-smtp-batch-data-limit:
  git-send-email.perl: Fixed sending of many/huge changes/patches

8 years agostrbuf: update documentation for strbuf_read_once()
Stefan Beller [Thu, 5 Nov 2015 18:17:19 +0000 (5 10:17 -0800)]
strbuf: update documentation for strbuf_read_once()

No need to document the O_NONBLOCK. We will read just once and
return.  Even when read(2) blocks, the updated description is
correct.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agorun-command: remove set_nonblocking()
Stefan Beller [Thu, 5 Nov 2015 18:17:18 +0000 (5 10:17 -0800)]
run-command: remove set_nonblocking()

strbuf_read_once can also operate on blocking file descriptors if we
are sure they are ready.  And the poll(2) we call before calling
this ensures that this is the case.

Reading the manual for poll(2), there may be spurious returns
indicating readiness but that is for network sockets only and pipes
should be unaffected.

With this change, we rely on

 - poll(2) returns only non-empty pipes; and
 - read(2) on a non-empty pipe does not block.

This should fix compilation on Windows.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoSync with maint
Junio C Hamano [Wed, 4 Nov 2015 22:21:41 +0000 (4 14:21 -0800)]
Sync with maint

* maint:

8 years agoMerge branch 'xf/user-manual-ff' into maint
Junio C Hamano [Wed, 4 Nov 2015 22:20:49 +0000 (4 14:20 -0800)]
Merge branch 'xf/user-manual-ff' into maint

* xf/user-manual-ff:
  user-manual: fix the description of fast-forward

8 years agoMerge branch 'xf/user-manual-markup' into maint
Junio C Hamano [Wed, 4 Nov 2015 22:20:47 +0000 (4 14:20 -0800)]
Merge branch 'xf/user-manual-markup' into maint

AsciiDoc markup fixes.

* xf/user-manual-markup:
  Documentation: match undefline with the text in old release notes
  Documentation: match underline with the text
  Documentation: fix header markup

8 years agoMerge branch 'jc/everyday-markup' into maint
Junio C Hamano [Wed, 4 Nov 2015 22:20:46 +0000 (4 14:20 -0800)]
Merge branch 'jc/everyday-markup' into maint

AsciiDoc markup fixes.

* jc/everyday-markup:
  Documentation/everyday: match undefline with the text

8 years agoMerge branch 'jc/em-dash-in-doc' into maint
Junio C Hamano [Wed, 4 Nov 2015 22:20:45 +0000 (4 14:20 -0800)]
Merge branch 'jc/em-dash-in-doc' into maint

AsciiDoc markup fixes.

* jc/em-dash-in-doc:
  Documentation: AsciiDoc spells em-dash as double-dashes, not triple

8 years agoMerge branch 'es/worktree-add' into maint
Junio C Hamano [Wed, 4 Nov 2015 22:20:44 +0000 (4 14:20 -0800)]
Merge branch 'es/worktree-add' into maint

* es/worktree-add:
  worktree: usage: denote <branch> as optional with 'add'

8 years agoSync with maint
Junio C Hamano [Tue, 3 Nov 2015 23:41:50 +0000 (3 15:41 -0800)]
Sync with maint

8 years agoMerge branch 'mk/blame-error-message' into maint
Junio C Hamano [Tue, 3 Nov 2015 23:32:42 +0000 (3 15:32 -0800)]
Merge branch 'mk/blame-error-message' into maint

The error message from "git blame --contents --reverse" incorrectly
talked about "--contents --children".

* mk/blame-error-message:
  blame: fix option name in error message

8 years agoMerge branch 'jk/merge-file-exit-code' into maint
Junio C Hamano [Tue, 3 Nov 2015 23:32:41 +0000 (3 15:32 -0800)]
Merge branch 'jk/merge-file-exit-code' into maint

"git merge-file" tried to signal how many conflicts it found, which
obviously would not work well when there are too many of them.

* jk/merge-file-exit-code:
  merge-file: clamp exit code to maximum 127

8 years agoMerge branch 'dt/name-hash-dir-entry-fix' into maint
Junio C Hamano [Tue, 3 Nov 2015 23:32:40 +0000 (3 15:32 -0800)]
Merge branch 'dt/name-hash-dir-entry-fix' into maint

The name-hash subsystem that is used to cope with case insensitive
filesystems keeps track of directories and their on-filesystem
cases for all the paths in the index by holding a pointer to a
randomly chosen cache entry that is inside the directory (for its
ce->ce_name component).  This pointer was not updated even when the
cache entry was removed from the index, leading to use after free.
This was fixed by recording the path for each directory instead of
borrowing cache entries and restructuring the API somewhat.

* dt/name-hash-dir-entry-fix:
  name-hash: don't reuse cache_entry in dir_entry

8 years agoMerge branch 'jc/am-3-fallback-regression-fix' into maint
Junio C Hamano [Tue, 3 Nov 2015 23:32:39 +0000 (3 15:32 -0800)]
Merge branch 'jc/am-3-fallback-regression-fix' into maint

"git am -3" had a small regression where it is aborted in its error
handling codepath when underlying merge-recursive failed in certain
ways, as it assumed that the internal call to merge-recursive will
never die, which is not the case (yet).

* jc/am-3-fallback-regression-fix:
  am -3: do not let failed merge from completing the error codepath

8 years agoMerge branch 'jc/usage-stdin' into maint
Junio C Hamano [Tue, 3 Nov 2015 23:32:38 +0000 (3 15:32 -0800)]
Merge branch 'jc/usage-stdin' into maint

The synopsis text and the usage string of subcommands that read
list of things from the standard input are often shown as if they
only take input from a file on a filesystem, which was misleading.

* jc/usage-stdin:
  usage: do not insist that standard input must come from a file

8 years agoMerge branch 'rt/placeholder-in-usage' into maint
Junio C Hamano [Tue, 3 Nov 2015 23:32:37 +0000 (3 15:32 -0800)]
Merge branch 'rt/placeholder-in-usage' into maint

A couple of commands still showed "[options]" in their usage string
to note where options should come on their command line, but we
spell that "[<options>]" in most places these days.

* rt/placeholder-in-usage:
  am, credential-cache: add angle brackets to usage string

8 years agoMerge branch 'dt/t7063-fix-flaky-test' into maint
Junio C Hamano [Tue, 3 Nov 2015 23:32:36 +0000 (3 15:32 -0800)]
Merge branch 'dt/t7063-fix-flaky-test' into maint

* dt/t7063-fix-flaky-test:
  t7063: fix flaky untracked-cache test

8 years agoMerge branch 'mk/submodule-gitdir-path' into maint
Junio C Hamano [Tue, 3 Nov 2015 23:32:34 +0000 (3 15:32 -0800)]
Merge branch 'mk/submodule-gitdir-path' into maint

The submodule code has been taught to work better with separate
work trees created via "git worktree add".

* mk/submodule-gitdir-path:
  path: implement common_dir handling in git_pathdup_submodule()
  submodule refactor: use strbuf_git_path_submodule() in add_submodule_odb()

8 years agoMerge branch 'nd/gc-auto-background-fix' into maint
Junio C Hamano [Tue, 3 Nov 2015 23:32:33 +0000 (3 15:32 -0800)]
Merge branch 'nd/gc-auto-background-fix' into maint

When "git gc --auto" is backgrounded, its diagnosis message is
lost.  Save it to a file in $GIT_DIR and show it next time the "gc
--auto" is run.

* nd/gc-auto-background-fix:
  gc: save log from daemonized gc --auto and print it next time

8 years agoMerge branch 'ls/p4-translation-failure' into maint
Junio C Hamano [Tue, 3 Nov 2015 23:32:31 +0000 (3 15:32 -0800)]
Merge branch 'ls/p4-translation-failure' into maint

Work around "git p4" failing when the P4 depot records the contents
in UTF-16 without UTF-16 BOM.

* ls/p4-translation-failure:
  git-p4: handle "Translation of file content failed"
  git-p4: add test case for "Translation of file content failed" error

8 years agoMerge branch 'gr/rebase-i-drop-warn' into maint
Junio C Hamano [Tue, 3 Nov 2015 23:32:30 +0000 (3 15:32 -0800)]
Merge branch 'gr/rebase-i-drop-warn' into maint

Recent update to "rebase -i" that tries to sanity check the edited
insn sheet before it uses it has become too picky on Windows where
CRLF left by the editor is turned into a trailing CR on the line
read via the "read" built-in command.

* gr/rebase-i-drop-warn:
  rebase-i: work around Windows CRLF line endings
  t3404: "rebase -i" gets broken when insn sheet uses CR/LF line endings

8 years agoMerge branch 'js/clone-dissociate' into maint
Junio C Hamano [Tue, 3 Nov 2015 23:32:28 +0000 (3 15:32 -0800)]
Merge branch 'js/clone-dissociate' into maint

"git clone --dissociate" runs a big "git repack" process at the
end, and it helps to close file descriptors that are open on the
packs and their idx files before doing so on filesystems that
cannot remove a file that is still open.

* js/clone-dissociate:
  clone --dissociate: avoid locking pack files
  sha1_file.c: add a function to release all packs
  sha1_file: consolidate code to close a pack's file descriptor
  t5700: demonstrate a Windows file locking issue with `git clone --dissociate`

8 years agoMerge branch 'ld/p4-import-labels' into maint
Junio C Hamano [Tue, 3 Nov 2015 23:32:27 +0000 (3 15:32 -0800)]
Merge branch 'ld/p4-import-labels' into maint

Correct "git p4 --detect-labels" so that it does not fail to create
a tag that points at a commit that is also being imported.

* ld/p4-import-labels:
  git-p4: fix P4 label import for unprocessed commits
  git-p4: do not terminate creating tag for unknown commit
  git-p4: failing test for ignoring invalid p4 labels

8 years agoMerge branch 'tk/stripspace' into maint
Junio C Hamano [Tue, 3 Nov 2015 23:32:26 +0000 (3 15:32 -0800)]
Merge branch 'tk/stripspace' into maint

The internal stripspace() function has been moved to where it
logically belongs to, i.e. strbuf API, and the command line parser
of "git stripspace" has been updated to use the parse_options API.

* tk/stripspace:
  stripspace: use parse-options for command-line parsing
  strbuf: make stripspace() part of strbuf

8 years agoMerge branch 'jk/repository-extension' into maint
Junio C Hamano [Tue, 3 Nov 2015 23:32:25 +0000 (3 15:32 -0800)]
Merge branch 'jk/repository-extension' into maint

Prepare for Git on-disk repository representation to undergo
backward incompatible changes by introducing a new repository
format version "1", with an extension mechanism.

* jk/repository-extension:
  introduce "preciousObjects" repository extension
  introduce "extensions" form of core.repositoryformatversion

8 years agoTenth batch for 2.7
Junio C Hamano [Tue, 3 Nov 2015 23:18:22 +0000 (3 15:18 -0800)]
Tenth batch for 2.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'rs/daemon-plug-child-leak'
Junio C Hamano [Tue, 3 Nov 2015 23:13:11 +0000 (3 15:13 -0800)]
Merge branch 'rs/daemon-plug-child-leak'

"git daemon" uses "run_command()" without "finish_command()", so it
needs to release resources itself, which it forgot to do.

* rs/daemon-plug-child-leak:
  daemon: plug memory leak
  run-command: factor out child_process_clear()

8 years agoMerge branch 'mk/blame-first-parent'
Junio C Hamano [Tue, 3 Nov 2015 23:13:09 +0000 (3 15:13 -0800)]
Merge branch 'mk/blame-first-parent'

"git blame" learnt to take "--first-parent" and "--reverse" at the
same time when it makes sense.

* mk/blame-first-parent:
  blame: allow blame --reverse --first-parent when it makes sense
  blame: extract find_single_final
  blame: test to describe use of blame --reverse --first-parent

8 years agoMerge branch 'rs/wt-status-detached-branch-fix'
Junio C Hamano [Tue, 3 Nov 2015 23:13:08 +0000 (3 15:13 -0800)]
Merge branch 'rs/wt-status-detached-branch-fix'

"git status --branch --short" accessed beyond the constant string
"HEAD", which has been corrected.

* rs/wt-status-detached-branch-fix:
  wt-status: use skip_prefix() to get rid of magic string length constants
  wt-status: don't skip a magical number of characters blindly
  wt-status: avoid building bogus branch name with detached HEAD
  wt-status: exit early using goto in wt_shortstatus_print_tracking()
  t7060: add test for status --branch on a detached HEAD