From 76e27fbfd92030a685a591cc89f63de2cc37f540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SZEDER=20G=C3=A1bor?= Date: Fri, 8 Feb 2019 12:50:45 +0100 Subject: [PATCH 01/23] test-lib: make '--stress' more bisect-friendly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's suppose that a test somehow becomes flaky between 'master' and 'pu', and tends to fail within the first 50 repetitions when run with '--stress'. In such a case we could use 'git bisect' to find the culprit: if the test script fails with '--stress', then the commit is definitely bad, but if it survives, say, 300 repetitions, then we could consider it good with reasonable confidence. Unfortunately, all this could only be done manually, because '--stress' would run the test script repeatedly for all eternity on a good commit, and it would exit with success even when it found a failure on a bad commit. So let's make '--stress' usable with 'git bisect run': - Make it exit with failure if a failure is found. - Add the '--stress-limit=' option to repeat the test script at most N times in each of the parallel jobs, and exit with success when the limit is reached. And then we could simply run something like: $ git bisect start origin/pu master $ git bisect run sh -c 'make && cd t && ./t1234-foo.sh --stress --stress-limit=300' Sure, as a brand new feature it won't be any useful right now, but in a release or three most cooking topics will already contain this, so we could automatically bisect at least newly introduced flakiness. Signed-off-by: SZEDER Gábor Signed-off-by: Junio C Hamano --- t/README | 5 +++++ t/test-lib.sh | 18 ++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/t/README b/t/README index 11ce7675e3..3aed321248 100644 --- a/t/README +++ b/t/README @@ -202,6 +202,11 @@ appropriately before running "make". '.stress-' suffix, and the trash directory of the failed test job is renamed to end with a '.stress-failed' suffix. +--stress-limit=:: + When combined with --stress run the test script repeatedly + this many times in each of the parallel jobs or until one of + them fails, whichever comes first. + You can also set the GIT_TEST_INSTALLED environment variable to the bindir of an existing git installation to test that installation. You still need to have built this git sandbox, from which various diff --git a/t/test-lib.sh b/t/test-lib.sh index a1abb1177a..77eff04c92 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -152,6 +152,17 @@ do ;; esac ;; + --stress-limit=*) + stress_limit=${opt#--*=} + case "$stress_limit" in + *[^0-9]*|0*|"") + echo "error: --stress-limit= requires the number of repetitions" >&2 + exit 1 + ;; + *) # Good. + ;; + esac + ;; *) echo "error: unknown test option '$opt'" >&2; exit 1 ;; esac @@ -237,8 +248,10 @@ then exit 1 ' TERM INT - cnt=0 - while ! test -e "$stressfail" + cnt=1 + while ! test -e "$stressfail" && + { test -z "$stress_limit" || + test $cnt -le $stress_limit ; } do $TEST_SHELL_PATH "$0" "$@" >"$TEST_RESULTS_BASE.stress-$job_nr.out" 2>&1 & test_pid=$! @@ -261,6 +274,7 @@ then if test -f "$stressfail" then + stress_exit=1 echo "Log(s) of failed test run(s):" for failed_job_nr in $(sort -n "$stressfail") do From 32ceace39fa224e8e01c791d441b1dd411ba2aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= Date: Mon, 11 Feb 2019 07:44:53 +0100 Subject: [PATCH 02/23] Fix typos in translatable strings for v2.21.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jean-Noël Avila Signed-off-by: Junio C Hamano --- builtin/bisect--helper.c | 4 ++-- builtin/fetch.c | 2 +- builtin/rebase.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c index c1cff32661..e7325fe37f 100644 --- a/builtin/bisect--helper.c +++ b/builtin/bisect--helper.c @@ -173,7 +173,7 @@ static int bisect_reset(const char *commit) argv_array_clear(&argv); return error(_("could not check out original" " HEAD '%s'. Try 'git bisect" - "reset '."), branch.buf); + " reset '."), branch.buf); } argv_array_clear(&argv); } @@ -646,7 +646,7 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix) OPT_BOOL(0, "no-checkout", &no_checkout, N_("update BISECT_HEAD instead of checking out the current commit")), OPT_BOOL(0, "no-log", &nolog, - N_("no log for BISECT_WRITE ")), + N_("no log for BISECT_WRITE")), OPT_END() }; struct bisect_terms terms = { .term_good = NULL, .term_bad = NULL }; diff --git a/builtin/fetch.c b/builtin/fetch.c index 5a09fe24cd..b620fd54b4 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -1480,7 +1480,7 @@ static inline void fetch_one_setup_partial(struct remote *remote) if (strcmp(remote->name, repository_format_partial_clone)) { if (filter_options.choice) die(_("--filter can only be used with the remote " - "configured in extensions.partialclone")); + "configured in extensions.partialClone")); return; } diff --git a/builtin/rebase.c b/builtin/rebase.c index 96efd40901..7c7bc13e91 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -1434,7 +1434,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) } if (options.reschedule_failed_exec && !is_interactive(&options)) - die(_("--reschedule-failed-exec requires an interactive rebase")); + die(_("%s requires an interactive rebase"), "--reschedule-failed-exec"); if (options.git_am_opts.argc) { /* all am options except -q are compatible only with --am */ From 243a4c7e274ea060ea35c5dc6701e2cf918e0f29 Mon Sep 17 00:00:00 2001 From: "Randall S. Becker" Date: Sat, 9 Feb 2019 19:20:16 -0500 Subject: [PATCH 03/23] config.mak.uname: add FREAD_READS_DIRECTORIES for NonStop platform The NonStop platform needs this configuration item specified as UnfortunatelyYes so that config directory files are correctly processed. Signed-off-by: Randall S. Becker Signed-off-by: Junio C Hamano --- config.mak.uname | 1 + 1 file changed, 1 insertion(+) diff --git a/config.mak.uname b/config.mak.uname index 786bb2f913..281c547e2f 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -490,6 +490,7 @@ ifeq ($(uname_S),NONSTOP_KERNEL) OLD_ICONV = UnfortunatelyYes NO_REGEX = NeedsStartEnd NO_PTHREADS = UnfortunatelyYes + FREAD_READS_DIRECTORIES = UnfortunatelyYes # Not detected (nor checked for) by './configure'. # We don't have SA_RESTART on NonStop, unfortunalety. From 5fe81438b52f8464947e5b27381a898d7451260e Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Mon, 11 Feb 2019 17:16:58 +0000 Subject: [PATCH 04/23] sequencer: make sign_off_header a file local symbol Commit d0aaa46fd3 ("commit: move empty message checks to libgit", 2017-11-10) removes the last use of 'sign_off_header' outside of the "sequencer.c" source file. Remove the extern declaration from the header file and mark the definition of the symbol with the static keyword. Signed-off-by: Ramsay Jones Signed-off-by: Junio C Hamano --- sequencer.c | 2 +- sequencer.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sequencer.c b/sequencer.c index 4034c0461b..d0c2277455 100644 --- a/sequencer.c +++ b/sequencer.c @@ -31,7 +31,7 @@ #define GIT_REFLOG_ACTION "GIT_REFLOG_ACTION" -const char sign_off_header[] = "Signed-off-by: "; +static const char sign_off_header[] = "Signed-off-by: "; static const char cherry_picked_prefix[] = "(cherry picked from commit "; GIT_PATH_FUNC(git_path_commit_editmsg, "COMMIT_EDITMSG") diff --git a/sequencer.h b/sequencer.h index c5787c6b56..e025deb007 100644 --- a/sequencer.h +++ b/sequencer.h @@ -83,8 +83,6 @@ int check_todo_list(void); int skip_unnecessary_picks(void); int rearrange_squash(void); -extern const char sign_off_header[]; - void append_signoff(struct strbuf *msgbuf, int ignore_footer, unsigned flag); void append_conflicts_hint(struct strbuf *msgbuf); int message_is_empty(const struct strbuf *sb, From 7d661e5ed16dca303d7898f5ab0cc2ffc69e0499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SZEDER=20G=C3=A1bor?= Date: Mon, 11 Feb 2019 20:58:03 +0100 Subject: [PATCH 05/23] test-lib: fix non-portable pattern bracket expressions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use a '!' character to start a non-matching pattern bracket expression, as specified by POSIX in Shell Command Language section 2.13.1 Patterns Matching a Single Character [1]. I used '^' instead in three places in the previous three commits, to verify that the arguments of the '--stress=' and '--stress-limit=' options and the values of various '*_PORT' environment variables are valid numbers. With certain shells, at least with dash (upstream and in Ubuntu 14.04) and mksh, this led to various undesired behaviors: # error message in case of a valid number $ ~/src/dash/src/dash ./t3903-stash.sh --stress=8 error: --stress= requires the number of jobs to run # not the expected error message $ ~/src/dash/src/dash ./t3903-stash.sh --stress=foo ./t3903-stash.sh: 238: test: Illegal number: foo # no error message at all?! $ mksh ./t3903-stash.sh --stress=foo $ echo $? 0 Some other shells, e.g. Bash (even in posix mode), ksh, dash in Ubuntu 16.04 or later, are apparently happy to accept '^' just as well. [1] http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_13 Signed-off-by: SZEDER Gábor Signed-off-by: Junio C Hamano --- t/test-lib-functions.sh | 2 +- t/test-lib.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 92cf8f812c..969e2ba6da 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -1289,7 +1289,7 @@ test_set_port () { port=$(($port + 10000)) fi ;; - *[^0-9]*|0*) + *[!0-9]*|0*) error >&7 "invalid port number: $port" ;; *) diff --git a/t/test-lib.sh b/t/test-lib.sh index 77eff04c92..4e7cb52b57 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -144,7 +144,7 @@ do --stress=*) stress=${opt#--*=} case "$stress" in - *[^0-9]*|0*|"") + *[!0-9]*|0*|"") echo "error: --stress= requires the number of jobs to run" >&2 exit 1 ;; @@ -155,7 +155,7 @@ do --stress-limit=*) stress_limit=${opt#--*=} case "$stress_limit" in - *[^0-9]*|0*|"") + *[!0-9]*|0*|"") echo "error: --stress-limit= requires the number of repetitions" >&2 exit 1 ;; From 99e9ab54aba21b8fa368f20e6b3585d95b1c4d37 Mon Sep 17 00:00:00 2001 From: Kevin Daudt Date: Mon, 11 Feb 2019 22:38:18 +0100 Subject: [PATCH 06/23] t0028: fix wrong octal values for BOM in setup The setup code uses octal values with printf to generate a BOM for UTF-16/32 BE/LE. It specifically uses '\777' to emit a 0xff byte. This relies on the fact that most shells truncate the value above 0o377. Ash however interprets '\777' as '\77' + a literal '7', resulting in an invalid BOM. Fix this by using the proper value of 0xff: '\377'. Signed-off-by: Kevin Daudt Signed-off-by: Junio C Hamano --- t/t0028-working-tree-encoding.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh index 12b8eb963a..58e5b6cdd4 100755 --- a/t/t0028-working-tree-encoding.sh +++ b/t/t0028-working-tree-encoding.sh @@ -22,12 +22,12 @@ test_expect_success 'setup test files' ' # BOM tests printf "\0a\0b\0c" >nobom.utf16be.raw && printf "a\0b\0c\0" >nobom.utf16le.raw && - printf "\376\777\0a\0b\0c" >bebom.utf16be.raw && - printf "\777\376a\0b\0c\0" >lebom.utf16le.raw && + printf "\376\377\0a\0b\0c" >bebom.utf16be.raw && + printf "\377\376a\0b\0c\0" >lebom.utf16le.raw && printf "\0\0\0a\0\0\0b\0\0\0c" >nobom.utf32be.raw && printf "a\0\0\0b\0\0\0c\0\0\0" >nobom.utf32le.raw && - printf "\0\0\376\777\0\0\0a\0\0\0b\0\0\0c" >bebom.utf32be.raw && - printf "\777\376\0\0a\0\0\0b\0\0\0c\0\0\0" >lebom.utf32le.raw && + printf "\0\0\376\377\0\0\0a\0\0\0b\0\0\0c" >bebom.utf32be.raw && + printf "\377\376\0\0a\0\0\0b\0\0\0c\0\0\0" >lebom.utf32le.raw && # Add only UTF-16 file, we will add the UTF-32 file later cp test.utf16.raw test.utf16 && From 79444c92943048f9ac62e9311038ebe43f5f0982 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Tue, 12 Feb 2019 00:52:06 +0000 Subject: [PATCH 07/23] utf8: handle systems that don't write BOM for UTF-16 When serializing UTF-16 (and UTF-32), there are three possible ways to write the stream. One can write the data with a BOM in either big-endian or little-endian format, or one can write the data without a BOM in big-endian format. Most systems' iconv implementations choose to write it with a BOM in some endianness, since this is the most foolproof, and it is resistant to misinterpretation on Windows, where UTF-16 and the little-endian serialization are very common. For compatibility with Windows and to avoid accidental misuse there, Git always wants to write UTF-16 with a BOM, and will refuse to read UTF-16 without it. However, musl's iconv implementation writes UTF-16 without a BOM, relying on the user to interpret it as big-endian. This causes t0028 and the related functionality to fail, since Git won't read the file without a BOM. Add a Makefile and #define knob, ICONV_OMITS_BOM, that can be set if the iconv implementation has this behavior. When set, Git will write a BOM manually for UTF-16 and UTF-32 and then force the data to be written in UTF-16BE or UTF-32BE. We choose big-endian behavior here because the tests use the raw "UTF-16" encoding, which will be big-endian when the implementation requires this knob to be set. Update the tests to detect this case and write test data with an added BOM if necessary. Always write the BOM in the tests in big-endian format, since all iconv implementations that omit a BOM must use big-endian serialization according to the Unicode standard. Preserve the existing behavior for systems which do not have this knob enabled, since they may use optimized implementations, including defaulting to the native endianness, which may improve performance. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- Makefile | 7 +++++++ t/t0028-working-tree-encoding.sh | 34 +++++++++++++++++++++++++++----- utf8.c | 14 +++++++++++++ 3 files changed, 50 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 0e13a5b469..457311bc31 100644 --- a/Makefile +++ b/Makefile @@ -259,6 +259,10 @@ all:: # Define OLD_ICONV if your library has an old iconv(), where the second # (input buffer pointer) parameter is declared with type (const char **). # +# Define ICONV_OMITS_BOM if your iconv implementation does not write a +# byte-order mark (BOM) when writing UTF-16 or UTF-32 and always writes in +# big-endian format. +# # Define NO_DEFLATE_BOUND if your zlib does not have deflateBound. # # Define NO_R_TO_GCC_LINKER if your gcc does not like "-R/path/lib" @@ -1415,6 +1419,9 @@ ifndef NO_ICONV EXTLIBS += $(ICONV_LINK) -liconv endif endif +ifdef ICONV_OMITS_BOM + BASIC_CFLAGS += -DICONV_OMITS_BOM +endif ifdef NEEDS_LIBGEN EXTLIBS += -lgen endif diff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh index e58ecbfc44..500229a9bd 100755 --- a/t/t0028-working-tree-encoding.sh +++ b/t/t0028-working-tree-encoding.sh @@ -6,6 +6,30 @@ test_description='working-tree-encoding conversion via gitattributes' GIT_TRACE_WORKING_TREE_ENCODING=1 && export GIT_TRACE_WORKING_TREE_ENCODING +test_lazy_prereq NO_UTF16_BOM ' + test $(printf abc | iconv -f UTF-8 -t UTF-16 | wc -c) = 6 +' + +test_lazy_prereq NO_UTF32_BOM ' + test $(printf abc | iconv -f UTF-8 -t UTF-32 | wc -c) = 12 +' + +write_utf16 () { + if test_have_prereq NO_UTF16_BOM + then + printf '\xfe\xff' + fi && + iconv -f UTF-8 -t UTF-16 +} + +write_utf32 () { + if test_have_prereq NO_UTF32_BOM + then + printf '\x00\x00\xfe\xff' + fi && + iconv -f UTF-8 -t UTF-32 +} + test_expect_success 'setup test files' ' git config core.eol lf && @@ -13,8 +37,8 @@ test_expect_success 'setup test files' ' echo "*.utf16 text working-tree-encoding=utf-16" >.gitattributes && echo "*.utf16lebom text working-tree-encoding=UTF-16LE-BOM" >>.gitattributes && printf "$text" >test.utf8.raw && - printf "$text" | iconv -f UTF-8 -t UTF-16 >test.utf16.raw && - printf "$text" | iconv -f UTF-8 -t UTF-32 >test.utf32.raw && + printf "$text" | write_utf16 >test.utf16.raw && + printf "$text" | write_utf32 >test.utf32.raw && printf "\377\376" >test.utf16lebom.raw && printf "$text" | iconv -f UTF-8 -t UTF-32LE >>test.utf16lebom.raw && @@ -124,8 +148,8 @@ do test_when_finished "rm -f crlf.utf${i}.raw lf.utf${i}.raw" && test_when_finished "git reset --hard HEAD^" && - cat lf.utf8.raw | iconv -f UTF-8 -t UTF-${i} >lf.utf${i}.raw && - cat crlf.utf8.raw | iconv -f UTF-8 -t UTF-${i} >crlf.utf${i}.raw && + cat lf.utf8.raw | write_utf${i} >lf.utf${i}.raw && + cat crlf.utf8.raw | write_utf${i} >crlf.utf${i}.raw && cp crlf.utf${i}.raw eol.utf${i} && cat >expectIndexLF <<-EOF && @@ -223,7 +247,7 @@ test_expect_success ICONV_SHIFT_JIS 'check roundtrip encoding' ' text="hallo there!\nroundtrip test here!" && printf "$text" | iconv -f UTF-8 -t SHIFT-JIS >roundtrip.shift && - printf "$text" | iconv -f UTF-8 -t UTF-16 >roundtrip.utf16 && + printf "$text" | write_utf16 >roundtrip.utf16 && echo "*.shift text working-tree-encoding=SHIFT-JIS" >>.gitattributes && # SHIFT-JIS encoded files are round-trip checked by default... diff --git a/utf8.c b/utf8.c index 83824dc2f4..3b42fadffd 100644 --- a/utf8.c +++ b/utf8.c @@ -559,6 +559,10 @@ char *reencode_string_len(const char *in, size_t insz, /* * For writing, UTF-16 iconv typically creates "UTF-16BE-BOM" * Some users under Windows want the little endian version + * + * We handle UTF-16 and UTF-32 ourselves only if the platform does not + * provide a BOM (which we require), since we want to match the behavior + * of the system tools and libc as much as possible. */ if (same_utf_encoding("UTF-16LE-BOM", out_encoding)) { bom_str = utf16_le_bom; @@ -568,6 +572,16 @@ char *reencode_string_len(const char *in, size_t insz, bom_str = utf16_be_bom; bom_len = sizeof(utf16_be_bom); out_encoding = "UTF-16BE"; +#ifdef ICONV_OMITS_BOM + } else if (same_utf_encoding("UTF-16", out_encoding)) { + bom_str = utf16_be_bom; + bom_len = sizeof(utf16_be_bom); + out_encoding = "UTF-16BE"; + } else if (same_utf_encoding("UTF-32", out_encoding)) { + bom_str = utf32_be_bom; + bom_len = sizeof(utf32_be_bom); + out_encoding = "UTF-32BE"; +#endif } conv = iconv_open(out_encoding, in_encoding); From 6d1fbf888fbb6841444ec75419eee715bfcd995b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Mon, 11 Feb 2019 16:40:11 +0700 Subject: [PATCH 08/23] imap-send.c: add a missing space in error message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- imap-send.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imap-send.c b/imap-send.c index b4eb886e2a..36bba5b50d 100644 --- a/imap-send.c +++ b/imap-send.c @@ -1114,7 +1114,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, char *f if (!strcmp(srvc->auth_method, "CRAM-MD5")) { if (!CAP(AUTH_CRAM_MD5)) { - fprintf(stderr, "You specified" + fprintf(stderr, "You specified " "CRAM-MD5 as authentication method, " "but %s doesn't support it.\n", srvc->host); goto bail; From b9b17d304d01c0ba9499315c5eff54b9a89e1d08 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 12 Feb 2019 01:32:48 -0500 Subject: [PATCH 09/23] RelNotes/2.21: tweak "--date=auto" mention In the feature that was eventually committed, "--date=auto" doesn't do anything. It was generalized to "--date=auto:". Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- Documentation/RelNotes/2.21.0.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/RelNotes/2.21.0.txt b/Documentation/RelNotes/2.21.0.txt index 8a9a8dd496..77b8d9d221 100644 --- a/Documentation/RelNotes/2.21.0.txt +++ b/Documentation/RelNotes/2.21.0.txt @@ -77,9 +77,9 @@ UI, Workflows & Features * A new date format "--date=human" that morphs its output depending on how far the time is from the current time has been introduced. - "--date=auto" can be used to use this new format when the output is - going to the pager or to the terminal and otherwise the default - format. + "--date=auto:human" can be used to use this new format (or any + existing format) when the output is going to the pager or to the + terminal, and otherwise the default format. Performance, Internal Implementation, Development Support etc. From e9bd4aa026178caeed76ca00d9034c9dfdb3eefb Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 12 Feb 2019 01:33:04 -0500 Subject: [PATCH 10/23] RelNotes/2.21: misc typo/English fixups These are just some small fixes I noticed doing a complete read-through (there are a few cases I left that are incomplete or abbreviated sentences, but I think those are OK in this sort of bullet-list style). Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- Documentation/RelNotes/2.21.0.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/RelNotes/2.21.0.txt b/Documentation/RelNotes/2.21.0.txt index 77b8d9d221..702ebfcdc3 100644 --- a/Documentation/RelNotes/2.21.0.txt +++ b/Documentation/RelNotes/2.21.0.txt @@ -26,7 +26,7 @@ UI, Workflows & Features the fast-export side has been made. * "git push $there $src:$dst" rejects when $dst is not a fully - qualified refname and not clear what the end user meant. The + qualified refname and it is not clear what the end user meant. The codepath has been taught to give a clearer error message, and also guess where the push should go by taking the type of the pushed object into account (e.g. a tag object would want to go under @@ -88,7 +88,7 @@ Performance, Internal Implementation, Development Support etc. (non-)existence of loose objects. * More codepaths have become aware of working with in-core repository - instance other than the default "the_repository". + instances other than the default "the_repository". * The "strncat()" function is now among the banned functions. @@ -125,13 +125,13 @@ Performance, Internal Implementation, Development Support etc. * The in-core repository instances are passed through more codepaths. * Update the protocol message specification to allow only the limited - use of scaled quantities. This is ensure potential compatibility - issues will not go out of hand. + use of scaled quantities. This is to ensure potential compatibility + issues will not get out of hand. * Micro-optimize the code that prepares commit objects to be walked by "git rev-list" when the commit-graph is available. - * "git fetch" and "git upload-pack" learned to send all exchange over + * "git fetch" and "git upload-pack" learned to send all exchanges over the sideband channel while talking the v2 protocol. * The codepath to write out commit-graph has been optimized by From b0fa1a3f997403bc444cd7a65d798185e9d548ca Mon Sep 17 00:00:00 2001 From: "Randall S. Becker" Date: Sat, 9 Feb 2019 13:59:28 -0500 Subject: [PATCH 11/23] test-lib-functions.sh: add generate_zero_bytes function t5318 and t5562 used /dev/zero, which is not portable. This function provides both a fixed block of NUL bytes and an infinite stream of NULs. Signed-off-by: Randall S. Becker Signed-off-by: Junio C Hamano --- t/test-lib-functions.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 92cf8f812c..bbf68712cc 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -116,6 +116,19 @@ remove_cr () { tr '\015' Q | sed -e 's/Q$//' } +# Generate an output of $1 bytes of all zeroes (NULs, not ASCII zeroes). +# If $1 is 'infinity', output forever or until the receiving pipe stops reading, +# whichever comes first. +generate_zero_bytes () { + perl -e 'if ($ARGV[0] == "infinity") { + while (-1) { + print "\0" + } + } else { + print "\0" x $ARGV[0] + }' "$@" +} + # In some bourne shell implementations, the "unset" builtin returns # nonzero status when a variable to be unset was not set in the first # place. From 18a4f6be6b4cfc34de6f80c36ab3ef951a0f7164 Mon Sep 17 00:00:00 2001 From: Duy Nguyen Date: Tue, 12 Feb 2019 21:14:41 +0700 Subject: [PATCH 12/23] git-compat-util: work around fileno(fp) that is a macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On various BSD's, fileno(fp) is implemented as a macro that directly accesses the fields in the FILE * object, which breaks a function that accepts a "void *fp" parameter and calls fileno(fp) and expect it to work. Work it around by adding a compile-time knob FILENO_IS_A_MACRO that inserts a real helper function in the middle of the callchain. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- Makefile | 7 +++++++ compat/fileno.c | 7 +++++++ config.mak.uname | 2 ++ git-compat-util.h | 8 ++++++++ 4 files changed, 24 insertions(+) create mode 100644 compat/fileno.c diff --git a/Makefile b/Makefile index 1a44c811aa..08d9961425 100644 --- a/Makefile +++ b/Makefile @@ -427,6 +427,8 @@ all:: # # Define HAVE_GETDELIM if your system has the getdelim() function. # +# Define FILENO_IS_A_MACRO if fileno() is a macro, not a real function. +# # Define PAGER_ENV to a SP separated VAR=VAL pairs to define # default environment variables to be passed when a pager is spawned, e.g. # @@ -1773,6 +1775,11 @@ ifdef HAVE_WPGMPTR BASIC_CFLAGS += -DHAVE_WPGMPTR endif +ifdef FILENO_IS_A_MACRO + COMPAT_CFLAGS += -DFILENO_IS_A_MACRO + COMPAT_OBJS += compat/fileno.o +endif + ifeq ($(TCLTK_PATH),) NO_TCLTK = NoThanks endif diff --git a/compat/fileno.c b/compat/fileno.c new file mode 100644 index 0000000000..7b105f4cd7 --- /dev/null +++ b/compat/fileno.c @@ -0,0 +1,7 @@ +#define COMPAT_CODE +#include "../git-compat-util.h" + +int git_fileno(FILE *stream) +{ + return fileno(stream); +} diff --git a/config.mak.uname b/config.mak.uname index 3ee7da0e23..23eac5ac9d 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -221,6 +221,7 @@ ifeq ($(uname_S),FreeBSD) HAVE_BSD_KERN_PROC_SYSCTL = YesPlease PAGER_ENV = LESS=FRX LV=-c MORE=FRX FREAD_READS_DIRECTORIES = UnfortunatelyYes + FILENO_IS_A_MACRO = UnfortunatelyYes endif ifeq ($(uname_S),OpenBSD) NO_STRCASESTR = YesPlease @@ -233,6 +234,7 @@ ifeq ($(uname_S),OpenBSD) HAVE_BSD_SYSCTL = YesPlease HAVE_BSD_KERN_PROC_SYSCTL = YesPlease PROCFS_EXECUTABLE_PATH = /proc/curproc/file + FILENO_IS_A_MACRO = UnfortunatelyYes endif ifeq ($(uname_S),MirBSD) NO_STRCASESTR = YesPlease diff --git a/git-compat-util.h b/git-compat-util.h index 09b0102cae..7899f42f5e 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -1220,6 +1220,14 @@ struct tm *git_gmtime_r(const time_t *, struct tm *); #define getc_unlocked(fh) getc(fh) #endif +#ifdef FILENO_IS_A_MACRO +int git_fileno(FILE *stream); +# ifndef COMPAT_CODE +# undef fileno +# define fileno(p) git_fileno(p) +# endif +#endif + /* * Our code often opens a path to an optional file, to work on its * contents when we can successfully open it. We can ignore a failure From 127b48f99fb39736b3b8da1a81ec4f7dcf1d7f63 Mon Sep 17 00:00:00 2001 From: Duy Nguyen Date: Tue, 12 Feb 2019 19:43:23 +0700 Subject: [PATCH 13/23] get_oid_with_context(): match prototype and implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The get_oid_with_context() function is declared to return an enum in cache.h, but defined to return an int in sha1-name.c. The compiler notices this on AIX and rejects the build, since d1dd94b308 (Do not print 'dangling' for cat-file in case of ambiguity - 2019-01-17) was merged. Return the correct type from the implementation to fix this. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- sha1-name.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sha1-name.c b/sha1-name.c index d1cc77c124..6dda2c16df 100644 --- a/sha1-name.c +++ b/sha1-name.c @@ -1820,9 +1820,11 @@ void maybe_die_on_misspelt_object_name(const char *name, const char *prefix) prefix, &oid, &oc); } -int get_oid_with_context(struct repository *repo, const char *str, - unsigned flags, struct object_id *oid, - struct object_context *oc) +enum get_oid_result get_oid_with_context(struct repository *repo, + const char *str, + unsigned flags, + struct object_id *oid, + struct object_context *oc) { if (flags & GET_OID_FOLLOW_SYMLINKS && flags & GET_OID_ONLY_TO_DIE) BUG("incompatible flags for get_sha1_with_context"); From 24b451e77c7d3a62624a309111e8933c7f9f10ba Mon Sep 17 00:00:00 2001 From: "Randall S. Becker" Date: Sat, 9 Feb 2019 13:59:29 -0500 Subject: [PATCH 14/23] t5318: replace use of /dev/zero with generate_zero_bytes There are platforms (e.g. NonStop) that lack /dev/zero; use the generate_zero_bytes helper we just introduced to append stream of NULs at the end of the file. The original, even though it uses "dd seek=... count=..." to make it look like it is overwriting the middle part of an existing file, has truncated the file before this step with another use of "dd", which may make it tricky to see why this rewrite is a correct one. Signed-off-by: Randall S. Becker Signed-off-by: Junio C Hamano --- t/t5318-commit-graph.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh index 16d10ebce8..d4bd1522fe 100755 --- a/t/t5318-commit-graph.sh +++ b/t/t5318-commit-graph.sh @@ -383,7 +383,7 @@ corrupt_graph_and_verify() { cp $objdir/info/commit-graph commit-graph-backup && printf "$data" | dd of="$objdir/info/commit-graph" bs=1 seek="$pos" conv=notrunc && dd of="$objdir/info/commit-graph" bs=1 seek="$zero_pos" count=0 && - dd if=/dev/zero of="$objdir/info/commit-graph" bs=1 seek="$zero_pos" count=$(($orig_size - $zero_pos)) && + generate_zero_bytes $(($orig_size - $zero_pos)) >>"$objdir/info/commit-graph" && test_must_fail git commit-graph verify 2>test_err && grep -v "^+" test_err >err && test_i18ngrep "$grepstr" err From cc95bc20255e5782d2133f6173609efb1f9129c7 Mon Sep 17 00:00:00 2001 From: "Randall S. Becker" Date: Sat, 9 Feb 2019 13:59:30 -0500 Subject: [PATCH 15/23] t5562: replace /dev/zero with a pipe from generate_zero_bytes To help platforms that lack /dev/zero (e.g. NonStop), replace use of /dev/zero to feed "git http-backend" with a pipe of output from the generate_zero_bytes helper. Signed-off-by: Randall S. Becker Signed-off-by: Junio C Hamano --- t/t5562-http-backend-content-length.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t5562-http-backend-content-length.sh b/t/t5562-http-backend-content-length.sh index 90d890d02f..bbadde2c6e 100755 --- a/t/t5562-http-backend-content-length.sh +++ b/t/t5562-http-backend-content-length.sh @@ -143,14 +143,14 @@ test_expect_success GZIP 'push gzipped empty' ' test_expect_success 'CONTENT_LENGTH overflow ssite_t' ' NOT_FIT_IN_SSIZE=$(ssize_b100dots) && - env \ + generate_zero_bytes infinity | env \ CONTENT_TYPE=application/x-git-upload-pack-request \ QUERY_STRING=/repo.git/git-upload-pack \ PATH_TRANSLATED="$PWD"/.git/git-upload-pack \ GIT_HTTP_EXPORT_ALL=TRUE \ REQUEST_METHOD=POST \ CONTENT_LENGTH="$NOT_FIT_IN_SSIZE" \ - git http-backend /dev/null 2>err && + git http-backend >/dev/null 2>err && grep "fatal:.*CONTENT_LENGTH" err ' From f0ec22bb70f66f92dda670a7ee0514b908f2237c Mon Sep 17 00:00:00 2001 From: "Randall S. Becker" Date: Sat, 9 Feb 2019 12:26:11 -0500 Subject: [PATCH 16/23] config.mak.uname: move location of bash on NonStop to CoreUtils The default bash is now officially in /usr/coreutils/bin instead of in /usr/local/bin. This version of bash is more stable and recommended for all use as of the J06.22 and L18.02 operating system revision levels. This new version provides more stability of test results. Signed-off-by: Randall S. Becker Signed-off-by: Junio C Hamano --- config.mak.uname | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/config.mak.uname b/config.mak.uname index 281c547e2f..75ff43f1f3 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -508,9 +508,7 @@ ifeq ($(uname_S),NONSTOP_KERNEL) # RFE 10-120912-4693 submitted to HP NonStop development. NO_SETITIMER = UnfortunatelyYes SANE_TOOL_PATH = /usr/coreutils/bin:/usr/local/bin - SHELL_PATH = /usr/local/bin/bash - # as of H06.25/J06.14, we might better use this - #SHELL_PATH = /usr/coreutils/bin/bash + SHELL_PATH = /usr/coreutils/bin/bash endif ifneq (,$(findstring MINGW,$(uname_S))) pathsep = ; From bb02e7a560de818eac48344717bc52ca51b01908 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 13 Feb 2019 02:19:49 -0800 Subject: [PATCH 17/23] mingw: use a more canonical method to fix the CPU reporting In `git version --build-options`, we report also the CPU, but in Git for Windows we actually cross-compile the 32-bit version in a 64-bit Git for Windows, so we cannot rely on the auto-detected value. In 3815f64b0dd9 (mingw: fix CPU reporting in `git version --build-options`, 2019-02-07), we fixed this by a Windows-only workaround, making use of magic pre-processor constants, which works in GCC, but most likely not all C compilers. As pointed out by Eric Sunshine, there is a better way, anyway: to set the Makefile variable HOST_CPU explicitly for cross-compiled Git. So let's do that! This reverts commit 3815f64b0dd983bdbf9242a0547706d5d81cb3e6 partially. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- compat/mingw.h | 19 ------------------- config.mak.uname | 2 ++ 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/compat/mingw.h b/compat/mingw.h index 363f047df0..8c24ddaa3e 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -6,25 +6,6 @@ typedef _sigset_t sigset_t; #include #include -#ifdef __MINGW64_VERSION_MAJOR -/* - * In Git for Windows, we cannot rely on `uname -m` to report the correct - * architecture: /usr/bin/uname.exe will report the architecture with which the - * current MSYS2 runtime was built, not the architecture for which we are - * currently compiling (both 32-bit and 64-bit `git.exe` is built in the 64-bit - * Git for Windows SDK). - */ -#undef GIT_HOST_CPU -/* This was figured out by looking at `cpp -dM Date: Wed, 13 Feb 2019 22:49:08 +0100 Subject: [PATCH 18/23] rebase: fix regression in rebase.useBuiltin=false test mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix a recently introduced regression in c762aada1a ("rebase -x: sanity check command", 2019-01-29) triggered when running the tests with GIT_TEST_REBASE_USE_BUILTIN=false. See 62c23938fa ("tests: add a special setup where rebase.useBuiltin is off", 2018-11-14) for how that test mode works. As discussed on-list[1] it's not worth it to implement the sanity check in the legacy rebase code, we plan to remove it after the 2.21 release. So let's do the bare minimum to make the tests pass under the GIT_TEST_REBASE_USE_BUILTIN=false special setup. 1. https://public-inbox.org/git/xmqqva1nbeno.fsf@gitster-ct.c.googlers.com/ Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- t/t3404-rebase-interactive.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 52fa41c707..b60b11f9f2 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -149,10 +149,12 @@ test_expect_success 'rebase -i with the exec command checks tree cleanness' ' test_expect_success 'rebase -x with empty command fails' ' test_when_finished "git rebase --abort ||:" && - test_must_fail git rebase -x "" @ 2>actual && + test_must_fail env GIT_TEST_REBASE_USE_BUILTIN=true \ + git rebase -x "" @ 2>actual && test_write_lines "error: empty exec command" >expected && test_i18ncmp expected actual && - test_must_fail git rebase -x " " @ 2>actual && + test_must_fail env GIT_TEST_REBASE_USE_BUILTIN=true \ + git rebase -x " " @ 2>actual && test_i18ncmp expected actual ' @@ -160,7 +162,8 @@ LF=' ' test_expect_success 'rebase -x with newline in command fails' ' test_when_finished "git rebase --abort ||:" && - test_must_fail git rebase -x "a${LF}b" @ 2>actual && + test_must_fail env GIT_TEST_REBASE_USE_BUILTIN=true \ + git rebase -x "a${LF}b" @ 2>actual && test_write_lines "error: exec commands cannot contain newlines" \ >expected && test_i18ncmp expected actual From 8989e1950a845ceeb186d490321a4f917ca4de47 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 13 Feb 2019 18:18:11 -0800 Subject: [PATCH 19/23] Git 2.21-rc1 Signed-off-by: Junio C Hamano --- Documentation/RelNotes/2.21.0.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/RelNotes/2.21.0.txt b/Documentation/RelNotes/2.21.0.txt index 702ebfcdc3..7a49deddf3 100644 --- a/Documentation/RelNotes/2.21.0.txt +++ b/Documentation/RelNotes/2.21.0.txt @@ -180,6 +180,13 @@ Performance, Internal Implementation, Development Support etc. * A flakey "p4" test has been removed. + * The code and tests assume that the system supplied iconv() would + always use BOM in its output when asked to encode to UTF-16 (or + UTF-32), but apparently some implementations output big-endian + without BOM. A compile-time knob has been added to help such + systems (e.g. NonStop) to add BOM to the output to increase + portability. + Fixes since v2.20 ----------------- @@ -439,3 +446,6 @@ Fixes since v2.20 (merge 2e285e7803 tz/gpg-test-fix later to maint). (merge 5427de960b kl/pretty-doc-markup-fix later to maint). (merge 3815f64b0d js/mingw-host-cpu later to maint). + (merge 5fe81438b5 rj/sequencer-sign-off-header-static later to maint). + (merge 18a4f6be6b nd/fileno-may-be-macro later to maint). + (merge 99e9ab54ab kd/t0028-octal-del-is-377-not-777 later to maint). From b83ffbdac349b744b87b658d78b7e0b9b7b51954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 14 Feb 2019 00:44:33 +0100 Subject: [PATCH 20/23] docs/git-rebase: remove redundant entry in incompatible options list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The --autosquash option is implied by the earlier --[no-]autosquash entry in the list. Signed-off-by: Emilio Cobos Álvarez Reviewed-by: Elijah Newren Signed-off-by: Junio C Hamano --- Documentation/git-rebase.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index dff17b3178..186c5d0cf6 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -535,7 +535,6 @@ Flags only understood by the interactive backend: * --interactive * --exec * --keep-empty - * --autosquash * --edit-todo * --root when used in combination with --onto From c777cd81ef3b9eeb3d067efe9f3bee1949328803 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 14 Feb 2019 12:16:20 -0800 Subject: [PATCH 21/23] t1404: do not rely on the exact phrasing of strerror() Not even in C locale, it is wrong to expect that the exact phrasing "File exists" is used to show EEXIST. Reported-by: Randall S. Becker Helped-by: Duy Nguyen Helped-by: Jeff King Signed-off-by: Junio C Hamano --- t/t1404-update-ref-errors.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh index 3a887b5113..482d24fa09 100755 --- a/t/t1404-update-ref-errors.sh +++ b/t/t1404-update-ref-errors.sh @@ -614,7 +614,7 @@ test_expect_success 'delete fails cleanly if packed-refs file is locked' ' test_when_finished "rm -f .git/packed-refs.lock" && test_must_fail git update-ref -d $prefix/foo >out 2>err && git for-each-ref $prefix >actual && - test_i18ngrep "Unable to create $Q.*packed-refs.lock$Q: File exists" err && + test_i18ngrep "Unable to create $Q.*packed-refs.lock$Q: " err && test_cmp unchanged actual ' From e18edc76d60f804419ed7d585011766fba1a5912 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Thu, 14 Feb 2019 01:35:13 -0500 Subject: [PATCH 22/23] t/lib-httpd: pass GIT_TEST_SIDEBAND_ALL through Apache 07c3c2aa16 ("tests: define GIT_TEST_SIDEBAND_ALL", 2019-01-16) added GIT_TEST_SIDEBAND_ALL to the apache.conf PassEnv list. Avoid warnings from Apache when the variable is unset, as we do for GIT_VALGRIND* and GIT_TRACE, from f628825481 ("t/lib-httpd: handle running under --valgrind", 2012-07-24) and 89c57ab3f0 ("t: pass GIT_TRACE through Apache", 2015-03-13), respectively. Signed-off-by: Todd Zullinger Signed-off-by: Junio C Hamano --- t/lib-httpd.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh index a8729f8232..3eb665f4d6 100644 --- a/t/lib-httpd.sh +++ b/t/lib-httpd.sh @@ -91,6 +91,7 @@ HTTPD_DOCUMENT_ROOT_PATH=$HTTPD_ROOT_PATH/www # hack to suppress apache PassEnv warnings GIT_VALGRIND=$GIT_VALGRIND; export GIT_VALGRIND GIT_VALGRIND_OPTIONS=$GIT_VALGRIND_OPTIONS; export GIT_VALGRIND_OPTIONS +GIT_TEST_SIDEBAND_ALL=$GIT_TEST_SIDEBAND_ALL; export GIT_TEST_SIDEBAND_ALL GIT_TRACE=$GIT_TRACE; export GIT_TRACE if ! test -x "$LIB_HTTPD_PATH" From 29d03f84a1bd0e27ab172bcd80382c5e2e8df1ec Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Thu, 14 Feb 2019 12:25:41 -0800 Subject: [PATCH 23/23] git-rebase.txt: update to reflect merge now implemented on sequencer Since commit 8fe9c3f21dff (Merge branch 'en/rebase-merge-on-sequencer', 2019-02-06), --merge now uses the interactive backend (and matches its behavior) so there is no separate merge backend anymore. Fix an oversight in the docs that should have been updated with the previous change. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- Documentation/git-rebase.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 8bfa36a185..29307b1340 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -549,8 +549,6 @@ commit started empty (had no changes relative to its parent to start with) or ended empty (all changes were already applied upstream in other commits). -The merge backend does the same. - The interactive backend drops commits by default that started empty and halts if it hits a commit that ended up empty. The `--keep-empty` option exists for the interactive backend to allow