Extend the parser to accept file://server/share/repo in the way that
Windows users expect it to be parsed who are used to referring to file
shares by UNC paths of the form \\server\share\folder.
[jes: tightened check to avoid handling file://C:/some/path as a UNC
path.]
This closes https://github.com/git-for-windows/git/issues/1264.
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Technically, this topic branch would need a little bit more polishing.
However, it consists largely of fixup! commits which will be squashed
into the original `azure-pipelines` branch, anyway. And v2.20.1 is out
already, so the rebase is imminent. So...
There are two things to do, still, before submitting a new iteration of
that patch series:
- We need a better way to encode the text we paste into the XML.
Probably we should extend the test-tool.
- We will also want to replace the perl invocation to retrieve the file
size by a test-tool command.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
A recent update accidentally squelched an error message when the
run_command API failed to run a missing command, which has been
corrected.
* jc/run-command-report-exec-failure-fix:
run-command: report exec failure
"git help -a" did not work well when an overly long alias is
defined, which has been corrected.
* js/help-commands-verbose-by-default-fix:
help -a: handle aliases with long names gracefully
help.h: fix coding style
The new test_oid machinery in the test library requires reading
some information from t/oid-info/hash-info and t/oid-info/oid.
The logic to read from these files in shell uses built-in "read"
command, which leaves CR at the end of these text files when they
are checked out with CRLF line endings, at least when run with bash
shipped with Git for Windows. This results in an unexpected value
in the variable these lines are read into, leading the tests to
fail.
Mark them to be checked out always with the LF line endings.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The oneline notwithstanding, 13374987dd (completion: use _gitcompbuiltin
for format-patch, 2018-11-03) changed also the way send-email options
are completed, by asking the git send-email command itself what options
it offers.
Necessarily, this must fail when built with NO_PERL because send-email
itself is a Perl script. Which means that we need the PERL prerequisite
for the send-email test case in t9902.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
As Unix shell scripting comes at a hefty price on Windows, we have to
see where we can save some time to run the test suite.
Let's skip the chain linting and the bin-wrappers/ redirection on
Windows; this seems to shave of anywhere between 10-30% from the overall
runtime.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Actually, seems like \x1c is never valid in an XML... so let's use the
replacement character for such values.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The t9902 test puts funny characters into its output, like \x1c. Let's
translate them into XML attributes, too.
At some stage, we will just want to add a function to the `test-tool` to
perform this for us, instead of that ugly shell script construct that is
incomplete to begin with.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
It is actually better not to modify (or even truncate) the .out files
because the ci/ scripts want to provide a full output in the log.
So let's just remember the file offset at the beginning of each test
case, and use `cut <offset>-` to use that specifically.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
As we use the common ci/ scripts to build and test on Windows, we now
have to make sure that there are no untracked, unignored files after the
build. That includes the SDK, and the test-cache directory.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Let's really use the common ci/ scripts to build and test on Windows,
meaning that we do not source `ci/lib.sh` ourselves.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
It might be that mkpasswd cannot help speed up the tests on Windows, but
then, it won't hurt.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Ignore failures to mount the network share. It is purely to speed up
recurrent builds, and it is only in effect in non-forked builds, anyway,
so it is in a way optional.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Let's split the Windows phase into multiple, logical tasks so that we
can quickly determine whether the build failed, or the test suite, or
whether there was a problem with initializing the SDK.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
It seems that on some build agents, there might be some transient file
locking issues, so when we cannot delete the trash directory, let's be
gentle and try again five seconds later, and only error out if it still
fails the second time.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Symbolic links are still not quite as easy to use on Windows as on Linux
(for example, on versions older than Windows 10, only administrators can
create symlinks, and on Windows 10 you still need to be in developer
mode for regular users to have permission), but NTFS junctions can give
us a way out.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Let's not decide in the generic ci/ script how many jobs to run in
parallel; it is easy enough to hand that information down via the
`MAKEFLAGS`.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Turns out that there are problems with that approach that are totally
not related to Azure Pipelines, so in order to focus on the latter,
let's skip the test_atexit patches for now.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Turns out that there are problems with that approach that are totally
not related to Azure Pipelines, so in order to focus on the latter,
let's skip the test_atexit patches for now.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Turns out that there are problems with that approach that are totally
not related to Azure Pipelines, so in order to focus on the latter,
let's skip the test_atexit patches for now.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
With NO_PERL, the `git send-email` script errors out with code 128,
mentioning that Git was built without Perl support.
Therefore, when the completion tries to ask for possible completions via
`git send-email --git-completion-helper`, it won't provide what is
necessary for that test case to pass.
So let's mark it with the PERL prerequisite.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The new test_oid machinery in the test library requires reading
some information from t/oid-info/hash-info and t/oid-info/oid.
The shell logic that reads from these files is sensitive to CRLF
line endings, causing a problem when the test suite is run on a
Windows machine that converts LF to CRLF.
Exclude the files in this folder from this conversion.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
With NO_PERL, the `git send-email` script errors out with code 128,
mentioning that Git was built without Perl support.
Therefore, when the completion tries to ask for possible completions via
`git send-email --git-completion-helper`, it won't provide what is
necessary for that test case to pass.
So let's mark it with the PERL prerequisite.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
The test t4256-am-format-flowed.sh requires carefully applying a
patch after ignoring padding whitespace. This breaks if the file
is munged to include CRLF line endings instead of LF.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
The new test_oid machinery in the test library requires reading
some information from t/oid-info/hash-info and t/oid-info/oid.
The shell logic that reads from these files is sensitive to CRLF
line endings, causing a failure when the test suite is run on a
Windows machine that converts LF to CRLF: the test suite fails
with a "bad hash algorithm" message, but does not record any
failed test cases. This caused CI builds to pass because they
fail only after reporting the failed test cases.
Exclude the files in this folder from this conversion.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
In the scripted version, we call `move_to_original_branch`, which
updates `HEAD` to point to the original branch again, after updating
that branch to point at the current commit. This does not require any
worktree update.
In the built-in version, we tried to reuse the `reset_head()` function,
which however does try to update the worktree. Of course, as there are
no changes, no actual worktree updates are performed. However, with an
insanely large repository, even just looking whether we need to write
anything takes a noticeable time. So let's avoid that in the built-in
version, too.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This is what the legacy (scripted) rebase does in
`move_to_original_branch`, and we will need this functionality in the
next commit.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The test t4256-am-format-flowed.sh requires carefully applying a
patch after ignoring padding whitespace. This breaks if the file
is munged to include CRLF line endings instead of LF.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The compiler reports this because show_gitcomp() never actually
returns a value:
"parse-options.c", line 520: warning: Function has no return
statement : show_gitcomp
We could shut the compiler up. But instead let's not bury exit() too
deep. Do the same as internal -h handling, return a special error code
and handle the exit() in parse_options() (and other
parse_options_step() callers) instead.
Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
We take pains to determine the longest command beforehand, so that we
can align the category column after printing the command names.
However, then we re-use that value when printing the aliases. If any
alias name is longer than the longest command name, we consequently try
to add a negative number of spaces (but `mput_char()` does not expect
any negative values and simply decrements until the value is 0, i.e.
it tries to add close to 2**31 spaces).
Let's fix this by adjusting the `longest` variable before printing the
aliases.
This fixes https://github.com/git-for-windows/git/issues/1975.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
In 321fd823 ("run-command: mark path lookup errors with ENOENT",
2018-10-24), we rewrote the logic to execute a command by looking
in the directories on $PATH; as a side effect, a request to run a
command that is not found on $PATH is noticed even before a child
process is forked to execute it.
We however stopped to report an exec failure in such a case by
mistake. Add a logic to report the error unless silent-exec-failure
is requested, to match the original code.
Reported-by: John Passaro <john.a.passaro@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>