Re: [PATCH] Documentation: Spelling and grammar fixes

2018-06-22 Thread Eric Sunshine
On Fri, Jun 22, 2018 at 2:50 AM Ville Skyttä wrote: > Signed-off-by: Ville Skyttä > --- > diff --git a/Documentation/config.txt b/Documentation/config.txt > @@ -354,7 +354,7 @@ advice.*:: > ignoredHook:: > - Advice shown if an hook is ignored because the hook is not > +

Re: [PATCH v2 3/4] branch: deprecate "-l" option

2018-06-22 Thread Eric Sunshine
On Fri, Jun 22, 2018 at 05:24:14AM -0400, Jeff King wrote: > Let's deprecate "-l" in hopes of eventually re-purposing it > to "--list". > > Signed-off-by: Jeff King > --- > diff --git a/builtin/branch.c b/builtin/branch.c > @@ -36,6 +36,7 @@ static const char * const builtin_branch_usage[] = { > +

Re: [PATCH] Documentation: declare "core.ignorecase" as internal variable

2018-06-24 Thread Eric Sunshine
On Sun, Jun 24, 2018 at 6:05 AM Marc Strapetz wrote: > The current description of "core.ignorecase" reads like an option which > is intended to be changed by the user while it's actually expected to > be set by Git only [1]. > > [1] https://marc.info/?l=git&m=152972992729761&w=2 Thanks for follow

Re: [PATCH] Makefile: tweak sed invocation

2018-06-25 Thread Eric Sunshine
On Mon, Jun 25, 2018 at 3:18 PM Alejandro R. Sedeño wrote: > With GNU sed, the r command doesn't care if a space separates it and > the filename it reads from. > > With SunOS sed, the space is required. MacOS and the various BSD's ship with BSD 'sed', not GNU 'sed', so it seemed prudent to check

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

2018-06-25 Thread Eric Sunshine
On Mon, Jun 25, 2018 at 10:35 AM Derrick Stolee wrote: > diff --git a/midx.c b/midx.c > @@ -210,6 +227,20 @@ static void sort_packs_by_name(char **pack_names, > uint32_t nr_packs, uint32_t *p > +static size_t write_midx_pack_lookup(struct hashfile *f, > +char *

Re: [PATCH v1 0/9] Introducing remote ODBs

2018-06-25 Thread Eric Sunshine
On Mon, Jun 25, 2018 at 5:49 PM Junio C Hamano wrote: > Christian Couder writes: > > This is a follow up from the patch series called "odb remote" [...] > > 5702.20 and 5702.21 seems to fail in standalone test, when these are > directly queued on top of Git v2.18.0; I haven't looked into the > fa

[PATCH 01/29] t7508: use test_when_finished() instead of managing exit code manually

2018-06-26 Thread Eric Sunshine
mp;-chain. While at it, drop the now-unnecessary subshell. Signed-off-by: Eric Sunshine --- Notes: This series is built atop 'master'. If the series is queued there, this patch is needed to avoid test-suite breakage. However, the issue fixed by this patch is already also fix

git@vger.kernel.org

2018-06-26 Thread Eric Sunshine
mp;-chain. Instead, use sane_unset() which can be safely linked into the &&-chain. Signed-off-by: Eric Sunshine --- t/t1300-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t1300-config.sh b/t/t1300-config.sh index 03c223708e..24706ba412 100755 --- a/t/t1300-

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

2018-06-26 Thread Eric Sunshine
n exist (indeed, MacOS has no such command) which is not a valid use-case for test_might_fail(). Sidestep the issue by wrapping the "||" expression in a "{...}" block instead of a subshell since "{...}" blocks are not checked for &&-chain breakage. Signed-off-by:

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

2018-06-26 Thread Eric Sunshine
ger.kernel.org's message size limit. However, when queuing, all patches titled "t: fix broken &&-chains in subshells" could be squashed into a single patch titled "t: fix broken &&-chains in subshells". [1]: https://public-inbox.org/git/20150320100429.ga17

[PATCH 04/29] t3303: use standard here-doc tag "EOF" to avoid fooling --chain-lint

2018-06-26 Thread Eric Sunshine
An upcoming change will teach --chain-lint to detect &&-chain breakage inside subshells. The check works by performing textual transformations on the test to link the subshell body directly into the parent's &&-chain. Special care is taken with the final statement in a subshell. For instance:

[PATCH 15/29] t: drop unnecessary terminating semicolons in subshell

2018-06-26 Thread Eric Sunshine
An upcoming change will teach --chain-lint to check the &&-chain inside subshells. The semicolons after the final commands in these subshells will trip up --chain-lint since they break the &&-chain. Since those semicolons are unnecessary, just drop them. Signed-off-by: Eric Sunshi

[PATCH 20/29] t2000-t2999: fix broken &&-chains in subshells

2018-06-26 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 14/29] t: drop subshell with missing &&-chain in favor of simpler construct

2018-06-26 Thread Eric Sunshine
These tests employ a noisy subshell (with missing &&-chain) to feed input into Git commands: (echo a; echo b; echo c) | git some-command ... Drop the subshell in favor of a simple 'printf': printf "%s\n" a b c | git some-command ... Signed-off-by: Eric

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

2018-06-26 Thread Eric Sunshine
The --chain-lint option detects broken &&-chains by forcing the test to exit early (as the very first step) with a sentinel value. If that sentinel is the test's overall exit code, then the &&-chain is intact; if not, then the chain is broken. Unfortunately, this detection does not extend to &&-cha

[PATCH 24/29] t5000-t5999: fix broken &&-chains in subshells

2018-06-26 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/t5406-remote-rejects.sh | 2 +- t/t5500-fetch-pack.sh | 2 +- t/t5505-remote.sh | 2 +- t/t5512-ls-remote.sh

[PATCH 18/29] t0000-t0999: fix broken &&-chains in subshells

2018-06-26 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

[PATCH 28/29] t9119: fix broken &&-chains in subshells

2018-06-26 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 09/29] t7810: use test_expect_code() instead of hand-rolled comparison

