Re: [PATCH 2/3] rebase --rebase-merges: add support for octopus merges

2018-07-11 Thread Eric Sunshine
On Wed, Jul 11, 2018 at 8:38 AM Johannes Schindelin via GitGitGadget wrote: > Previously, we introduced the `merge` command for use in todo lists, > to allow to recreate and modify branch topology. > > For ease of implementation, and to make review easier, the initial > implementation only

Re: [PATCH 1/2] t1015: demonstrate directory/file conflict recovery failures

2018-07-11 Thread Eric Sunshine
On Tue, Jul 10, 2018 at 10:18:33PM -0700, Elijah Newren wrote: > Several "recovery" commands outright fail or do not fully recover > when directory-file conflicts are present. This includes: > * git read-tree --reset HEAD > * git am --skip > * git am --abort > * git merge --abort > *

[PATCH v2 06/10] t/chainlint: add chainlint "nested subshell" test cases

2018-07-11 Thread Eric Sunshine
r, which is important since the linter's implementation language ('sed') does not necessarily lend itself to easy comprehension. Signed-off-by: Eric Sunshine --- t/chainlint/block.expect | 12 +++ t/chainlint/block.test| 15 + ...ti-lin

[PATCH v2 01/10] t/test-lib: teach --chain-lint to detect broken &&-chains in subshells

2018-07-11 Thread Eric Sunshine
pite the ")" at the end of line. Due to limitations of the tool used ('sed') and its inherent line-by-line processing, only subshells one level deep are handled, as well as one-liner subshells one level below that. Subshells deeper than that or multi-line subshells at level two are

[PATCH v2 05/10] t/chainlint: add chainlint "one-liner" test cases

2018-07-11 Thread Eric Sunshine
r, which is important since the linter's implementation language ('sed') does not necessarily lend itself to easy comprehension. Signed-off-by: Eric Sunshine --- t/chainlint/negated-one-liner.expect | 5 + t/chainlint/negated-one-liner.test| 7 +++ t/chainlint/one-liner.expect

[PATCH v2 02/10] t/Makefile: add machinery to check correctness of chainlint.sed

2018-07-11 Thread Eric Sunshine
protect against this possibility, tests checking correctness of the linter itself will be added. As preparation, add a new makefile "check-chainlint" target and associated machinery. Signed-off-by: Eric Sunshine --- t/.gitignore | 1 + t/Makefile | 25 + 2

[PATCH v2 08/10] t/chainlint: add chainlint "cuddled" test cases

2018-07-11 Thread Eric Sunshine
r, which is important since the linter's implementation language ('sed') does not necessarily lend itself to easy comprehension. Signed-off-by: Eric Sunshine --- t/chainlint/cuddled-if-then-else.expect | 7 +++ t/chainlint/cuddled-if-then-else.test | 7 +++ t/chainlint/cuddled-loo

[PATCH v2 07/10] t/chainlint: add chainlint "loop" and "conditional" test cases

2018-07-11 Thread Eric Sunshine
r, which is important since the linter's implementation language ('sed') does not necessarily lend itself to easy comprehension. Signed-off-by: Eric Sunshine --- t/chainlint/case.expect | 19 +++ t/chainlint/case.test | 23 +++ t/chainl

[PATCH v2 09/10] t/chainlint: add chainlint "complex" test cases

2018-07-11 Thread Eric Sunshine
r, which is important since the linter's implementation language ('sed') does not necessarily lend itself to easy comprehension. Signed-off-by: Eric Sunshine --- .../close-nested-and-parent-together.expect | 4 t/chainlint/close-nested-and-parent-together.test | 3 +++ t/chainlint

[PATCH v2 10/10] t/chainlint: add chainlint "specialized" test cases

2018-07-11 Thread Eric Sunshine
r, which is important since the linter's implementation language ('sed') does not necessarily lend itself to easy comprehension. Signed-off-by: Eric Sunshine --- t/chainlint/bash-array.expect | 10 ++ t/chainlint/bash-array.test| 12 t/chainlint/p4-filespec.expect | 4

[PATCH v2 04/10] t/chainlint: add chainlint "whitespace" test cases

2018-07-11 Thread Eric Sunshine
r, which is important since the linter's implementation language ('sed') does not necessarily lend itself to easy comprehension. Signed-off-by: Eric Sunshine --- t/chainlint/blank-line.expect| 4 t/chainlint/blank-line.test | 10 ++ t/chainlint/comment.expect

[PATCH v2 00/10] detect broken &&-chains in subshells

2018-07-11 Thread Eric Sunshine
.ga17...@peff.net/ [3]: https://public-inbox.org/git/20180702002405.3042-1-sunsh...@sunshineco.com/ [4]: https://public-inbox.org/git/xmqqwouljr5e@gitster-ct.c.googlers.com/ Eric Sunshine (10): t/test-lib: teach --chain-lint to detect broken &&-chains in subshells t/Makefile: add machinery to che

