[PATCH 07/11] completion: use 'awk' to strip trailing path components

2018-04-16 Thread SZEDER Gábor
for it by eliminating two other processes in the same function. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- contrib/completion/git-completion.bash | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completi

[PATCH 08/11] t9902-completion: ignore COMPREPLY element order in some tests

2018-04-16 Thread SZEDER Gábor
of elements in COMPREPLY, tests that focus on a specific helper function and therefore don't use the 'test_completion' helper. I would rather deal with those later, when (if ever) the need actually arises, than create unnecessary code churn now. Signed-off-by: SZEDER Gábor <szeder@gmail.com>

[PATCH 06/11] completion: let 'ls-files' and 'diff-index' filter matching paths

2018-04-16 Thread SZEDER Gábor
0m0.015s Difference: -98.5% Speedup: 65.4x Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- contrib/completion/git-completion.bash | 11 ++- t/t9902-completion.sh | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/contrib/completi

[PATCH 09/11] completion: remove repeated dirnames with 'awk' during path completion

2018-04-16 Thread SZEDER Gábor
have to exchange and process that much more data. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- contrib/completion/git-completion.bash | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completi

[PATCH 01/11] t9902-completion: add tests demonstrating issues with quoted pathnames

2018-04-16 Thread SZEDER Gábor
completion. Add a couple of failing tests to demonstrate these issues. Later patches in this series will discuss these issues in detail as they fix them. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- Notes: Do any more new tests need FUNNYNAMES* prereq? t/t9902-completion.s

[PATCH 05/11] completion: improve handling quoted paths on the command line

2018-04-16 Thread SZEDER Gábor
that are otherwise difficult both to "type" and to see on the command line. Because of this difficulty I would assume that people do avoid pathnames with such control characters anyway, so I didn't bother implementing it. This function is already way too long as it is. Sig

[PATCH 02/11] completion: move __git_complete_index_file() next to its helpers

2018-04-16 Thread SZEDER Gábor
It's much easier to read, understand and modify the functions related to git-aware path completion when they are right next to each other. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- contrib/completion/git-completion.bash | 39 +- 1 file changed, 19 inse

Re: [PATCH v2 3/6] generate-cmdlist.sh: keep all information in common-cmds.h

2018-04-16 Thread SZEDER Gábor
On Sun, Apr 15, 2018 at 6:42 PM, Nguyễn Thái Ngọc Duy wrote: > common-cmds.h is used to extract the list of common commands (by > group) and a one-line summary of each command. Some information is > dropped, for example command category or summary of other commands. > Update

Re: [PATCH] completion: reduce overhead of clearing cached --options

2018-04-16 Thread SZEDER Gábor
On Mon, Apr 16, 2018 at 7:10 AM, Junio C Hamano <gits...@pobox.com> wrote: > SZEDER Gábor <szeder@gmail.com> writes: > >> On Fri, Apr 13, 2018 at 11:44 PM, Jakub Narebski <jna...@gmail.com> wrote: >>> SZEDER Gábor <szeder@gmail.com> writes: &g

Re: [PATCH] completion: reduce overhead of clearing cached --options

2018-04-13 Thread SZEDER Gábor
On Fri, Apr 13, 2018 at 11:44 PM, Jakub Narebski <jna...@gmail.com> wrote: > SZEDER Gábor <szeder@gmail.com> writes: >> In Bash we can do better: run the 'compgen -v __gitcomp_builtin_' >> builtin command, which lists the same variables, but without a >>

[PATCH] completion: reduce overhead of clearing cached --options

2018-04-13 Thread SZEDER Gábor
com> Issue-on-macOS-explained-by: Matthew Coleman <m...@1eanda.com> Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- contrib/completion/git-completion.bash | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash b/cont

Re: [PATCH] specify encoding for sed command

2018-04-12 Thread SZEDER Gábor
line. This works both in Bash and in ZSH, but has a higher than necessasry overhead with the extra processes. In Bash we can do better: run the 'compgen -v __gitcomp_builtin_' builtin command, which lists the same variables, but without a pipeline and 'sed' it can do so with lower overhead. Signed-off-by

Re: [PATCH 8/8] gpg-interface: handle alternative signature types