2018-06-26 Thread Eric Sunshine
fore, replace the manual handling with test_expect_code() and a normal &&-chain. Signed-off-by: Eric Sunshine --- t/t7810-grep.sh | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh index 1797f632a3..fecee602c1 100755 --- a/t/t78

[PATCH 12/29] t9401: drop unnecessary nested subshell

2018-06-26 Thread Eric Sunshine
e test to link the subshell body directly into the parent's &&-chain. It employs heuristics to identify the extent of a subshell, however, closing two subshells on a single line like this will fool it. Rather than extending the heuristics even further for this one-off case, just drop the po

[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

[PATCH 23/29] t4000-t4999: fix broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t4001-diff-rename.sh | 2 +- t/t4025-hunk-header.sh | 8 t/t4041-diff-submodule-option.sh | 4 ++-- t/t4060-diff-submodule-option-diff-format.sh | 2 +- t/t4121-apply-diffs.sh

[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
s a "known 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 &&a

[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 &&am

[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 10/29] t9001: fix broken "invoke hook" test

2018-06-26 Thread Eric Sunshine
ok causes 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 Suns

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

2018-06-26 Thread Eric Sunshine
test, 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

[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 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-of

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

2018-06-26 Thread Eric Sunshine
&&-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
an 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

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

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 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_must_fai

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 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 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

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 co

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 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 simpl

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 la

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

2018-06-26 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 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 ch

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 test_must_f

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

git@vger.kernel.org

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

[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 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/

git@vger.kernel.org

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
test, 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

[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-

git@vger.kernel.org

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

git@vger.kernel.org

2018-07-01 Thread Eric Sunshine
instead of managing exit code manually An interdiff against [1] is below, although 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, Jonat

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

2018-07-01 Thread Eric Sunshine
lacing 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

git@vger.kernel.org

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

[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

git@vger.kernel.org

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

git@vger.kernel.org

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

git@vger.kernel.org

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

git@vger.kernel.org

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

git@vger.kernel.org

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 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
ok causes 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 Suns

[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

git@vger.kernel.org

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

git@vger.kernel.org

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

git@vger.kernel.org

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

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 differences

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 && > > ( > > -

git@vger.kernel.org

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 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 > traversal

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 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 [] [...]"), > + N_("git

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 comm

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: err

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 > >> */ > > > > However, t

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 it

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 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 > NUM_OBJECTS=

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 a/Documentation/git

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. Som

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 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 t

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 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 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 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

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 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 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 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

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