Merge branch 'msys2'

This commit is contained in:
Johannes Schindelin
2018-11-15 12:23:43 +01:00
18 changed files with 232 additions and 85 deletions

View File

@@ -287,9 +287,9 @@ docdep_prereqs = \
cmd-list.made $(cmds_txt)
doc.dep : $(docdep_prereqs) $(wildcard *.txt) $(wildcard config/*.txt) build-docdep.perl
$(QUIET_GEN)$(RM) $@+ $@ && \
$(PERL_PATH) ./build-docdep.perl >$@+ $(QUIET_STDERR) && \
mv $@+ $@
$(QUIET_GEN)$(RM) $@.new $@ && \
$(PERL_PATH) ./build-docdep.perl >$@.new $(QUIET_STDERR) && \
mv $@.new $@
-include doc.dep
@@ -325,8 +325,8 @@ mergetools-list.made: ../git-mergetool--lib.sh $(wildcard ../mergetools/*)
date >$@
clean:
$(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7
$(RM) *.texi *.texi+ *.texi++ git.info gitman.info
$(RM) *.xml *.xml.new *.html *.html.new *.1 *.5 *.7
$(RM) *.texi *.texi.new *.texi.new.new git.info gitman.info
$(RM) *.pdf
$(RM) howto-index.txt howto/*.html doc.dep
$(RM) technical/*.html technical/api-index.txt
@@ -335,14 +335,14 @@ clean:
$(RM) manpage-base-url.xsl
$(MAN_HTML): %.html : %.txt asciidoc.conf
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
$(TXT_TO_HTML) -d manpage -o $@+ $< && \
mv $@+ $@
$(QUIET_ASCIIDOC)$(RM) $@.new $@ && \
$(TXT_TO_HTML) -d manpage -o $@.new $< && \
mv $@.new $@
$(OBSOLETE_HTML): %.html : %.txto asciidoc.conf
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
$(TXT_TO_HTML) -o $@+ $< && \
mv $@+ $@
$(QUIET_ASCIIDOC)$(RM) $@.new $@ && \
$(TXT_TO_HTML) -o $@.new $< && \
mv $@.new $@
manpage-base-url.xsl: manpage-base-url.xsl.in
$(QUIET_GEN)sed "s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|" $< > $@
@@ -352,14 +352,14 @@ manpage-base-url.xsl: manpage-base-url.xsl.in
$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
%.xml : %.txt asciidoc.conf
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
$(TXT_TO_XML) -d manpage -o $@+ $< && \
mv $@+ $@
$(QUIET_ASCIIDOC)$(RM) $@.new $@ && \
$(TXT_TO_XML) -d manpage -o $@.new $< && \
mv $@.new $@
user-manual.xml: user-manual.txt user-manual.conf
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
$(TXT_TO_XML) -d book -o $@+ $< && \
mv $@+ $@
$(QUIET_ASCIIDOC)$(RM) $@.new $@ && \
$(TXT_TO_XML) -d book -o $@.new $< && \
mv $@.new $@
technical/api-index.txt: technical/api-index-skel.txt \
technical/api-index.sh $(patsubst %,%.txt,$(API_DOCS))
@@ -376,46 +376,46 @@ XSLT = docbook.xsl
XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css
user-manual.html: user-manual.xml $(XSLT)
$(QUIET_XSLTPROC)$(RM) $@+ $@ && \
xsltproc $(XSLTOPTS) -o $@+ $(XSLT) $< && \
mv $@+ $@
$(QUIET_XSLTPROC)$(RM) $@.new $@ && \
xsltproc $(XSLTOPTS) -o $@.new $(XSLT) $< && \
mv $@.new $@
git.info: user-manual.texi
$(QUIET_MAKEINFO)$(MAKEINFO) --no-split -o $@ user-manual.texi
user-manual.texi: user-manual.xml
$(QUIET_DB2TEXI)$(RM) $@+ $@ && \
$(DOCBOOK2X_TEXI) user-manual.xml --encoding=UTF-8 --to-stdout >$@++ && \
$(PERL_PATH) fix-texi.perl <$@++ >$@+ && \
rm $@++ && \
mv $@+ $@
$(QUIET_DB2TEXI)$(RM) $@.new $@ && \
$(DOCBOOK2X_TEXI) user-manual.xml --encoding=UTF-8 --to-stdout >$@.new.new && \
$(PERL_PATH) fix-texi.perl <$@.new.new >$@.new && \
rm $@.new.new && \
mv $@.new $@
user-manual.pdf: user-manual.xml
$(QUIET_DBLATEX)$(RM) $@+ $@ && \
$(DBLATEX) -o $@+ $(DBLATEX_COMMON) $< && \
mv $@+ $@
$(QUIET_DBLATEX)$(RM) $@.new $@ && \
$(DBLATEX) -o $@.new $(DBLATEX_COMMON) $< && \
mv $@.new $@
gitman.texi: $(MAN_XML) cat-texi.perl texi.xsl
$(QUIET_DB2TEXI)$(RM) $@+ $@ && \
($(foreach xml,$(sort $(MAN_XML)),xsltproc -o $(xml)+ texi.xsl $(xml) && \
$(DOCBOOK2X_TEXI) --encoding=UTF-8 --to-stdout $(xml)+ && \
rm $(xml)+ &&) true) > $@++ && \
$(PERL_PATH) cat-texi.perl $@ <$@++ >$@+ && \
rm $@++ && \
mv $@+ $@
$(QUIET_DB2TEXI)$(RM) $@.new $@ && \
($(foreach xml,$(sort $(MAN_XML)),xsltproc -o $(xml).new texi.xsl $(xml) && \
$(DOCBOOK2X_TEXI) --encoding=UTF-8 --to-stdout $(xml).new && \
rm $(xml).new &&) true) > $@.new.new && \
$(PERL_PATH) cat-texi.perl $@ <$@.new.new >$@.new && \
rm $@.new.new && \
mv $@.new $@
gitman.info: gitman.texi
$(QUIET_MAKEINFO)$(MAKEINFO) --no-split --no-validate $*.texi
$(patsubst %.txt,%.texi,$(MAN_TXT)): %.texi : %.xml
$(QUIET_DB2TEXI)$(RM) $@+ $@ && \
$(DOCBOOK2X_TEXI) --to-stdout $*.xml >$@+ && \
mv $@+ $@
$(QUIET_DB2TEXI)$(RM) $@.new $@ && \
$(DOCBOOK2X_TEXI) --to-stdout $*.xml >$@.new && \
mv $@.new $@
howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
$(QUIET_GEN)$(RM) $@+ $@ && \
'$(SHELL_PATH_SQ)' ./howto-index.sh $(sort $(wildcard howto/*.txt)) >$@+ && \
mv $@+ $@
$(QUIET_GEN)$(RM) $@.new $@ && \
'$(SHELL_PATH_SQ)' ./howto-index.sh $(sort $(wildcard howto/*.txt)) >$@.new && \
mv $@.new $@
$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
$(QUIET_ASCIIDOC)$(TXT_TO_HTML) $*.txt
@@ -424,10 +424,10 @@ WEBDOC_DEST = /pub/software/scm/git/docs
howto/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../
$(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
$(QUIET_ASCIIDOC)$(RM) $@.new $@ && \
sed -e '1,/^$$/d' $< | \
$(TXT_TO_HTML) - >$@+ && \
mv $@+ $@
$(TXT_TO_HTML) - >$@.new && \
mv $@.new $@
install-webdoc : html
'$(SHELL_PATH_SQ)' ./install-webdoc.sh $(WEBDOC_DEST)

View File

@@ -577,6 +577,7 @@ static int *list_and_choose(struct menu_opts *opts, struct menu_stuff *stuff)
clean_get_color(CLEAN_COLOR_RESET));
}
fflush(stdout);
if (strbuf_getline_lf(&choice, stdin) != EOF) {
strbuf_trim(&choice);
} else {
@@ -659,6 +660,7 @@ static int filter_by_patterns_cmd(void)
clean_print_color(CLEAN_COLOR_PROMPT);
printf(_("Input ignore patterns>> "));
clean_print_color(CLEAN_COLOR_RESET);
fflush(stdout);
if (strbuf_getline_lf(&confirm, stdin) != EOF)
strbuf_trim(&confirm);
else
@@ -757,6 +759,7 @@ static int ask_each_cmd(void)
qname = quote_path_relative(item->string, NULL, &buf);
/* TRANSLATORS: Make sure to keep [y/N] as is */
printf(_("Remove %s [y/N]? "), qname);
fflush(stdout);
if (strbuf_getline_lf(&confirm, stdin) != EOF) {
strbuf_trim(&confirm);
} else {

View File

@@ -1410,6 +1410,7 @@ static pid_t mingw_spawnve_fd(const char *cmd, const char **argv, char **deltaen
HANDLE cons;
const char *(*quote_arg)(const char *arg) =
is_msys2_sh(*argv) ? quote_arg_msys2 : quote_arg_msvc;
const char *strace_env;
do_unset_environment_variables();
@@ -1467,6 +1468,31 @@ static pid_t mingw_spawnve_fd(const char *cmd, const char **argv, char **deltaen
free(quoted);
}
strace_env = getenv("GIT_STRACE_COMMANDS");
if (strace_env) {
char *p = path_lookup("strace.exe", 1);
if (!p)
return error("strace not found!");
if (xutftowcs_path(wcmd, p) < 0) {
free(p);
return -1;
}
free(p);
if (!strcmp("1", strace_env) ||
!strcasecmp("yes", strace_env) ||
!strcasecmp("true", strace_env))
strbuf_insert(&args, 0, "strace ", 7);
else {
const char *quoted = quote_arg(strace_env);
struct strbuf buf = STRBUF_INIT;
strbuf_addf(&buf, "strace -o %s ", quoted);
if (quoted != strace_env)
free((char *)quoted);
strbuf_insert(&args, 0, buf.buf, buf.len);
strbuf_release(&buf);
}
}
ALLOC_ARRAY(wargs, st_add(st_mult(2, args.len), 1));
xutftowcs(wargs, args.buf, 2 * args.len + 1);
strbuf_release(&args);
@@ -2527,6 +2553,33 @@ static void setup_windows_environment(void)
/* simulate TERM to enable auto-color (see color.c) */
if (!getenv("TERM"))
setenv("TERM", "cygwin", 1);
/* calculate HOME if not set */
if (!getenv("HOME")) {
/*
* try $HOMEDRIVE$HOMEPATH - the home share may be a network
* location, thus also check if the path exists (i.e. is not
* disconnected)
*/
if ((tmp = getenv("HOMEDRIVE"))) {
struct strbuf buf = STRBUF_INIT;
strbuf_addstr(&buf, tmp);
if ((tmp = getenv("HOMEPATH"))) {
strbuf_addstr(&buf, tmp);
if (is_directory(buf.buf))
setenv("HOME", buf.buf, 1);
else
tmp = NULL; /* use $USERPROFILE */
}
strbuf_release(&buf);
}
/* use $USERPROFILE if the home share is not available */
if (!tmp && (tmp = getenv("USERPROFILE")))
setenv("HOME", tmp, 1);
}
if (!getenv("LC_ALL") && !getenv("LC_CTYPE") && !getenv("LANG"))
setenv("LC_CTYPE", "C", 1);
}
int handle_long_path(wchar_t *path, int len, int max_path, int expand)

View File

@@ -1,7 +1,12 @@
#ifndef NO_INTTYPES_H
#include <inttypes.h>
#endif
#include "git-compat-util.h"
#include "run-command.h"
#include "compat/terminal.h"
#include "sigchain.h"
#include "strbuf.h"
#include "cache.h"
#if defined(HAVE_DEV_TTY) || defined(GIT_WINDOWS_NATIVE)
@@ -91,6 +96,55 @@ static int disable_echo(void)
return 0;
}
static char *shell_prompt(const char *prompt, int echo)
{
const char *read_input[] = {
/* Note: call 'bash' explicitly, as 'read -s' is bash-specific */
"bash", "-c", echo ?
"cat >/dev/tty && read -r line </dev/tty && echo \"$line\"" :
"cat >/dev/tty && read -r -s line </dev/tty && echo \"$line\" && echo >/dev/tty",
NULL
};
struct child_process child = CHILD_PROCESS_INIT;
static struct strbuf buffer = STRBUF_INIT;
int prompt_len = strlen(prompt), len = -1, code;
child.argv = read_input;
child.in = -1;
child.out = -1;
child.silent_exec_failure = 1;
if (start_command(&child))
return NULL;
if (write_in_full(child.in, prompt, prompt_len) != prompt_len) {
error("could not write to prompt script");
close(child.in);
goto ret;
}
close(child.in);
strbuf_reset(&buffer);
len = strbuf_read(&buffer, child.out, 1024);
if (len < 0) {
error("could not read from prompt script");
goto ret;
}
strbuf_strip_suffix(&buffer, "\n");
strbuf_strip_suffix(&buffer, "\r");
ret:
close(child.out);
code = finish_command(&child);
if (code) {
error("failed to execute prompt script (exit code %d)", code);
return NULL;
}
return len < 0 ? NULL : buffer.buf;
}
#endif
#ifndef FORCE_TEXT
@@ -103,6 +157,15 @@ char *git_terminal_prompt(const char *prompt, int echo)
int r;
FILE *input_fh, *output_fh;
#ifdef GIT_WINDOWS_NATIVE
/* try shell_prompt first, fall back to CONIN/OUT if bash is missing */
char *result = shell_prompt(prompt, echo);
if (result || errno != ENOENT)
return result;
#endif
input_fh = fopen(INPUT_PATH, "r" FORCE_TEXT);
if (!input_fh)
return NULL;

25
compat/win32/git.manifest Normal file
View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" name="Git" version="0.0.0.1" />
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
</application>
</compatibility>
</assembly>

View File

@@ -7,6 +7,7 @@
#include <wingdi.h>
#include <winreg.h>
#include "win32.h"
#include "win32/lazyload.h"
static int fd_is_interactive[3] = { 0, 0, 0 };
#define FD_CONSOLE 0x1
@@ -41,26 +42,21 @@ typedef struct _CONSOLE_FONT_INFOEX {
#endif
#endif
typedef BOOL (WINAPI *PGETCURRENTCONSOLEFONTEX)(HANDLE, BOOL,
PCONSOLE_FONT_INFOEX);
static void warn_if_raster_font(void)
{
DWORD fontFamily = 0;
PGETCURRENTCONSOLEFONTEX pGetCurrentConsoleFontEx;
DECLARE_PROC_ADDR(kernel32.dll, BOOL, GetCurrentConsoleFontEx,
HANDLE, BOOL, PCONSOLE_FONT_INFOEX);
/* don't bother if output was ascii only */
if (!non_ascii_used)
return;
/* GetCurrentConsoleFontEx is available since Vista */
pGetCurrentConsoleFontEx = (PGETCURRENTCONSOLEFONTEX) GetProcAddress(
GetModuleHandle("kernel32.dll"),
"GetCurrentConsoleFontEx");
if (pGetCurrentConsoleFontEx) {
if (INIT_PROC_ADDR(GetCurrentConsoleFontEx)) {
CONSOLE_FONT_INFOEX cfi;
cfi.cbSize = sizeof(cfi);
if (pGetCurrentConsoleFontEx(console, 0, &cfi))
if (GetCurrentConsoleFontEx(console, 0, &cfi))
fontFamily = cfi.FontFamily;
} else {
/* pre-Vista: check default console font in registry */

View File

@@ -568,7 +568,6 @@ ifneq (,$(findstring MINGW,$(uname_S)))
NO_STRTOUMAX = YesPlease
NO_MKDTEMP = YesPlease
NO_SVN_TESTS = YesPlease
NO_PERL_MAKEMAKER = YesPlease
RUNTIME_PREFIX = YesPlease
HAVE_WPGMPTR = YesWeDo
NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
@@ -597,7 +596,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
X = .exe
SPARSE_FLAGS = -Wno-one-bit-signed-bitfield
ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
htmldir = doc/git/html/
htmldir = share/doc/git/$(firstword $(subst -, ,$(GIT_VERSION)))/html
prefix =
INSTALL = /bin/install
EXTLIBS += /mingw/lib/libz.a
@@ -628,7 +627,8 @@ else
BASIC_LDFLAGS += -Wl,--large-address-aware
endif
CC = gcc
COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0 -DDETECT_MSYS_TTY
COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0 -DDETECT_MSYS_TTY \
-fstack-protector-strong
EXTLIBS += -lntdll
INSTALL = /bin/install
NO_R_TO_GCC_LINKER = YesPlease
@@ -640,6 +640,7 @@ else
NO_LIBPCRE1_JIT = UnfortunatelyYes
NO_CURL =
USE_NED_ALLOCATOR = YesPlease
NO_PYTHON =
else
COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO
NO_CURL = YesPlease

4
diff.c
View File

@@ -4136,6 +4136,10 @@ static void run_external_diff(const char *pgm,
argv_array_pushf(&env, "GIT_DIFF_PATH_COUNTER=%d", ++o->diff_path_counter);
argv_array_pushf(&env, "GIT_DIFF_PATH_TOTAL=%d", q->nr);
if (one && one->should_munmap)
diff_free_filespec_data(one);
if (two && two->should_munmap)
diff_free_filespec_data(two);
if (run_command_v_opt_cd_env(argv.argv, RUN_USING_SHELL, NULL, env.argv))
die(_("external diff died, stopping at %s"), name);

View File

@@ -12,7 +12,9 @@
#ifndef NO_GETTEXT
# include <locale.h>
# include <libintl.h>
# ifdef HAVE_LIBCHARSET_H
# ifdef GIT_WINDOWS_NATIVE
# define locale_charset() "UTF-8"
# elif defined HAVE_LIBCHARSET_H
# include <libcharset.h>
# else
# include <langinfo.h>

2
git.rc
View File

@@ -20,3 +20,5 @@ BEGIN
VALUE "Translation", 0x409, 1200
END
END
1 RT_MANIFEST "compat/win32/git.manifest"

View File

@@ -293,11 +293,9 @@ int sign_buffer(struct strbuf *buffer, struct strbuf *signature, const char *sig
struct child_process gpg = CHILD_PROCESS_INIT;
int ret;
size_t i, j, bottom;
struct strbuf gpg_status = STRBUF_INIT;
argv_array_pushl(&gpg.args,
use_format->program,
"--status-fd=2",
"-bsau", signing_key,
NULL);
@@ -309,12 +307,10 @@ int sign_buffer(struct strbuf *buffer, struct strbuf *signature, const char *sig
*/
sigchain_push(SIGPIPE, SIG_IGN);
ret = pipe_command(&gpg, buffer->buf, buffer->len,
signature, 1024, &gpg_status, 0);
signature, 1024, NULL, 0);
sigchain_pop(SIGPIPE);
ret |= !strstr(gpg_status.buf, "\n[GNUPG:] SIG_CREATED ");
strbuf_release(&gpg_status);
if (ret)
if (ret || signature->len == bottom)
return error(_("gpg failed to sign the data"));
/* Strip CR from the line endings, in case we are on Windows. */

View File

@@ -400,7 +400,7 @@ test_expect_success SYMLINKS 're-init to move gitdir symlink' '
# Tests for the hidden file attribute on windows
is_hidden () {
# Use the output of `attrib`, ignore the absolute path
case "$(attrib "$1")" in *H*?:*) return 0;; esac
case "$("$SYSTEMROOT"/system32/attrib "$1")" in *H*?:*) return 0;; esac
return 1
}

View File

@@ -48,7 +48,7 @@ test_expect_success 'clone -c config is available during clone' '
# Tests for the hidden file attribute on windows
is_hidden () {
# Use the output of `attrib`, ignore the absolute path
case "$(attrib "$1")" in *H*?:*) return 0;; esac
case "$("$SYSTEMROOT"/system32/attrib "$1")" in *H*?:*) return 0;; esac
return 1
}

View File

@@ -1345,12 +1345,6 @@ test_expect_success GPG \
'test_config user.signingkey BobTheMouse &&
test_must_fail git tag -s -m tail tag-gpg-failure'
# try to produce invalid signature
test_expect_success GPG \
'git tag -s fails if gpg is misconfigured (bad signature format)' \
'test_config gpg.program echo &&
test_must_fail git tag -s -m tail tag-gpg-failure'
# try to sign with bad user.signingkey
test_expect_success GPGSM \
'git tag -s fails if gpgsm is misconfigured (bad key)' \
@@ -1358,13 +1352,6 @@ test_expect_success GPGSM \
test_config gpg.format x509 &&
test_must_fail git tag -s -m tail tag-gpg-failure'
# try to produce invalid signature
test_expect_success GPGSM \
'git tag -s fails if gpgsm is misconfigured (bad signature format)' \
'test_config gpg.x509.program echo &&
test_config gpg.format x509 &&
test_must_fail git tag -s -m tail tag-gpg-failure'
# try to verify without gpg:
rm -rf gpghome

View File

@@ -1180,8 +1180,8 @@ test_expect_success $PREREQ 'in-reply-to but no threading' '
--to=nobody@example.com \
--in-reply-to="<in-reply-id@example.com>" \
--no-thread \
$patches |
grep "In-Reply-To: <in-reply-id@example.com>"
$patches >out &&
grep "In-Reply-To: <in-reply-id@example.com>" out
'
test_expect_success $PREREQ 'no in-reply-to and no threading' '

View File

@@ -12,6 +12,12 @@ then
test_done
fi
if test_have_prereq MINGW
then
skip_all='skipping remote-svn tests for lack of POSIX'
test_done
fi
# Override svnrdump with our simulator
PATH="$HOME:$PATH"
export PATH PYTHON_PATH GIT_BUILD_DIR

View File

@@ -43,14 +43,18 @@ test_expect_success 'setup repository and import' '
test_expect_success 'run log' "
git reset --hard origin/a &&
git svn log -r2 origin/trunk | grep ^r2 &&
git svn log -r4 origin/trunk | grep ^r4 &&
git svn log -r3 | grep ^r3
git svn log -r2 origin/trunk >out &&
grep ^r2 out &&
git svn log -r4 origin/trunk >out &&
grep ^r4 out &&
git svn log -r3 >out &&
grep ^r3 out
"
test_expect_success 'run log against a from trunk' "
git reset --hard origin/trunk &&
git svn log -r3 origin/a | grep ^r3
git svn log -r3 origin/a >out &&
grep ^r3 out
"
printf 'r1 \nr2 \nr4 \n' > expected-range-r1-r2-r4

View File

@@ -746,7 +746,12 @@ test_eval_ () {
# be _inside_ the block to avoid polluting the "set -x" output
#
test_eval_inner_ "$@" </dev/null >&3 2>&4
if test -n "$TEST_NO_REDIRECT"
then
test_eval_inner_ "$@"
else
test_eval_inner_ "$@" </dev/null >&3 2>&4
fi
{
test_eval_ret_=$?
if want_trace