[PATCH v2 03/10] t/chainlint: add chainlint "basic" test cases

2018-07-11 Thread Eric Sunshine
r, which is important since the linter's implementation language ('sed') does not necessarily lend itself to easy comprehension. Signed-off-by: Eric Sunshine --- t/chainlint/arithmetic-expansion.expect | 9 + t/chainlint/arithmetic-expansion.test | 11 ++ t/chainlint/broken-chai

Re: [PATCH 4/8] gpg-interface: introduce an abstraction for multiple gpg formats

2018-07-09 Thread Eric Sunshine
On Mon, Jul 9, 2018 at 4:22 AM Henning Schild wrote: > Am Fri, 6 Jul 2018 10:24:58 -0700 > schrieb Junio C Hamano : > > Martin Ă…gren writes: > > >> +struct gpg_format_data gpg_formats[] = { > > >> + { .format = "PGP", .program = "gpg", > > >> + .extra_args_verify = {

Re: [PATCH v4 1/4] rebase: start implementing it as a builtin

2018-07-09 Thread Eric Sunshine
On Mon, Jul 9, 2018 at 3:59 AM Andrei Rybak wrote: > On 2018-07-08 20:01, Pratik Karki wrote: > > +static int use_builtin_rebase(void) > > +{ > > + struct child_process cp = CHILD_PROCESS_INIT; > > + struct strbuf out = STRBUF_INIT; > > + int ret; > > + > > + argv_array_pushl(, >

Re: [PATCH 01/17] cache: update object ID functions for the_hash_algo

2018-07-08 Thread Eric Sunshine
On Sun, Jul 8, 2018 at 10:38 PM Jacob Keller wrote: > On Sun, Jul 8, 2018 at 4:39 PM brian m. carlson > wrote: > > static inline int oidcmp(const struct object_id *oid1, const struct > > object_id *oid2) > > { > > - return hashcmp(oid1->hash, oid2->hash); > > + return

Re: [RFC PATCH 4/6] sequencer.c: avoid empty statements at top level

2018-07-08 Thread Eric Sunshine
On Sun, Jul 8, 2018 at 10:44 AM Beat Bolli wrote: > The marco GIT_PATH_FUNC expands to a complete statement including the > semicolon. Remove two extra trailing semicolons. > > Signed-off-by: Beat Bolli > --- > sequencer.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) While

Re: Croatian version of Pro Git book

2018-07-08 Thread Eric Sunshine
On Sun, Jul 8, 2018 at 4:23 AM josip zamboni wrote: > I've noticed there is no Croatian version of Pro Git Book and I'd like > to produce it. If you agree, do let me know the contact details of > person(s) I should be dealing with. The Pro Git book is a separate project from Git itself. They

Re: de-alphabetizing the documentation

2018-07-06 Thread Eric Sunshine
On Fri, Jul 06, 2018 at 02:16:00PM -0700, Jonathan Nieder wrote: > Frederick Eaton wrote: > > I wonder if someone familiar with Git could list the commands in an > > order which makes more sense for learning, for example in the order in > > which they were invented by Git developers, > > Alas,

Re: [PATCH 2/3] send-email: accept long lines with suitable transfer encoding

2018-07-06 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 10:24 PM brian m. carlson wrote: > With --validate (which is the default), we warn about lines exceeding > 998 characters due to the limits specified in RFC 5321. However, if > we're using a suitable transfer encoding (quoted-printable or base64), > we're guaranteed not to

Re: [PATCH 1/3] send-email: add an auto option for transfer encoding

2018-07-06 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 10:24 PM brian m. carlson wrote: > For most patches, using a transfer encoding of 8bit provides good > compatibility with most servers and makes it as easy as possible to view > patches. However, there are some patches for which 8bit is not a valid > encoding: RFC 5321

Re: [PATCH v3 24/24] midx: clear midx on repack

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:54 PM Derrick Stolee wrote: > If a 'git repack' command replaces existing packfiles, then we must > clear the existing multi-pack-index before moving the packfiles it > references. > > Signed-off-by: Derrick Stolee > --- > builtin/repack.c | 8 > midx.c

Re: [PATCH v3 17/24] midx: prepare midxed_git struct

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:54 PM Derrick Stolee wrote: > midx: prepare midxed_git struct What's a "midxed_git"? I don't see it in the code anywhere. > Signed-off-by: Derrick Stolee

Re: [PATCH v3 16/24] config: create core.multiPackIndex setting

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:54 PM Derrick Stolee wrote: > The core.multiPackIndex config setting controls the multi-pack- > index (MIDX) feature. If false, the setting will disable all reads > from the multi-pack-index file. > > Add comparison commands in t5319-multi-pack-index.sh to check > typical

Re: [PATCH v3 15/24] midx: write object offsets

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:54 PM Derrick Stolee wrote: > The final pair of chunks for the multi-pack-index file stores the object > offsets. We default to using 32-bit offsets as in the pack-index version > 1 format, but if there exists an offset larger than 32-bits, we use a > trick similar to the

Re: [PATCH v3 07/24] multi-pack-index: expand test data

2018-07-05 Thread Eric Sunshine
On Fri, Jul 6, 2018 at 12:36 AM Eric Sunshine wrote: > On Thu, Jul 5, 2018 at 8:54 PM Derrick Stolee wrote: > > +test_expect_success 'write midx with one v1 pack' ' > > + pack=$(git pack-objects --index-version=1 pack/test > + test_when_finished rm pack/test-$p

Re: [PATCH v3 06/24] multi-pack-index: load into memory

2018-07-05 Thread Eric Sunshine
On Fri, Jul 6, 2018 at 12:19 AM Eric Sunshine wrote: > On Thu, Jul 5, 2018 at 8:53 PM Derrick Stolee wrote: > > +midx_read_expect () { > > + cat >expect <<-EOF > > + header: 4d494458 1 0 0 > > + object_dir: . > > + EOF

Re: [PATCH v3 13/24] midx: write object ids in a chunk

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:54 PM Derrick Stolee wrote: > Signed-off-by: Derrick Stolee > --- > diff --git a/midx.c b/midx.c > @@ -18,9 +18,10 @@ > @@ -384,6 +391,32 @@ static size_t write_midx_pack_names(struct hashfile *f, > +static size_t write_midx_oid_lookup(struct hashfile *f, unsigned char

Re: [PATCH v3 11/24] midx: read pack names into array

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:54 PM Derrick Stolee wrote: > Signed-off-by: Derrick Stolee > --- > diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh > @@ -8,8 +8,13 @@ midx_read_expect () { > cat >expect <<-EOF Broken &&-chain. > header: 4d494458 1 1 $NUM_PACKS >

Re: [PATCH v3 07/24] multi-pack-index: expand test data

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:54 PM Derrick Stolee wrote: > multi-pack-index: expand test data Since this patch is touching only t5319, a more typical title would be: t5319: expand test data > As we build the multi-pack-index file format, we want to test the format > on real repoasitories. Add

Re: [PATCH v3 06/24] multi-pack-index: load into memory

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:53 PM Derrick Stolee wrote: > Create a new multi_pack_index struct for loading multi-pack-indexes into > memory. Create a test-tool builtin for reading basic information about > that multi-pack-index to verify the correct data is written. > > Signed-off-by: Derrick Stolee

Re: [PATCH v3 04/24] multi-pack-index: add 'write' verb

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:53 PM Derrick Stolee wrote: > In anticipation of writing multi-pack-indexes, add a > 'git multi-pack-index write' subcommand and send the options to a > write_midx_file() method. Since the 'write' command is a no-op at this point, perhaps say so in the commit message.

Re: [PATCH v3 03/24] multi-pack-index: add builtin

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:53 PM Derrick Stolee wrote: > This new 'git multi-pack-index' builtin will be the plumbing access > for writing, reading, and checking multi-pack-index files. The > initial implementation is a no-op. > > Signed-off-by: Derrick Stolee > --- > diff --git

Re: [PATCH v2 06/24] multi-pack-index: load into memory

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 10:20 AM Derrick Stolee wrote: > On 6/25/2018 3:38 PM, Junio C Hamano wrote: > While I don't use substitutions in this patch, I do use them in later > patches. Here is the final version of this method: > > midx_read_expect () { > NUM_PACKS=$1 >

Re: [PATCH] ls-tree: make optional

2018-07-04 Thread Eric Sunshine
On Tue, Jul 3, 2018 at 7:57 PM Joshua Nelson wrote: > Use syntax similar to `git-checkout` to make optional for > `ls-tree`. If is omitted, default to HEAD. Infer arguments as > follows: > > 1. If args start with '--', assume to be HEAD > 2. If exactly one arg precedes '--', treat the argument

Re: [PATCH] ls-tree: make optional

2018-07-04 Thread Eric Sunshine
On Tue, Jul 3, 2018 at 8:05 PM Joshua Nelson wrote: > Is it customary to send a new patch or second patch that builds on the > first? It depends what you mean. If there were problems with a version of a patch you sent, then you "re-roll", which means you re-send the patch in its entirety as if

Re: [PATCH 1/3] ls-tree: make optional

2018-07-04 Thread Eric Sunshine
On Tue, Jul 3, 2018 at 7:15 PM Joshua Nelson wrote: > On 07/03/2018 03:15 AM, Eric Sunshine wrote: > >> + /* taken from checkout.c; > >> +* we have a simpler case because we never create a branch > >> */ > > > > Howeve

Re: What's cooking in git.git (Jun 2018, #07; Thu, 28)

2018-07-03 Thread Eric Sunshine
On Tue, Jul 3, 2018 at 2:31 PM Elijah Newren wrote: > On Thu, Jun 28, 2018 at 2:40 PM, Junio C Hamano wrote: > > * ds/multi-pack-index (2018-06-25) 24 commits > > pu fails to build for me (with the standard 'make DEVELOPER=1 ...'), > and it appears to come from this series: > > midx.c:567:15:

Re: [PATCH 3/3] ls-tree: add unit tests for arguments

2018-07-03 Thread Eric Sunshine
On Mon, Jul 2, 2018 at 11:58 PM Joshua Nelson wrote: > Signed-off-by: Joshua Nelson > --- > diff --git t/t3104-ls-tree-optional-args.sh t/t3104-ls-tree-optional-args.sh > @@ -0,0 +1,43 @@ > +test_expect_success 'initial setup' ' > +echo hi > test && cp test test2 && git add test test2 && git

Re: [PATCH 2/3] ls-tree: update usage info

2018-07-03 Thread Eric Sunshine
On Mon, Jul 2, 2018 at 11:58 PM Joshua Nelson wrote: > show [tree-ish] and [--] as optional > --- > diff --git builtin/ls-tree.c builtin/ls-tree.c > @@ -26,7 +26,7 @@ static int chomp_prefix; > static const char * const ls_tree_usage[] = { > - N_("git ls-tree [] [...]"), > +

Re: [PATCH 1/3] ls-tree: make optional

2018-07-03 Thread Eric Sunshine
Thanks for contributing to Git. As this seems to be your first submission to the project, don't be alarmed by the extent and nature of the review comments. They are intended to help you polish the submission, and are not meant with ill-intent. On Mon, Jul 2, 2018 at 11:58 PM Joshua Nelson wrote:

Re: [PATCH 3/3] ref-filter: avoid backend filtering with --ignore-case

2018-07-02 Thread Eric Sunshine
On Mon, Jul 2, 2018 at 5:12 PM Jeff King wrote: > When for-each-ref is used with --ignore-case, we expect > match_name_as_path() to do a case-insensitive match. But > there's an extra layer of filtering that happens before we > even get there. Since commit cfe004a5a9 (ref-filter: limit >

Re: [PATCH 00/25] fix buggy tests, modernize tests, fix broken &&-chains

2018-07-02 Thread Eric Sunshine
On Mon, Jul 2, 2018 at 2:27 PM Stefan Beller wrote: > On Sun, Jul 1, 2018 at 5:24 PM Eric Sunshine wrote: > > This series fixes several buggy tests which went undetected due to > > broken &&-chains in subshells, modernizes some tests to take advantage > > of te

Re: [PATCH 12/25] t7810: use test_expect_code() instead of hand-rolled comparison

2018-07-02 Thread Eric Sunshine
On Mon, Jul 2, 2018 at 2:14 PM Stefan Beller wrote: > On Sun, Jul 1, 2018 at 5:25 PM Eric Sunshine wrote: > > test_expect_success 'grep from a subdirectory to search wider area (2)' ' > > mkdir -p s && > > ( > > - cd s || ex

Re: [PATCH 01/25] t: use test_might_fail() instead of manipulating exit code manually

2018-07-02 Thread Eric Sunshine
On Mon, Jul 2, 2018 at 1:44 PM Stefan Beller wrote: > > diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh > > test_expect_success 'diff --no-index with binary creation' ' > > echo Q | q_to_nul >binary && > > - (: hide error code from diff, which just indicates

[PATCH 09/25] t6036: fix broken "merge fails but has appropriate contents" tests

2018-07-01 Thread Eric Sunshine
These tests reference non-existent object "c" when they really mean to be referencing "C", however, these errors went unnoticed due to a broken &&-chain later in the tests. Fix these errors, as well as the broken &&-chains behind which they hid. Reviewed-by

[PATCH 13/25] t9001: fix broken "invoke hook" test

2018-07-01 Thread Eric Sunshine
git-send-email to abort with a particular error message. A command which is expected to fail should be run with 'test_must_fail', however, the test neglects to do so. Fix this problem, as well as the broken &&-chain behind which the problem hid. Signed-off-by: Eric Sunshine --- t/t9001-s

[PATCH 06/25] t5405: use test_must_fail() instead of checking exit code manually

2018-07-01 Thread Eric Sunshine
&&-chain. Signed-off-by: Eric Sunshine --- t/t5405-send-pack-rewind.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/t/t5405-send-pack-rewind.sh b/t/t5405-send-pack-rewind.sh index 4bda18a662..235fb7686a 100755 --- a/t/t5405-send-pack-rewind.sh +++ b/t/t5405-send-pac

[PATCH 20/25] t4000-t4999: fix broken &&-chains

2018-07-01 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t4001-diff-rename.sh | 2 +- t/t4024-diff-optimize-common.sh | 16 t/t4025-hunk-header.sh | 8 t/t4041-diff-submodule-option.sh | 4 ++-- t/t4060-diff-submodule

[PATCH 19/25] t3030: fix broken &&-chains

2018-07-01 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t3030-merge-recursive.sh | 340 ++--- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh index 3563e77b37..ff641b348a 100755 --- a/t/t3030-merge-recursive.sh

[PATCH 14/25] t9814: simplify convoluted check that command correctly errors out

2018-07-01 Thread Eric Sunshine
This test uses a convoluted method to verify that "p4 help" errors out when asked for help about an unknown command. In doing so, it intentionally breaks the &&-chain. Simplify by employing the typical "! command" idiom and a normal &&-chain instead. Signed-off

[PATCH 18/25] t3000-t3999: fix broken &&-chains

2018-07-01 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t3000-ls-files-others.sh | 2 +- t/t3006-ls-files-long.sh| 2 +- t/t3008-ls-files-lazy-init-name-hash.sh | 8 t/t3050-subprojects-fetch.sh| 8 t/t3210-pack-refs.sh| 4 ++-- t/t3301

[PATCH 21/25] t5000-t5999: fix broken &&-chains

2018-07-01 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t5300-pack-object.sh | 2 +- t/t5302-pack-index.sh | 2 +- t/t5401-update-hooks.sh| 4 ++-- t/t5500-fetch-pack.sh | 2 +- t/t5505-remote.sh | 2 +- t/t5512-ls-remote.sh | 4 ++-- t/t5516-fetch

[PATCH 17/25] t2000-t2999: fix broken &&-chains

2018-07-01 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t2103-update-index-ignore-missing.sh | 2 +- t/t2202-add-addremove.sh | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/t/t2103-update-index-ignore-missing.sh b/t/t2103-update-index-ignore-missing.sh index

[PATCH 22/25] t6000-t6999: fix broken &&-chains

2018-07-01 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t6010-merge-base.sh| 2 +- t/t6029-merge-subtree.sh | 16 t/t6036-recursive-corner-cases.sh| 6 +++--- t/t6042-merge-rename-corner-cases.sh | 8 t/t6043-merge-rename-directories.sh | 2 +- 5 files

[PATCH 23/25] t7000-t7999: fix broken &&-chains

2018-07-01 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t7001-mv.sh | 2 +- t/t7201-co.sh | 40 +- t/t7400-submodule-basic.sh | 2 +- t/t7406-submodule-update.sh| 6 ++-- t/t7408-submodule-reference.sh | 2 +- t/t7501-commit.sh | 52

[PATCH 04/25] t: drop unnecessary terminating semicolon in subshell

2018-07-01 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t3102-ls-tree-wildcards.sh| 2 +- t/t4010-diff-pathspec.sh| 4 ++-- t/t9400-git-cvsserver-server.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t3102-ls-tree-wildcards.sh b/t/t3102-ls-tree-wildcards.sh index e804377f1c

[PATCH 00/25] fix buggy tests, modernize tests, fix broken &&-chains

2018-07-01 Thread Eric Sunshine
I stripped out all the noisy "printf '%s\n'" to test_write_lines() differences, of which there were a lot, since they drowned out the other more significant changes. Thanks to Elijah, Hannes, Jonathan Nieder, Jonathan Tan, Junio, Luke, Peff, and Stefan for comments on [1]. [1]: https://publ

[PATCH 01/25] t: use test_might_fail() instead of manipulating exit code manually

2018-07-01 Thread Eric Sunshine
g manual exit code management with test_might_fail() and a normal &&-chain. Signed-off-by: Eric Sunshine --- t/t1507-rev-parse-upstream.sh | 6 +++--- t/t1700-split-index.sh| 2 +- t/t4012-diff-binary.sh| 6 ++ t/t5400-send-pack.sh | 4 ++-- 4 files changed, 8 i

[PATCH 03/25] t: use sane_unset() rather than 'unset' with broken &&-chain

2018-07-01 Thread Eric Sunshine
These tests intentionally break the &&-chain after using 'unset' since they don't know if 'unset' will succeed or fail and don't want a local 'unset' failure to fail the test overall. We can do better by using sane_unset(), which can be linked into the &&-chain as usual. Sig

[PATCH 12/25] t7810: use test_expect_code() instead of hand-rolled comparison

2018-07-01 Thread Eric Sunshine
This test manually checks the exit code of git-grep for a particular value. In doing so, it intentionally breaks the &&-chain. Modernize the test by taking advantage of test_expect_code() and a normal &&-chain. Signed-off-by: Eric Sunshine --- t/t7810-grep.sh | 7 +++ 1

[PATCH 24/25] t9000-t9999: fix broken &&-chains

2018-07-01 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t9001-send-email.sh | 6 +++--- t/t9100-git-svn-basic.sh | 2 +- t/t9101-git-svn-props.sh | 2 +- t/t9122-git-svn-author.sh | 6 +++--- t/t9129-git-svn-i18n

[PATCH 05/25] t/lib-submodule-update: fix "absorbing" test

2018-07-01 Thread Eric Sunshine
rproject. Fix this by removing the submodule content check, which also happens to be the line that broke the &&-chain. While at it, fix broken &&-chains in a couple neighboring tests. Helped-by: Stefan Beller Signed-off-by: Eric Sunshine Signed-off-by: Stefan Beller Signed-off-b

[PATCH 25/25] t9119: fix broken &&-chains

2018-07-01 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t9119-git-svn-info.sh | 120 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/t/t9119-git-svn-info.sh b/t/t9119-git-svn-info.sh index 88241baee3..8201c3e808 100755 --- a/t/t9119-git-svn-info.sh +++ b/t

[PATCH 02/25] t: use test_write_lines() instead of series of 'echo' commands

2018-07-01 Thread Eric Sunshine
These tests employ a noisy subshell (with missing &&-chain) to feed input into Git commands or files: (echo a; echo b; echo c) | git some-command ... Simplify by taking advantage of test_write_lines(): test_write_lines a b c | git some-command ... Signed-off-by: Eric Sunshine

[PATCH 10/25] t7201: drop pointless "exit 0" at end of subshell

2018-07-01 Thread Eric Sunshine
erations of the loop succeeded. The &&-chain is broken between the for-loop and the "exit 0". Rather than fixing the &&-chain, just drop the pointless "exit 0". Signed-off-by: Eric Sunshine --- t/t7201-co.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/t/

[PATCH 16/25] t1000-t1999: fix broken &&-chains

2018-07-01 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t1004-read-tree-m-u-wf.sh | 8 t/t1005-read-tree-reset.sh | 10 +- t/t1020-subdirectory.sh | 2 +- t/t1050-large.sh| 6 +++--- t/t1411-reflog-show.sh | 6 +++--- t/t1512-rev

[PATCH 08/25] t5505: modernize and simplify hard-to-digest test

2018-07-01 Thread Eric Sunshine
, however, a failure between the initial actions and the cleanup will prevent the cleanup from taking place. Fix these problems by modernizing and simplifying the test and by using test_when_finished() for the cleanup action. Signed-off-by: Eric Sunshine --- t/t5505-remote.sh | 8 ++-- 1 file

[PATCH 11/25] t7400: fix broken "submodule add/reconfigure --force" test

2018-07-01 Thread Eric Sunshine
mand fails. Second, it then tries configuring a submodule with a path which is .gitignore'd, which is disallowed. This restriction can be overridden with --force, but the test neglects to use that option. Fix both problems, as well as the broken &&-chain behind which they hid. Reviewed-by: S

[PATCH 07/25] t5406: use write_script() instead of birthing shell script manually

2018-07-01 Thread Eric Sunshine
. Signed-off-by: Eric Sunshine --- t/t5406-remote-rejects.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/t5406-remote-rejects.sh b/t/t5406-remote-rejects.sh index 59e80a5ea2..ff06f99649 100755 --- a/t/t5406-remote-rejects.sh +++ b/t/t5406-remote-rejects.sh @@ -6,8 +6,9

[PATCH 15/25] t0000-t0999: fix broken &&-chains

2018-07-01 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t-basic.sh | 2 +- t/t0003-attributes.sh | 24 t/t0021-conversion.sh | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/t/t-basic.sh b/t/t-basic.sh index af61d083b4..34859fe4a5 100755 --- a/t

Re: [PATCH] t/lib-submodule-update: fix absorbing test

2018-06-27 Thread Eric Sunshine
On Wed, Jun 27, 2018 at 2:31 PM Stefan Beller wrote: > From: Eric Sunshine > > This test has been dysfunctional since it was added by 259f3ee296 > (lib-submodule-update.sh: define tests for recursing into submodules, > 2017-03-14), however, problems went unnoticed due to a

Re: [PATCH v2 1/2] t3418: add testcase showing problems with rebase -i and strategy options

2018-06-27 Thread Eric Sunshine
On Wed, Jun 27, 2018 at 2:17 PM Johannes Sixt wrote: > Pitfalls ahead! > > PATH=... git rebase ... > > is OK, but > > PATH=... test_must_fail git rebase ... > > is not; the latter requires the subshell, otherwise the modified PATH > variable survives the command because

Re: [PATCH v2 1/2] t3418: add testcase showing problems with rebase -i and strategy options

2018-06-27 Thread Eric Sunshine
On Wed, Jun 27, 2018 at 3:36 AM Elijah Newren wrote: > We are not passing the same args to merge strategies when we are doing an > --interactive rebase as we do with a --merge rebase. The merge strategy > should not need to be aware of which type of rebase is in effect. Add a > testcase which

Re: [PATCH 29/29] t/test-lib: teach --chain-lint to detect broken &&-chains in subshells

2018-06-27 Thread Eric Sunshine
On Wed, Jun 27, 2018 at 2:27 AM Johannes Sixt wrote: > Am 27.06.2018 um 04:15 schrieb Elijah Newren: > > On Tue, Jun 26, 2018 at 2:01 PM, Jeff King wrote: > >> On Tue, Jun 26, 2018 at 04:46:18PM -0400, Eric Sunshine wrote: > >>> Some of these dangers can be de-tho

Re: [PATCH 29/29] t/test-lib: teach --chain-lint to detect broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
On Tue, Jun 26, 2018 at 5:33 PM Elijah Newren wrote: > On Tue, Jun 26, 2018 at 1:22 PM, Jeff King wrote: > > Another option is to not enable this slightly-more-dangerous linting by > > default. But that would probably rob it of its usefulness, since it > > would just fall to some brave soul to

Re: [PATCH 00/29] t: detect and fix broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
On Tue, Jun 26, 2018 at 3:38 PM Junio C Hamano wrote: > I first looked at 29/29 and got heavily inclined to reject that > step, and then continued reading from 1/29 to around 15/29. > > I like these earlier changes that fix existing breakage, of course. > I also like many of the changes that

Re: [PATCH 29/29] t/test-lib: teach --chain-lint to detect broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
On Tue, Jun 26, 2018 at 5:01 PM Jeff King wrote: > On Tue, Jun 26, 2018 at 04:46:18PM -0400, Eric Sunshine wrote: > > Some of these dangers can be de-thoothed during the linting phase by > > defining do-nothing shell functions: > > > > cp () { :; } >

Re: [PATCH 29/29] t/test-lib: teach --chain-lint to detect broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
On Tue, Jun 26, 2018 at 4:22 PM Jeff King wrote: > So obviously that means "I don't think there's a good solution with this > approach". > > That whole final patch simultaneously impresses and nauseates me. Your > commit message says "no attempt is made at properly parsing shell code", > but we

Re: [PATCH 29/29] t/test-lib: teach --chain-lint to detect broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
On Tue, Jun 26, 2018 at 4:17 PM Jeff King wrote: > On Tue, Jun 26, 2018 at 03:52:54PM -0400, Eric Sunshine wrote: > > So, this isn't a new problem introduced by this series, though this > > series may exacerbate it. > > Whereas once you start collapsing subshells into

Re: [PATCH 14/29] t: drop subshell with missing &&-chain in favor of simpler construct

2018-06-26 Thread Eric Sunshine
On Tue, Jun 26, 2018 at 3:31 PM Junio C Hamano wrote: > Eric Sunshine writes: > > These tests employ a noisy subshell (with missing &&-chain) to feed > > input into Git commands: > > > > (echo a; echo b; echo c) | git some-command ... > > > >

Re: [PATCH 29/29] t/test-lib: teach --chain-lint to detect broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
On Tue, Jun 26, 2018 at 3:15 PM Junio C Hamano wrote: > so, with --chain-lint, we would transform this > > mkdir -p a/b/c && > ( > cd a/b/c > rm -fr ../../* > ) && > statement 4 > > into this sequence > > (exit $sentinel) &&

Re: [PATCH 17/29] t: use test_must_fail() instead of checking exit code manually

2018-06-26 Thread Eric Sunshine
On Tue, Jun 26, 2018 at 2:06 PM Johannes Sixt wrote: > Am 26.06.2018 um 11:21 schrieb Eric Sunshine: > >> On Tue, Jun 26, 2018 at 12:29 AM, Eric Sunshine > >> wrote: > >>> + p4 help client && > >>> + test_

Re: [PATCH 00/29] t: detect and fix broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
On Tue, Jun 26, 2018 at 5:20 AM Elijah Newren wrote: > On Tue, Jun 26, 2018 at 12:29 AM, Eric Sunshine > wrote: > > Aside from identifying a rather significant number of &&-chain breaks, > > repairing those broken chains uncovered genuine bugs in several tests > &

Re: [PATCH 17/29] t: use test_must_fail() instead of checking exit code manually

2018-06-26 Thread Eric Sunshine
On Tue, Jun 26, 2018 at 4:58 AM Elijah Newren wrote: > On Tue, Jun 26, 2018 at 12:29 AM, Eric Sunshine > wrote: > > [...] Therefore, > > replace the manual exit code management with test_must_fail() and a > > normal &&-chain. > > > > Signed-off-b

[PATCH 11/29] t9104: use "{...}" block around "||" expression rather than subshell

2018-06-26 Thread Eric Sunshine
..}" block instead of a subshell. Therefore, rather than adding "(... || svn ...)" as a yet another --chain-lint special case, follow suit and make this test use "{...}", as well. Signed-off-by: Eric Sunshine --- t/t9104-git-svn-follow-parent.sh | 4 ++-- 1 file changed, 2

[PATCH 08/29] t7400: fix broken "submodule add/reconfigure --force" test

2018-06-26 Thread Eric Sunshine
mand fails. Second, it then tries configuring a submodule with a path which is .gitignore'd, which is disallowed. This restriction can be overridden with --force, but the test neglects to use that option. Fix both problems, as well as the broken &&-chain behind which they hid. Signed-off-by:

[PATCH 17/29] t: use test_must_fail() instead of checking exit code manually

2018-06-26 Thread Eric Sunshine
al &&-chain. Signed-off-by: Eric Sunshine --- t/t5405-send-pack-rewind.sh | 3 +-- t/t9814-git-p4-rename.sh| 16 ++-- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/t/t5405-send-pack-rewind.sh b/t/t5405-send-pack-rewind.sh index 4bda18a662..235fb7686

[PATCH 07/29] t7201: drop pointless "exit 0" at end of subshell

2018-06-26 Thread Eric Sunshine
r than fixing the &&-chain breakage, instead just drop the unnecessary "exit 0". Signed-off-by: Eric Sunshine --- t/t7201-co.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/t/t7201-co.sh b/t/t7201-co.sh index ab9da61da3..8d8a63a24b 100755 --- a/t/t7201-co.sh +++ b/t/t7201-co.sh @@ -6

[PATCH 06/29] t6036: fix broken "merge fails but has appropriate contents" tests

2018-06-26 Thread Eric Sunshine
These tests reference non-existent object "c" when they really mean to be referencing "C", however, this error went unnoticed due to a broken &&-chain later in the test. Fix these errors, as well as the broken &&-chains behind which they hid. Signed-off-by: E

[PATCH 05/29] t5505: modernize and simplify hard-to-digest test

2018-06-26 Thread Eric Sunshine
, however, a failure between the initial actions and the cleanup will prevent the cleanup from taking place. Fix these problems by modernizing and simplifying the test and by using test_when_finished() for the cleanup action. Signed-off-by: Eric Sunshine --- t/t5505-remote.sh | 8 ++-- 1 file

[PATCH 10/29] t9001: fix broken "invoke hook" test

2018-06-26 Thread Eric Sunshine
git-send-email to abort with a particular error message. A command which is expected to fail should be run with 'test_must_fail', however, the tests neglects to do so. Fix this problem, as well as the broken &&-chain behind which the problem hid. Signed-off-by: Eric Sunshine --- t/t9001-s

[PATCH 26/29] t7000-t7999: fix broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t7001-mv.sh | 2 +- t/t7201-co.sh | 40 +- t/t7400-submodule-basic.sh | 2 +- t/t7406-submodule-update.sh| 4 +-- t/t7408-submodule-reference.sh | 2 +- t/t7501-commit.sh | 52

[PATCH 16/29] t: use test_might_fail() instead of manipulating exit code manually

2018-06-26 Thread Eric Sunshine
ing change will teach --chain-lint to check the &&-chain inside subshells. This sort of manual exit code manipulation will trip up --chain-lint due to the intentional break in the &&-chain. Therefore, replace manual exit code management with test_might_fail() and a normal &&-ch

[PATCH 25/29] t6000-t6999: fix broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t6010-merge-base.sh| 2 +- t/t6029-merge-subtree.sh | 16 t/t6036-recursive-corner-cases.sh| 6 +++--- t/t6042-merge-rename-corner-cases.sh | 8 t/t6043-merge-rename-directories.sh | 2 +- 5 files

[PATCH 19/29] t1000-t1999: fix broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t1004-read-tree-m-u-wf.sh | 8 t/t1005-read-tree-reset.sh | 10 +- t/t1008-read-tree-overlay.sh| 2 +- t/t1020-subdirectory.sh | 2 +- t/t1050-large.sh| 6 +++--- t/t1411-reflog

[PATCH 13/29] t/lib-submodule-update: fix broken "replace submodule must-fail" test

2018-06-26 Thread Eric Sunshine
breakage", which means that the entire test should be marked 'test_expect_failure', however, it is instead marked 'test_expect_success'. Fix both problems, as well as the broken &&-chain behind which these problems hid. While at it, fix broken &&-chains in a couple neighboring

[PATCH 27/29] t9000-t9999: fix broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t9001-send-email.sh | 6 +++--- t/t9100-git-svn-basic.sh| 2 +- t/t9101-git-svn-props.sh| 2 +- t/t9122-git-svn-author.sh | 6 +++--- t/t9129-git-svn-i18n

[PATCH 22/29] t3030: fix broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t3030-merge-recursive.sh | 340 ++--- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh index 3563e77b37..ff641b348a 100755 --- a/t/t3030-merge-recursive.sh

[PATCH 21/29] t3000-t3999: fix broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t3000-ls-files-others.sh | 2 +- t/t3006-ls-files-long.sh| 2 +- t/t3008-ls-files-lazy-init-name-hash.sh | 8 t/t3050-subprojects-fetch.sh| 8 t/t3301-notes.sh| 8 t

<    1   2   3   4   5   6   7   8   9   10   >