[PATCH v3 0/3] pack-redundant: new algorithm to find min packs

2019-01-01 Thread Jiang Xin
Sun Chao (my former colleague at Huawei) found a bug of git-pack-redundant. If there are too many packs and many of them overlap each other, running `git pack-redundant --all` will exhaust all memories and the process will be killed by kernel. There is a script in commit log of commit 2/3, which

[PATCH v3 1/3] t5323: test cases for git-pack-redundant

2019-01-01 Thread Jiang Xin
From: Jiang Xin Add test cases for git pack-redundant to validate new algorithm for git pack-redundant. Signed-off-by: Jiang Xin --- t/t5323-pack-redundant.sh | 84 +++ 1 file changed, 84 insertions(+) create mode 100755 t/t5323-pack-redundant.sh d

[PATCH v3 2/3] pack-redundant: new algorithm to find min packs

2019-01-01 Thread Jiang Xin
From: Sun Chao When calling `git pack-redundant --all`, if there are too many local packs and too many redundant objects within them, the too deep iteration of `get_permutations` will exhaust all the resources, and the process of `git pack-redundant` will be killed. The following script could cr

[PATCH v3 3/3] pack-redundant: remove unused functions

2019-01-01 Thread Jiang Xin
From: Sun Chao Remove unused functions to find `min` packs, such as `get_permutations`, `pll_free`, etc. Signed-off-by: Sun Chao Signed-off-by: Jiang Xin --- builtin/pack-redundant.c | 72 1 file changed, 72 deletions(-) diff --git a/builtin/p

Re: [PATCH] test-lib: check Bash version for '-x' without using shell arrays

2019-01-01 Thread Johannes Sixt
Am 02.01.19 um 00:19 schrieb SZEDER Gábor: Alas, it has been reported that NetBSD's /bin/sh does complain about them: ./test-lib.sh: 327: Syntax error: Bad substitution where line 327 contains the first ${BASH_VERSINFO[0]} array access. diff --git a/t/test-lib.sh b/t/test-lib.sh index 0f1

git-send-email warnings & process dying of signal 11

2019-01-01 Thread Rafał Miłecki
Hello & Happy New Year! I've recently switched from openSUSE 42.3 (perl 5.18.2 & git 2.13.7) to the openSUSE Tumbleweed (perl 5.28.1 & git 2.20.1) and send-email doesn't work for me anymore. FWIW it doesn't seem like a git regression. I've manually installed 2.13.7 in my new OS and it also fails

[PATCH] test-lib: check Bash version for '-x' without using shell arrays

2019-01-01 Thread SZEDER Gábor
One of our test scripts, 't1510-repo-setup.sh' [1], still can't be reliably run with '-x' tracing enabled, unless it's executed with a Bash version supporting BASH_XTRACEFD (since v4.1). We have a lengthy condition to check the version of the shell running the test script, and disable tracing if i

Regression `git checkout $rev -b branch` while in a `--no-checkout` clone does not check out files

2019-01-01 Thread Anthony Sottile
Here's a simple regression test -- haven't had time to bisect this ``` #!/usr/bin/env bash set -euxo pipefail rm -rf src dest git --version git init src echo hi > src/a git -C src add . git -C src commit -m "initial commit" rev="$(git -C src rev-parse HEAD)" git clone --no-checkout src dest gi

[PATCH v2] doc: remove unneeded TODO for release_commit_memory

2019-01-01 Thread Albert Burt
Remove TODO that was left in from: commit 110240588d (Merge branch 'sb/object-store-alloc' - 2018-06-25) Todo can be removed as: 9d2c97016f (commit.h: delete 'util' field in struct commit - 2018-05-19) deletes commit->util. Signed-off-by: Albert Burt --- Thanks for looking at this for me Duy. I

[PATCH v3 0/2] completion: handle paths with spaces correctly

2019-01-01 Thread Chayoung You
I found more issues with completion for git show ref:path, so here I add one more patch. Chayoung You (2): zsh: complete unquoted paths with spaces correctly completion: treat results of git ls-tree as file paths contrib/completion/git-completion.bash | 35 +++--- contrib

[PATCH v3 1/2] zsh: complete unquoted paths with spaces correctly

2019-01-01 Thread Chayoung You
The following is the description of -Q flag of zsh compadd [1]: This flag instructs the completion code not to quote any metacharacters in the words when inserting them into the command line. Let's say there is a file named 'foo bar.txt' in repository, but it's not yet added to the re

[PATCH v3 2/2] completion: treat results of git ls-tree as file paths

2019-01-01 Thread Chayoung You
Let's say there are files named 'foo bar.txt', and 'abc def/test.txt' in repository. When following commands trigger a completion: git show HEAD:fo git show HEAD:ab The completion results in bash/zsh: git show HEAD:foo bar.txt git show HEAD:abc def/ Where the both of them have a

Re: Regression in git-subtree.sh, introduced in 2.20.1, after 315a84f9aa0e2e629b0680068646b0032518ebed

2019-01-01 Thread Duy Nguyen
On Mon, Dec 31, 2018 at 01:31:21PM +0100, Marc Balmer wrote: > > > > Am 31.12.2018 um 12:36 schrieb Duy Nguyen : > > > > On Mon, Dec 31, 2018 at 6:24 PM Marc Balmer wrote: > >> In a (private) Email to me, he indicated that had no time for a fix. > >> Maybe he can speak up here? > > > > Well,

Re: [PATCH] doc: remove unneeded TODO for release_commit_memory

2019-01-01 Thread Duy Nguyen
On Tue, Jan 1, 2019 at 7:02 AM Albert Burt wrote: > > The code that was merged with commit 1102405 left in an TODO that People usually use something this to produce the commit reference git show -s --date=short --pretty='format:%h (%s - %ad)' which produces 110240588d (Merge branch 'sb/obj