2018-04-11 Thread SZEDER Gábor
> diff --git a/gpg-interface.h b/gpg-interface.h > index a5e6517ae6..cee0dfe401 100644 > --- a/gpg-interface.h > +++ b/gpg-interface.h > @@ -23,15 +23,27 @@ struct signature_check { > char *key; > }; > > +struct signing_tool { > + char *name; > + char *program; > + struct

Re: [PATCH] specify encoding for sed command

2018-04-05 Thread SZEDER Gábor
On Thu, Apr 5, 2018 at 8:53 AM, Ævar Arnfjörð Bjarmason wrote: > > On Thu, Apr 05 2018, Stephon Harris wrote: > >> Fixes issue with seeing `sed: RE error: illegal byte sequence` when running >> git-completion.bash Please: - prefix the subject line with "completion:". -

Re: [PATCH v7 14/14] commit-graph: implement "--additive" option

2018-04-05 Thread SZEDER Gábor
On Mon, Apr 2, 2018 at 10:34 PM, Derrick Stolee wrote: > +With the `--append` option, include all commits that are present in the > +$ git rev-parse HEAD | git commit-graph write --stdin-commits --append > + N_("git commit-graph write [--object-dir ] [--append] >

Windows build on Travis CI (was: Re: [PATCH v2 01/36] t/helper: add an empty test-tool program)

2018-03-27 Thread SZEDER Gábor
On Tue, Mar 27, 2018 at 3:57 PM, Johannes Schindelin <johannes.schinde...@gmx.de> wrote: > Hi Gábor, > > On Tue, 27 Mar 2018, SZEDER Gábor wrote: > >> On Tue, Mar 27, 2018 at 12:14 AM, Johannes Schindelin >> <johannes.schinde...@gmx.de> wrote: >>

Re: [PATCH v2 01/36] t/helper: add an empty test-tool program

2018-03-26 Thread SZEDER Gábor
On Tue, Mar 27, 2018 at 12:14 AM, Johannes Schindelin wrote: > However, it seems that something is off, as > ba5bec9589e9eefe2446044657963e25b7c8d88e is reported as fine on Windows: > https://travis-ci.org/git/git/jobs/358260023 (while there is clearly a red > X next

[PATCH v2] test_must_be_empty: simplify file existence check

2018-03-26 Thread SZEDER Gábor
Commit 11395a3b4b (test_must_be_empty: make sure the file exists, not just empty, 2018-02-27) basically duplicated the 'test_path_is_file' helper function in 'test_must_be_empty'. Just call 'test_path_is_file' to avoid this code duplication. Signed-off-by: SZEDER Gábor <szeder@gmail.

Re: [PATCH] test_must_be_empty: simplify file existence check

2018-03-26 Thread SZEDER Gábor
On Mon, Mar 26, 2018 at 2:48 PM, Jeff King <p...@peff.net> wrote: > On Mon, Mar 26, 2018 at 01:58:15PM +0200, SZEDER Gábor wrote: > >> Commit ea3c87d0b7 (test_must_be_empty: make sure the file exists, not >> just empty, 2018-02-27) basically duplicated the 'test_path_is_

[PATCH] test_must_be_empty: simplify file existence check

2018-03-26 Thread SZEDER Gábor
Commit ea3c87d0b7 (test_must_be_empty: make sure the file exists, not just empty, 2018-02-27) basically duplicated the 'test_path_is_file' helper function in 'test_must_be_empty'. Just call 'test_path_is_file' to avoid this code duplication. Signed-off-by: SZEDER Gábor <szeder@gmail.

Re: [PATCH] completion: clear cached --options when sourcing the completion script

2018-03-26 Thread SZEDER Gábor
On Fri, Mar 23, 2018 at 6:35 PM, Junio C Hamano wrote: > Junio C Hamano writes: >> I'd say we should just add !GETTEXT_POISON prereq to the problematic >> tests. > IOW, this is the minumum required. Thanks for already committing the fix, I couldn't get

Re: [PATCH] completion: clear cached --options when sourcing the completion script

2018-03-23 Thread SZEDER Gábor
On Thu, Mar 22, 2018 at 3:16 PM, SZEDER Gábor <szeder@gmail.com> wrote: > Add tests to ensure that these variables are indeed cleared when the > completion script is sourced; not just the variables caching options, > but all other caching variables, i.e. the variables c

[PATCH] completion: clear cached --options when sourcing the completion script

2018-03-22 Thread SZEDER Gábor
that these variables are indeed cleared when the completion script is sourced; not just the variables caching options, but all other caching variables, i.e. the variables caching commands, porcelain commands and merge strategies as well. Signed-off-by: SZEDER Gábor <szeder@gmail.com> ---

Re: [PATCH 2/2] completion: simplify ls-files filter

2018-03-17 Thread SZEDER Gábor
> When filtering the ls-files output we take care not to touch absolute > paths. This is redundant, because ls-files will never output absolute > paths. Furthermore, sorting the output is also redundant, because the > output of ls-files is already sorted. > > Remove the unnecessary operations.

Re: [PATCH v6 00/14] Serialized Git Commit Graph

2018-03-16 Thread SZEDER Gábor
On Fri, Mar 16, 2018 at 7:33 PM, Junio C Hamano <gits...@pobox.com> wrote: > SZEDER Gábor <szeder@gmail.com> writes: > >> You should forget '--stdin-packs' and use '--stdin-commits' to generate >> the initial graph, it's much faster even without '--additive'[1].

Re: [PATCH v6 00/14] Serialized Git Commit Graph

2018-03-16 Thread SZEDER Gábor
On Fri, Mar 16, 2018 at 4:06 PM, Ævar Arnfjörð Bjarmason wrote: > I noticed that it takes a *long* time to generate the graph, on a bigger > repo I have it takes 20 minutes, and this is a repo where repack -A -d > itself takes 5-8 minutes, probably on the upper end of that with

Re: [PATCH v6 12/14] commit-graph: read only from specific pack-indexes

2018-03-15 Thread SZEDER Gábor
On Wed, Mar 14, 2018 at 8:27 PM, Derrick Stolee wrote: > From: Derrick Stolee > > Teach git-commit-graph to inspect the objects only in a certain list > of pack-indexes within the given pack directory. This allows updating > the commit graph iteratively.

Re: [PATCH v1.1 1/2] t9400-git-cvsserver-server: don't rely on the output of 'test_cmp'

2018-03-09 Thread SZEDER Gábor
On Fri, Mar 9, 2018 at 12:44 AM, Junio C Hamano <gits...@pobox.com> wrote: > SZEDER Gábor <szeder@gmail.com> writes: >>> This makes "rm -f failures &&" unnecessary, no? >> >> Indeed, it does. > > OK, no need to resend, as I'll amend

Re: [PATCH v1.1 1/2] t9400-git-cvsserver-server: don't rely on the output of 'test_cmp'

2018-03-08 Thread SZEDER Gábor
On Fri, Mar 9, 2018 at 12:33 AM, Junio C Hamano <gits...@pobox.com> wrote: > SZEDER Gábor <szeder@gmail.com> writes: > >> diff --git a/t/t9400-git-cvsserver-server.sh >> b/t/t9400-git-cvsserver-server.sh >> index c30660d606..5ff3789199 100755 >> ---

[PATCH v1.1 1/2] t9400-git-cvsserver-server: don't rely on the output of 'test_cmp'

2018-03-08 Thread SZEDER Gábor
code fail the test. Furthermore, add the missing && after the cvs command to create a && chain in the loop's body. After this change t9400 passes with '-x', even when running with /bin/sh. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- Changes: Use Eric's suggestion

Re: [PATCH 1/2] t9400-git-cvsserver-server: don't rely on the output of 'test_cmp'

2018-03-08 Thread SZEDER Gábor
On Thu, Mar 8, 2018 at 11:01 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Thu, Mar 8, 2018 at 4:49 PM, SZEDER Gábor <szeder@gmail.com> wrote: >> On Thu, Mar 8, 2018 at 7:51 PM, Eric Sunshine <sunsh...@sunshineco.com> >> wrote: >>> An alter

Re: [PATCH 1/2] t9400-git-cvsserver-server: don't rely on the output of 'test_cmp'

2018-03-08 Thread SZEDER Gábor
On Thu, Mar 8, 2018 at 7:51 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Thu, Mar 8, 2018 at 7:38 AM, SZEDER Gábor <szeder@gmail.com> wrote: >> Unroll that for loop, so we can check the files' contents the usual >> way and rely on 'test_cmp's exi

Re: Error compiling Git in current master branch

2018-03-08 Thread SZEDER Gábor
> Just to let you know, I get the following error compiling Git in master > branch: > > $ make prefix=/usr NO_GETTEXT=YesPlease all doc info > ... >     GEN git-remote-testgit >     GEN perl/build/man/man3/Git.3pm > Can't write-open perl/build/man/man3/Git.3pm: Permission denied at >

[PATCH 1/2] t9400-git-cvsserver-server: don't rely on the output of 'test_cmp'

2018-03-08 Thread SZEDER Gábor
p; chain. Extract updating a file via CVS and verifying its contents using 'test_cmp' into a helper function requiring the file's name as parameter to avoid much of the repetition resulting from unrolling the loop. After this change t9400 passes with '-x', even when running with /bin/sh. Signed-of

[PATCH 2/2] t9402-git-cvsserver-refs: don't check the stderr of a subshell

2018-03-08 Thread SZEDER Gábor
of consistency, it's not necessary for correctness.) After this change t9402 passes with '-x', even when running with /bin/sh. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- t/t9402-git-cvsserver-refs.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t94

[PATCH 0/2] Make cvs tests pass with '-x' tracing and /bin/sh

2018-03-08 Thread SZEDER Gábor
> On Sat, Feb 24, 2018 at 12:39 AM, SZEDER Gábor <szeder@gmail.com> wrote: > > This patch series makes '-x' tracing of tests work reliably even when > > running them with /bin/sh, and setting TEST_SHELL_PATH=bash will be > > unnecessary. > > > > mak

Re: [RFC PATCH 1/5] Add testcases for improved file collision conflict handling

2018-03-08 Thread SZEDER Gábor
> Adds testcases dealing with file collisions for the following types of > conflicts: > * add/add > * rename/add > * rename/rename(2to1) > These tests include expectations for proposed smarter behavior which has > not yet been implemented and thus are currently expected to fail. > Subsequent

Re: [PATCH 2/2] completion: simplify _git_notes

2018-03-06 Thread SZEDER Gábor
> SZEDER Gábor <szeder@gmail.com> writes: > > > There is a minor behaviour change here, though. This > > > > prune,*) > > ;; > > > > case arm ensured that we don't list refs for 'git notes prune ', > > because it doesn't accept

Re: [PATCH 00/11] Make the test suite pass with '-x' and /bin/sh

2018-03-05 Thread SZEDER Gábor
On Sat, Mar 3, 2018 at 8:12 AM, Jeff King <p...@peff.net> wrote: > On Sat, Feb 24, 2018 at 12:39:40AM +0100, SZEDER Gábor wrote: > >> The first patch is the most important: with a couple of well-placed file >> descriptor redirections it ensures that the stderr of the

Re: [PATCH] t2028: fix minor error and issues in newly-added "worktree move" tests

2018-03-05 Thread SZEDER Gábor
> Recently-added "git worktree move" tests include a minor error and a few > small issues. Specifically: > > * checking non-existence of wrong file ("source" instead of > "destination") > > * unneeded redirect (">empty") > > * unused variable ("toplevel") > > * restoring a worktree location

Re: [PATCH v4 4/9] t3701: don't hard code sha1 hash values

2018-03-05 Thread SZEDER Gábor
On Mon, Mar 5, 2018 at 11:59 AM, Phillip Wood wrote: > I did wonder about putting this function in a library when I first wrote > it but decided to wait and see if it is useful instead. As Junio points > out it would need to be improved to act as a generic filter, so

Re: [PATCH 2/2] completion: simplify _git_notes

2018-03-03 Thread SZEDER Gábor
On Sat, Mar 3, 2018 at 10:23 AM, Nguyễn Thái Ngọc Duy wrote: > This also adds completion for 'git notes remove' with two options: > --ignore-missing and --stdin. > > For some strange reason, 'git notes undefined --' completes --ref > without even running

Re: [PATCH 2/2] completion: simplify _git_notes

2018-03-03 Thread SZEDER Gábor
On Sat, Mar 3, 2018 at 10:23 AM, Nguyễn Thái Ngọc Duy wrote: > This also adds completion for 'git notes remove' with two options: > --ignore-missing and --stdin. > > For some strange reason, 'git notes undefined --' completes --ref > without even running

Re: What's cooking in git.git (Mar 2018, #01; Thu, 1)

2018-03-02 Thread SZEDER Gábor
On Fri, Mar 2, 2018 at 6:11 PM, Junio C Hamano wrote: > OK, I think I now understand what happened. I misread the "fold" > discussion and thought we were still exploring the possibility, to > avoid showing uninteresting zero-status case to the users. > > If we do not care

Re: What's cooking in git.git (Mar 2018, #01; Thu, 1)

2018-03-02 Thread SZEDER Gábor
On Thu, Mar 1, 2018 at 11:20 PM, Junio C Hamano wrote: > * sg/travis-build-during-script-phase (2018-01-08) 1 commit > - travis-ci: build Git during the 'script' phase > > Stalled for too long without any response; will discard. I still think this is a good change as-is and

Re: [PATCH v4 4/9] t3701: don't hard code sha1 hash values

2018-03-02 Thread SZEDER Gábor
> Use a filter when comparing diffs to fix the value of non-zero hashes > in diff index lines so we're not hard coding sha1 hash values in the > expected output. This makes it easier to change the expected output if > a test is edited as we don't need to worry about the exact hash value > and

Re: [PATCH 00/11] Make the test suite pass with '-x' and /bin/sh

2018-03-02 Thread SZEDER Gábor
On Sat, Feb 24, 2018 at 12:39 AM, SZEDER Gábor <szeder@gmail.com> wrote: > This patch series makes '-x' tracing of tests work reliably even when > running them with /bin/sh, and setting TEST_SHELL_PATH=bash will be > unnecessary. > > make GIT_TEST_OPTS='-x --verbose

Re: [PATCH] t: send verbose test-helper output to fd 4

2018-02-27 Thread SZEDER Gábor
On Thu, Feb 22, 2018 at 7:48 AM, Jeff King wrote: > This is a repost of the two patches from: > > https://public-inbox.org/git/20180209185710.ga23...@sigill.intra.peff.net/ > > (now just one patch, since sg/test-i18ngrep graduated and we can do it > all in one step). The idea got

Re: [PATCH 04/11] t3030-merge-recursive: don't check the stderr of a subshell

2018-02-27 Thread SZEDER Gábor
On Tue, Feb 27, 2018 at 10:17 PM, Junio C Hamano <gits...@pobox.com> wrote: > SZEDER Gábor <szeder@gmail.com> writes: > >> + git read-tree -i -m $c3 2>actual-err && >> + test_must_be_empty expected-err && >> +

Re: [PATCH 2/2] t5556: replace test_i18ngrep with a simple grep

2018-02-27 Thread SZEDER Gábor
want sign-off from Szeder, >> though. > > I would be happy with either version, or maybe Szeder would like > to tweak the commit message. In any event, it would be good to > get sign-off from Szeder. Certainly, here you go: Signed-off-by: SZEDER Gábor <szeder@gmail.com

Re: [PATCH 04/11] t3030-merge-recursive: don't check the stderr of a subshell

2018-02-27 Thread SZEDER Gábor
On Tue, Feb 27, 2018 at 10:10 PM, Junio C Hamano <gits...@pobox.com> wrote: > Junio C Hamano <gits...@pobox.com> writes: > >> SZEDER Gábor <szeder@gmail.com> writes: >> >>> The two test checking 'git mmerge-recursive' in an empty worktree in >&

Re: [PATCH v4 03/13] commit-graph: create git-commit-graph builtin

2018-02-26 Thread SZEDER Gábor
> Teach git the 'commit-graph' builtin that will be used for writing and > reading packed graph files. The current implementation is mostly > empty, except for an '--object-dir' option. Since 'git commit-graph' is a builtin command, it shouldn't show up in completion when doing 'git co'. Please

Re: [PATCH v4 04/13] commit-graph: implement write_commit_graph()

2018-02-26 Thread SZEDER Gábor
On Mon, Feb 19, 2018 at 7:53 PM, Derrick Stolee wrote: > +static int if_packed_commit_add_to_list(const struct object_id *oid, > + struct packed_git *pack, > + uint32_t pos, > +

[PATCH v1.1] t: prevent '-x' tracing from interfering with test helpers' stderr

2018-02-25 Thread SZEDER Gábor
test scripts to 22 failed tests in 6 scripts (or 23 in 7, if the system (OSX) uses an older Bash version without BASH_XTRACEFD to run 't9903-bash-prompt.sh'). Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- Changes: - Duplicate from/to fd 7 instead of fd 9 in 'test_terminal'.

Re: [PATCH 01/11] t: prevent '-x' tracing from interfering with test helpers' stderr

2018-02-24 Thread SZEDER Gábor
On Sat, Feb 24, 2018 at 12:39 AM, SZEDER Gábor <szeder@gmail.com> wrote: > - Duplicate stderr of the tested command executed in the test helper > function from the function's fd 7 (see next point), to ensure that > the tested command's error messages go to a di

[PATCH 05/11] t5500-fetch-pack: don't check the stderr of a subshell

2018-02-23 Thread SZEDER Gábor
executing commands in that subshell as well, throwing off the comparison with the expected output. Save the stderr of 'git fetch-pack' only instead of the whole subshell, so it remains free from tracing output. After this change t5500 passes with '-x', even when running with /bin/sh. Signed-off-

[PATCH 07/11] t5570-git-daemon: don't check the stderr of a subshell

2018-02-23 Thread SZEDER Gábor
h includes the trace of commands executed in that subshell as well, throwing off the emptiness check. Save the stderr of 'git fetch' only instead of the whole subshell's, so it remains free from tracing output. After this change t5570 passes with '-x', even when running with /bin/sh. Signed-off-

[PATCH 09/11] t1510-repo-setup: mark as untraceable with '-x'

2018-02-23 Thread SZEDER Gábor
it as 'test_untraceable'. After this change make GIT_TEST_OPTS='-x --verbose-log' test finally fully passes without setting TEST_SHELL_PATH to Bash. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- t/t1510-repo-setup.sh | 4 1 file changed, 4 insertions(+) diff --git a/t/t1510-repo-setup.sh b/t

[PATCH 04/11] t3030-merge-recursive: don't check the stderr of a subshell

2018-02-23 Thread SZEDER Gábor
only instead of the whole subshell, so it remains free from tracing output, and save and check them individually, so they will show us from which command the unexpected output came from. After this change t3030 passes with '-x', even when running with /bin/sh. Signed-off-by: SZEDER Gábor <sze

[PATCH 08/11] t9903-bash-prompt: don't check the stderr of __git_ps1()

2018-02-23 Thread SZEDER Gábor
with a Bash version not yet supporing BASH_XTRACEFD. In the future we might want to consider checking the emptiness of __git_ps1()'s stderr in each and every test, in which case we'd have to mark this test script as 'test_untraceable', but that's a different topic. Signed-off-by: SZEDER Gábor <sze

[PATCH 06/11] t5526: use $TRASH_DIRECTORY to specify the path of GIT_TRACE log file

2018-02-23 Thread SZEDER Gábor
command's stderr remains free from tracing output. After this change t5526 passes with '-x', even when running with /bin/sh. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- t/t5526-fetch-submodules.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t5526-fetch-su

[PATCH 10/11] t/README: add a note about don't saving stderr of compound commands

2018-02-23 Thread SZEDER Gábor
needing a Bash version supporting BASH_XTRACEFD, remove the now outdated caution note about non-Bash shells from the description of the '-x' option. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- t/README | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-)

[PATCH 03/11] t1507-rev-parse-upstream: don't check the stderr of a shell function

2018-02-23 Thread SZEDER Gábor
of commands executed in that function as well, throwing off the comparison with the expected output. Save stderr of 'git rev-parse' only instead of the whole function, so it remains free from tracing output. After this change t1507 passes with '-x', even when running with /bin/sh. Signed-off-by: SZEDER

[PATCH 11/11] travis-ci: run tests with '-x' tracing

2018-02-23 Thread SZEDER Gábor
Now that the test suite runs successfully with '-x' tracing even with /bin/sh, enable it on Travis CI in order to - get more information about test failures, and - catch constructs breaking '-x' with /bin/sh sneaking into our test suite. Signed-off-by: SZEDER Gábor <szeder@gmail.

[PATCH 01/11] t: prevent '-x' tracing from interfering with test helpers' stderr

2018-02-23 Thread SZEDER Gábor
when running the test suite with '-x' tracing and /bin/sh goes down from 340 failed tests in 43 test scripts to 22 failed tests in 6 scripts (or 23 in 7, if the system (OSX) uses an older Bash version without BASH_XTRACEFD to run 't9903-bash-prompt.sh'). Signed-off-by: SZEDER Gábor <sze

[PATCH 02/11] t: add means to disable '-x' tracing for individual test scripts

2018-02-23 Thread SZEDER Gábor
with such a Bash version even when $test_untraceable is set. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- t/README | 3 +++ t/test-lib.sh | 19 ++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/t/README b/t/README index b3f7b449c3..c430e9c52c 100644 --- a/t/

[PATCH 00/11] Make the test suite pass with '-x' and /bin/sh

2018-02-23 Thread SZEDER Gábor
fixes to make this patch series work. SZEDER Gábor (11): t: prevent '-x' tracing from interfering with test helpers' stderr t: add means to disable '-x' tracing for individual test scripts t1507-rev-parse-upstream: don't check the stderr of a shell function t3030-merge-recursive: don't check

Re: [PATCH 2/3] t: teach 'test_must_fail' to save the command's stderr to a file

2018-02-23 Thread SZEDER Gábor
On Fri, Feb 9, 2018 at 3:21 PM, Jeff King <p...@peff.net> wrote: > On Fri, Feb 09, 2018 at 03:42:34AM +0100, SZEDER Gábor wrote: > >> To check that a git command fails and to inspect its error message we >> usually execute a command like this throughout our test suite: &g

Re: [PATCH v16 Part II 7/8] bisect--helper: `bisect_start` shell function partially in C

2018-02-15 Thread SZEDER Gábor
> diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c > index ab0580ce0089a..4ac175c49e80c 100644 > --- a/builtin/bisect--helper.c > +++ b/builtin/bisect--helper.c > + /* > + * Check if we are bisecting > + */ > + if

Re: [PATCH v7 25/31] merge-recursive: apply necessary modifications for directory renames

2018-02-15 Thread SZEDER Gábor
On Wed, Jan 31, 2018 at 12:25 AM, Elijah Newren wrote: > This commit hooks together all the directory rename logic by making the > necessary changes to the rename struct, it's dst_entry, and the > diff_filepair under consideration. > > Signed-off-by: Elijah Newren

Re: [PATCH] t6300-for-each-ref: fix "more than one quoting style" tests

2018-02-15 Thread SZEDER Gábor
On Thu, Feb 15, 2018 at 5:52 PM, Jeff King <p...@peff.net> wrote: > On Thu, Feb 15, 2018 at 05:39:28PM +0100, SZEDER Gábor wrote: > >> On Tue, Feb 13, 2018 at 11:22 PM, Jeff King <p...@peff.net> wrote: >> >> >> for i in "--perl --shell" &quo

Re: [PATCH] t6300-for-each-ref: fix "more than one quoting style" tests

2018-02-15 Thread SZEDER Gábor
On Tue, Feb 13, 2018 at 11:22 PM, Jeff King wrote: >> for i in "--perl --shell" "-s --python" "--python --tcl" "--tcl --perl"; do >> test_expect_success "more than one quoting style: $i" " >> - git for-each-ref $i 2>&1 | (read line && >> - case

[PATCH] Makefile: generate Git(3pm) as dependency of the 'doc' and 'man' targets

2018-02-14 Thread SZEDER Gábor
usually not run as root. List Git(3pm) as a dependency of the 'doc' and 'man' Makefile targets, too, so it gets generated by targets that are usually built as ordinary users. While at it, add 'install-man-perl' to the list of .PHONY targets. Signed-off-by: SZEDER Gábor <szeder@gmail.com>

Re: [PATCH v3 04/42] git-completion.bash: introduce __gitcomp_builtin

2018-02-14 Thread SZEDER Gábor
Thanks for working on this. I anticipated that the completion script lack some options, but wow, I didn't expect that there are so many missing. On Fri, Feb 9, 2018 at 12:01 PM, Nguyễn Thái Ngọc Duy wrote: > This is a __gitcomp wrapper that will execute > > git ...

Re: [PATCH v3 29/42] completion: use __gitcomp_builtin in _git_notes

2018-02-14 Thread SZEDER Gábor
On Fri, Feb 9, 2018 at 12:02 PM, Nguyễn Thái Ngọc Duy wrote: > diff --git a/contrib/completion/git-completion.bash > b/contrib/completion/git-completion.bash > index c7b8b37f19..60127daebf 100644 > --- a/contrib/completion/git-completion.bash > +++

Re: [PATCH v3 29/42] completion: use __gitcomp_builtin in _git_notes

2018-02-14 Thread SZEDER Gábor
On Fri, Feb 9, 2018 at 12:02 PM, Nguyễn Thái Ngọc Duy wrote: > diff --git a/contrib/completion/git-completion.bash > b/contrib/completion/git-completion.bash > index c7b8b37f19..60127daebf 100644 > --- a/contrib/completion/git-completion.bash > +++

Re: [PATCH v3 06/42] completion: use __gitcomp_builtin in _git_am

2018-02-14 Thread SZEDER Gábor
On Fri, Feb 9, 2018 at 12:01 PM, Nguyễn Thái Ngọc Duy wrote: > The new completable options are: > > --directory > --exclude > --gpg-sign > --include > --keep-cr > --keep-non-patch > --message-id > --no-keep-cr > --patch-format > --quiet > --reject > --resolvemsg= > >

Re: Regression in memory consumption of git fsck

2018-02-14 Thread SZEDER Gábor
unction. This resulted in significantly increased memory usage of 'git fsck' because of all the non-freed tree buffers; in case of git.git and '--connectivity-only' it went from around 270MB to over 1.2GB. Restore that free_tree_buffer() call to bring down memory usage to the previous level.

Re: [PATCH 2/2] t5556: replace test_i18ngrep with a simple grep

2018-02-13 Thread SZEDER Gábor
> > I must admit that I didn't think about the effect of the useless > > "| sort" on the exit status! What I saw was: a process that > > received no input, sorted nothing and produced no output - pretty > > much the definition of useless! ;-) > > I am not sure what you mean by "receive no input,

[PATCH] t6300-for-each-ref: fix "more than one quoting style" tests

2018-02-12 Thread SZEDER Gábor
. - They check the error message in a rather roundabout way. Ensure that 'git for-each-ref' exits with an error code using the 'test_must_fail' helper function, and check its error message by grepping its saved standard error. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- Those test

Re: "git bisect run make" adequate to locate first unbuildable commit?

2018-02-12 Thread SZEDER Gábor
> > 1. there may be feature branches that bypass the known good starting > >commit, which can cause understanding issues as those side > >branches that predate the start point are also considered > >potential bu commits. > > ok, but let's make sure i understand what defines a

Re: [PATCH v3 14/14] commit-graph: build graph from starting commits

2018-02-09 Thread SZEDER Gábor
On Thu, Feb 8, 2018 at 9:37 PM, Derrick Stolee wrote: > Teach git-commit-graph to read commits from stdin when the > --stdin-commits flag is specified. Commits reachable from these > commits are added to the graph. This is a much faster way to construct > the graph than

Re: [PATCH 3/3] t1404: use 'test_must_fail stderr='

2018-02-08 Thread SZEDER Gábor
On Fri, Feb 9, 2018 at 4:16 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Thu, Feb 8, 2018 at 9:42 PM, SZEDER Gábor <szeder@gmail.com> wrote: >> Instead of 'test_must_fail git cmd... 2>output.err', which redirects >> the standard error of the 'test_must

[PATCH 1/3] t: document 'test_must_fail ok='

2018-02-08 Thread SZEDER Gábor
Since 'test_might_fail' is implemented as a thin wrapper around 'test_must_fail', it also accepts the same options. Mention this in the docs as well. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- t/README| 14 -- t/test-lib-functions.sh | 10 +++

[PATCH 0/3] Teach 'test_must_fail' to save the command's stderr to a file

2018-02-08 Thread SZEDER Gábor
-l 135 ... and this doesn't even count commands spanning more lines, and there are more in 'pu'. I didn't convert more test scripts, because it's boring ;) but more importantly because it could give us 135+ GSoC micro projects. SZEDER Gábor (3): t: document 'test_must_fail ok=' t: teach 'test_must_fail

[PATCH 3/3] t1404: use 'test_must_fail stderr='

2018-02-08 Thread SZEDER Gábor
EFD. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- t/t1404-update-ref-errors.sh | 46 ++-- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh index 3a887b5113..91250bc6

[PATCH 2/3] t: teach 'test_must_fail' to save the command's stderr to a file

2018-02-08 Thread SZEDER Gábor
g's standard error. The same issues apply to the 'test_might_fail' helper function as well, but since it's implemented as a thin wrapper around 'test_must_fail', no modifications were necessary and 'test_might_fail stderr=output.err git command' will just work. Signed-off-by: SZEDER Gábor <

[PATCH v2 5/9] t5510: consolidate 'grep' and 'test_i18ngrep' patterns

2018-02-08 Thread SZEDER Gábor
by itself. Furthermore, piping data into 'test_i18ngrep' will interfere with the linting that will be added in a later patch. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- t/t5510-fetch.sh | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/t/t5510-fetch.sh b/t

[PATCH v2 7/9] t: move 'test_i18ncmp' and 'test_i18ngrep' to 'test-lib-functions.sh'

2018-02-08 Thread SZEDER Gábor
Both 'test_i18ncmp' and 'test_i18ngrep' helper functions are supposed to be called from our test scripts, so they should be in 'test-lib-functions.sh'. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- t/test-lib-functions.sh | 26 ++ t/test-lib.sh

[PATCH v2 9/9] t: make 'test_i18ngrep' more informative on failure

2018-02-08 Thread SZEDER Gábor
n one test each, where the 'test_i18ngrep's pattern verbatimly matches a file in the trash directory. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- t/test-lib-functions.sh | 24 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/t/test-lib-funct

[PATCH v2 0/9] 'test_i18ngrep'-related fixes and improvements

2018-02-08 Thread SZEDER Gábor
s (the one Eric pointed out, but later noticed maybe 2-3 more). [1] - https://public-inbox.org/git/20180126123708.21722-1-szeder@gmail.com/T/ SZEDER Gábor (9): t5541: add 'test_i18ngrep's missing filename parameter t5812: add 'test_i18ngrep's missing filename parameter t6022: don'

[PATCH v2 4/9] t4001: don't run 'git status' upstream of a pipe

2018-02-08 Thread SZEDER Gábor
between 'git status' and 'test_i18ngrep' to catch a potential failure of the former. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- t/t4001-diff-rename.sh | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/t/t4001-diff-rename.sh b/t/t4001-diff-rename.sh

[PATCH v2 1/9] t5541: add 'test_i18ngrep's missing filename parameter

2018-02-08 Thread SZEDER Gábor
that the given pattern is not present in its input, and of course it won't find that pattern if its input is empty (as it comes from /dev/null). This also means that this test could miss a potential breakage of 'git push --no-progress'. Signed-off-by: SZEDER Gábor <szeder@gmail.com>

[PATCH v2 6/9] t5536: let 'test_i18ngrep' read the file without redirection

2018-02-08 Thread SZEDER Gábor
Redirecting 'test_i18ngrep's standard input from a file will interfere with the linting that will be added in a later patch. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- t/t5536-fetch-conflicts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t5536

[PATCH v2 8/9] t: validate 'test_i18ngrep's parameters

2018-02-08 Thread SZEDER Gábor
of the cases we don't use any such options anyway. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- t/test-lib-functions.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 92ed029371..a1676e0386 100644 --- a/t/te

[PATCH v2 2/9] t5812: add 'test_i18ngrep's missing filename parameter

2018-02-08 Thread SZEDER Gábor
the two patterns into a single extended regexp, eliminating the need for an ||-chained second 'test_i18ngrep' invocation. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- t/t5812-proto-disable-http.sh | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/t/t5812

[PATCH v2 3/9] t6022: don't run 'git merge' upstream of a pipe

2018-02-08 Thread SZEDER Gábor
a potential failure of the former. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- t/t6022-merge-rename.sh | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/t6022-merge-rename.sh b/t/t6022-merge-rename.sh index 05ebba7afa..c01f721f13 100755 --- a/t/t6022

Re: [PATCH v2 01/41] parse-options: support --git-completion-helper

2018-02-07 Thread SZEDER Gábor
> > OK how about some thing like this fixup patch? __gitcomp_builtin now > > allows to add extra options as well as remove some. > > > > -- 8< -- > > __gitcomp_builtin () > > { > > + local incl="$2" > > + local excl="$3" > > + options="$(__git ${cmd/_/ }

Re: [PATCH v2 04/14] commit-graph: implement construct_commit_graph()

2018-02-07 Thread SZEDER Gábor
On Mon, Feb 5, 2018 at 5:06 PM, Derrick Stolee <sto...@gmail.com> wrote: > On 2/2/2018 10:32 AM, SZEDER Gábor wrote: >> In my git repo, with 9 pack files at the moment, i.e. not that big a >> repo and not that many pack files: >> >>$ time ./git c

Re: [PATCH 02/10] t5812: add 'test_i18ngrep's missing filename parameter

2018-02-07 Thread SZEDER Gábor
On Fri, Jan 26, 2018 at 7:27 PM, Jeff King <p...@peff.net> wrote: > On Fri, Jan 26, 2018 at 01:37:00PM +0100, SZEDER Gábor wrote: > >> The second 'test_i18ngrep' invocation in the test 'curl redirects >> respect whitelist' is missing its filename parameter. This has >

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