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

2018-07-12 Thread Eric Sunshine
On Wed, Jul 11, 2018 at 5:37 PM Junio C Hamano wrote: > As with the previous "transform the script and feed the result to > shell" approach, this risks to force us into writing our tests in a > subset of valid shell language, which is the primary reason why I > was not enthused when I saw the prev

[PATCH] sequencer.c: terminate the last line of author-script properly

2018-07-12 Thread Akinori MUSHA
It looks like write_author_script() intends to write out a file in Bourne shell syntax, but it doesn't put a closing single quote on the last line. This patch makes .git/rebase-merge/author-script actually parsable by sh(1) by adding a single quote and a linefeed to terminate the line properly. S

[PATCH v3 2/3] t/lib-httpd: add the strip_access_log() helper function

2018-07-12 Thread SZEDER Gábor
Four tests in three httpd-related test scripts check the contents of Apache's 'access.log', and they all do so by running 'sed' with the exact same script consisting of four s/// commands to strip uninteresting log fields and to vertically align the requested URLs. Extract this into a common helpe

[PATCH v3 3/3] t/lib-httpd: avoid occasional failures when checking access.log

2018-07-12 Thread SZEDER Gábor
The last test of 't5561-http-backend.sh', 'server request log matches test results' may fail occasionally, because the order of entries in Apache's access log doesn't match the order of requests sent in the previous tests, although all the right requests are there. I saw it fail on Travis CI five

[PATCH v3 1/3] t5541: clean up truncating access log

2018-07-12 Thread SZEDER Gábor
In the second test of 't5541-http-push-smart.sh', 'no empty path components' we truncate Apache's access log by running: echo >.../access.log There are two issues with this approach: - This doesn't leave an empty file behind, like a proper truncation would, but a file with a lone newline

[PATCH v3 0/3] Fix occasional test failures in http tests

2018-07-12 Thread SZEDER Gábor
To recap: 't5561-http-backend.sh' is prone to occasional failures; luckily it's not 'git-http-backend's fault, but the test script is a bit racy; patch 3/3's commit message discusses the details at length. Changes since v2: - Use 'test_when_finished' to clear the access log in the first pat

git@vger.kernel.org

2018-07-12 Thread SZEDER Gábor
> 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 ++-- >

Re: [PATCH 3/3] rebase --rebase-merges: adjust man page for octopus support

2018-07-12 Thread Johannes Schindelin
Hi Elijah, On Wed, 11 Jul 2018, Elijah Newren wrote: > On Fri, Mar 9, 2018 at 8:36 AM, Johannes Schindelin via GitGitGadget > wrote: > > > diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt > > index 0e20a66e7..c4bcd24bb 100644 > > --- a/Documentation/git-rebase.txt > > +++

Hello Beautiful

2018-07-12 Thread Jack
Hi Dear, my name is Jack and i am seeking for a relationship in which i will feel loved after a series of failed relationships. I am hoping that you would be interested and we could possibly get to know each other more if you do not mind. I am open to answering questions from you as i think my

Re: [PATCH 0/3] rebase -r: support octopus merges

2018-07-12 Thread Johannes Schindelin
Hi Junio, On Wed, 11 Jul 2018, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > > The `--rebase-merges` option of `git rebase` generates todo lists that > > include the merge commits that are to be rebased. > > > > To keep things simpler to review, I decided to suppo

Re: [PATCH 0/3] rebase -r: support octopus merges

2018-07-12 Thread Johannes Schindelin
Hi Stefan, On Wed, 11 Jul 2018, Stefan Beller wrote: > On Wed, Jul 11, 2018 at 10:35 AM Junio C Hamano wrote: > > To be honest, I am not sure if there still are people who use > > octopus > > The latest merge with more than 2 parents in linux.git is df958569dbaa > (Merge branches 'acpi-tables'

Re: [PATCH 1/3] merge: allow reading the merge commit message from a file

2018-07-12 Thread Johannes Schindelin
Hi Junio, On Wed, 11 Jul 2018, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > > diff --git a/builtin/merge.c b/builtin/merge.c > > index 4a4c09496..b0e907751 100644 > > --- a/builtin/merge.c > > +++ b/builtin/merge.c > > @@ -111,6 +111,35 @@ static int option_parse

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

2018-07-12 Thread Derrick Stolee
On 7/11/2018 5:48 AM, SZEDER Gábor wrote: diff --git a/Documentation/config.txt b/Documentation/config.txt index ab641bf5a9..ab895ebb32 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -908,6 +908,10 @@ core.commitGraph:: Enable git commit graph feature. Allows read

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

2018-07-12 Thread Johannes Schindelin
Hi Eric, On Wed, 11 Jul 2018, Eric Sunshine wrote: > On Wed, Jul 11, 2018 at 8:38 AM Johannes Schindelin via GitGitGadget > wrote: > > diff --git a/sequencer.c b/sequencer.c > > @@ -2932,7 +2966,8 @@ static int do_merge(struct commit *commit, const char > > *arg, int arg_len, > > -

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

2018-07-12 Thread Johannes Schindelin
Hi Junio, On Wed, 11 Jul 2018, Junio C Hamano wrote: > Eric Sunshine writes: > > >> @@ -2956,28 +2991,76 @@ static int do_merge(struct commit *commit, const > >> char *arg, int arg_len, > >> + cmd.git_cmd = 1; > >> + argv_array_push(&cmd.args, "merge"); > >> +

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

2018-07-12 Thread Derrick Stolee
On 7/6/2018 1:39 AM, Eric Sunshine wrote: 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-mul

Re: [PATCH 0/6] Compile cleanly in pedantic mode

2018-07-12 Thread Johannes Schindelin
Hi, On Wed, 11 Jul 2018, Junio C Hamano wrote: > Beat Bolli writes: > > > Should we add a "pedantic" flag to DEVOPTS that would simplify > > building pedantically? It would also have to set > > USE_PARENS_AROUND_GETTEXT_N so as to not overwhelm the developer with > > too much output. > > That

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

2018-07-12 Thread SZEDER Gábor
On Thu, Jul 12, 2018 at 3:01 PM Derrick Stolee wrote: > > On 7/11/2018 5:48 AM, SZEDER Gábor wrote: > >> diff --git a/Documentation/config.txt b/Documentation/config.txt > >> index ab641bf5a9..ab895ebb32 100644 > >> --- a/Documentation/config.txt > >> +++ b/Documentation/config.txt > >> @@ -908,6

Re: [PATCH v1] handle lower case drive letters on Windows

2018-07-12 Thread Johannes Schindelin
Hi Ben, On Wed, 11 Jul 2018, Ben Peart wrote: > Teach test-drop-caches to handle lower case drive letters on Windows. Maybe mention that you can trigger this by using a lower case drive letter in Powershell (CMD normalizes your path, Powershell does not). > diff --git a/t/helper/test-drop-cache

Re: [GSoC] GSoC with git, week 10

2018-07-12 Thread Paul-Sebastian Ungureanu
Hello, Sorry for late notification, my blog is up too. https://prertik.github.io/post/week-10 Good job! I also forgot to post it here, although the blog entry was available since days ago. I am sorry for that! https://ungps.github.io/ P.S: Since the moment I wrote that text, there are no

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

2018-07-12 Thread Derrick Stolee
On 7/6/2018 12:36 AM, Eric Sunshine wrote: On Thu, Jul 5, 2018 at 8:54 PM Derrick Stolee wrote: + for i in $(test_seq 6 10) + do + iii=$(printf '%03i' $i) + test-tool genrandom "bar" 200 >wide_delta_$iii && + test-tool genrandom "baz $iii"

Re: rev-parse --show-toplevel broken during exec'ed rebase?

2018-07-12 Thread Johannes Schindelin
Hi Vitali, [please avoid top-posting on this mailing list] On Wed, 11 Jul 2018, Vitali Lovich wrote: > On Wed, Jul 11, 2018 at 7:50 PM Vitali Lovich wrote: > > > > Typically git rev-parse --show-toplevel prints the folder containing > > the .git folder regardless what subdirectory one is in. O

Re: rev-parse --show-toplevel broken during exec'ed rebase?

2018-07-12 Thread Johannes Schindelin
Hi, On Thu, 12 Jul 2018, Johannes Schindelin wrote: > On Wed, 11 Jul 2018, Vitali Lovich wrote: > > > On Wed, Jul 11, 2018 at 7:50 PM Vitali Lovich wrote: > > > > > > Typically git rev-parse --show-toplevel prints the folder containing > > > the .git folder regardless what subdirectory one is i

Re: [PATCH v3 01/20] linear-assignment: a function to solve least-cost assignment problems

2018-07-12 Thread Johannes Schindelin
Hi Gábor, On Wed, 11 Jul 2018, SZEDER Gábor wrote: > > diff --git a/linear-assignment.c b/linear-assignment.c > > new file mode 100644 > > index 0..0b0344b5f > > --- /dev/null > > +++ b/linear-assignment.c > > @@ -0,0 +1,203 @@ > > +/* > > + * Based on: Jonker, R., & Volgenant, A. (1987).

Re: rev-parse --show-toplevel broken during exec'ed rebase?

2018-07-12 Thread Junio C Hamano
Vitali Lovich writes: > Repro (starting with cwd within git project): >> (cd xdiff; git rev-parse --show-toplevel) > ... path to git repository >> git rebase -i 18404434bf406f6a6f892ed73320c5cf9cc187dd > # Stop at some commit for editing >> (cd xdiff; git rev-parse --show-toplevel) > ... path to

Re: refs/notes/amlog problems, was Re: [PATCH v3 01/20] linear-assignment: a function to solve least-cost assignment problems

2018-07-12 Thread Johannes Schindelin
Hi Junio, On Wed, 11 Jul 2018, Junio C Hamano wrote: > Johannes Schindelin writes: > > > To summarize, there are two commits recorded for that Message-Id, the > > later one not mapped back, and neither is the correct commit that made it > > into `master`. > > > > It would be nice to figure out

[PATCH] t6036: fix broken && chain in sub-shell

2018-07-12 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- Hi Junio, I had a test failure on 'pu' today - Eric's chain-lint series found another broken chain in one of Elijah's new tests (on the 'en/t6036-recursive-corner-cases' branch). ATB, Ramsay Jones t/t6036-recursive-corner-cases.sh | 2 +- 1 file changed, 1 in

Re: [PATCH 0/6] Compile cleanly in pedantic mode

2018-07-12 Thread Junio C Hamano
Johannes Schindelin writes: >> That may be something worth discussing before doing; I'd prefer to >> wait until these 6 patches, plus the unsized static array one you >> did spearately, graduates to the 'master' branch. > > If this change to DEVOPTS was done as 7/7, then this would be very easy t

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

2018-07-12 Thread Derrick Stolee
On 7/12/2018 9:31 AM, SZEDER Gábor wrote: On Thu, Jul 12, 2018 at 3:01 PM Derrick Stolee wrote: On 7/11/2018 5:48 AM, SZEDER Gábor wrote: diff --git a/Documentation/config.txt b/Documentation/config.txt index ab641bf5a9..ab895ebb32 100644 --- a/Documentation/config.txt +++ b/Documentation/conf

Re: [PATCH v3 2/2] Fix use of strategy options with interactive rebases

2018-07-12 Thread Johannes Schindelin
Hi Elijah, On Wed, 27 Jun 2018, Elijah Newren wrote: > git-rebase.sh wrote strategy options to .git/rebase/merge/strategy_opts > in the following format: > '--ours' '--renormalize' > Note the double spaces. > > git-rebase--interactive uses sequencer.c to parse that file, and > sequencer.c use

[PATCH v3] handle lower case drive letters on Windows

2018-07-12 Thread Ben Peart
On Windows, if a tool calls SetCurrentDirectory with a lower case drive letter, the subsequent call to GetCurrentDirectory will return the same lower case drive letter. Powershell, for example, does not normalize the path. If that happens, test-drop-caches will error out as it does not correctly to

Re: [PATCH v2] sha1-name.c: for ":/", find detached HEAD commits

2018-07-12 Thread Jeff King
On Wed, Jul 11, 2018 at 10:49:09PM -0700, William Chargin wrote: > This patch broadens the set of commits matched by ":/" pathspecs to > include commits reachable from HEAD but not any named ref. This avoids > surprising behavior when working with a detached HEAD and trying to > refer to a commit

Re: [PATCH v2] git-rebase--merge: modernize "git-$cmd" to "git $cmd"

2018-07-12 Thread Johannes Schindelin
Hi Elijah, On Wed, 27 Jun 2018, Elijah Newren wrote: > Signed-off-by: Elijah Newren > --- > > Changes since v1: > - Fixed up commit message (move below comment to below diffstat as > originally intended) > > Long term I just want to make git-rebase--merge go away, so this patch > will ev

Re: [PATCH v3 1/3] t5541: clean up truncating access log

2018-07-12 Thread Jeff King
On Thu, Jul 12, 2018 at 02:22:14PM +0200, SZEDER Gábor wrote: > diff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh > index a2af693068..5c9ca19401 100755 > --- a/t/t5541-http-push-smart.sh > +++ b/t/t5541-http-push-smart.sh > @@ -38,6 +38,10 @@ GET > /smart/test_repo.git/info/re

[PATCH] ref-filter: mark some file-local symbols as static

2018-07-12 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- Hi Olga, If you need to re-roll your 'ot/ref-filter-object-info' branch, could you please squash this into the relevant patch (commit c5d9a471d6, "ref-filter: use oid_object_info() to get object", 2018-07-09). [Both sparse and my static-check.pl script are comp

Re: [PATCH v2] sha1-name.c: for ":/", find detached HEAD commits

2018-07-12 Thread Junio C Hamano
William Chargin writes: > This patch broadens the set of commits matched by ":/" pathspecs to As we discussed during the review on v1, ":/" is *NOT* pathspec (that is why having these tests in t4208 is wrong but we are following existing mistakes). It is a way to specify a commit object name (u

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

2018-07-12 Thread Derrick Stolee
On 7/9/2018 3:08 PM, Junio C Hamano wrote: Derrick Stolee writes: diff --git a/midx.h b/midx.h index dbdbe9f873..2d83dd9ec1 100644 --- a/midx.h +++ b/midx.h @@ -1,6 +1,10 @@ #ifndef __MIDX_H__ #define __MIDX_H__ +struct multi_pack_index; I actually was quite surprised that this struct i

Re: [PATCH v2] sha1-name.c: for ":/", find detached HEAD commits

2018-07-12 Thread William Chargin
> As we discussed during the review on v1, ":/" > is *NOT* pathspec (that is why having these tests in t4208 is wrong > but we are following existing mistakes). Ah, I understand the terminology better now. Thanks. I'll change the commit message wording to use "extended SHA-1s" instead of "pathspec

Re: [PATCH 1/3] merge: allow reading the merge commit message from a file

2018-07-12 Thread Junio C Hamano
Johannes Schindelin writes: >> > +static int option_read_message(struct parse_opt_ctx_t *ctx, >> > + const struct option *opt, int unset) >> > +{ >> > + struct strbuf *buf = opt->value; >> > + const char *arg; >> > + >> > + if (unset) >> > + BUG("-F cannot be n

Re: [PATCH 0/3] rebase -r: support octopus merges

2018-07-12 Thread Junio C Hamano
Johannes Schindelin writes: > Git is used in *so many* different scenarios, and both in terms of > commits/day as well as overall repository size *and* development speed, That misses another important factor, though. How well the project uses the tool, iow, how canonical should its way of using

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

2018-07-12 Thread Derrick Stolee
On 7/12/2018 9:19 AM, Derrick Stolee wrote: On 7/6/2018 1:39 AM, Eric Sunshine wrote: 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-inde

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

2018-07-12 Thread Derrick Stolee
On 7/6/2018 1:27 AM, Eric Sunshine wrote: 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

Re: [PATCH v1] handle lower case drive letters on Windows

2018-07-12 Thread Junio C Hamano
Johannes Schindelin writes: > So maybe a much better idea is to use our `has_dos_drive_prefix()` > function: > > if (!has_dos_drive_prefix(Buffer)) > return error("'%s': invalid drive letter", Buffer); "'%s': path without valid drive prefix", you mean?

Re: [PATCH v3 0/6] Object store refactoring: commit graph

2018-07-12 Thread Junio C Hamano
Jonathan Tan writes: > This is on _both_ ds/commit-graph-fsck and sb/object-store-lookup, > following Stolee's suggestion. > > (It also seems better to build it this way to me, since both these > branches are going into "next" according to the latest What's Cooking.) OK. I am perfectly OK if th

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

2018-07-12 Thread Jeff King
On Thu, Jul 12, 2018 at 06:50:20AM -0400, Eric Sunshine wrote: > And, perhaps most important: We're not tied indefinitely to the > "subset" implemented by the current linter. If it is indeed found to > be too strict or limiting, it can always be loosened or retired > altogether. Yeah, I agree thi

Re: refs/notes/amlog problems, was Re: [PATCH v3 01/20] linear-assignment: a function to solve least-cost assignment problems

2018-07-12 Thread Junio C Hamano
Johannes Schindelin writes: > I would like to ask you to reinstate the post-rewrite hook, as it still > improves the situation over the current one. Without post-rewrite I seem to be getting correct amlog entries for commits created by "git rebase"; do our rebase--am backend still trigger post-a

Re: [PATCH] ref-filter: mark some file-local symbols as static

2018-07-12 Thread Оля Тележная
2018-07-12 18:57 GMT+03:00 Ramsay Jones : > > Signed-off-by: Ramsay Jones > --- > > Hi Olga, > > If you need to re-roll your 'ot/ref-filter-object-info' branch, > could you please squash this into the relevant patch (commit c5d9a471d6, > "ref-filter: use oid_object_info() to get object", 2018-07-0

Re: [PATCH 0/2] Fix --rebase-merges with custom commentChar

2018-07-12 Thread Junio C Hamano
Aaron Schrab writes: > Subject: [PATCH v2] sequencer: use configured comment character > > Use the configured comment character when generating comments about > branches in a todo list. Failure to honor this configuration causes a > failure to parse the resulting todo list. OK. > > Note that t

Re: [PATCH] sequencer.c: terminate the last line of author-script properly

2018-07-12 Thread Junio C Hamano
"Akinori MUSHA" writes: > It looks like write_author_script() intends to write out a file in > Bourne shell syntax, but it doesn't put a closing single quote on the > last line. s/closing single quote/& and the terminating newline/? > > This patch makes .git/rebase-merge/author-script actually

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

2018-07-12 Thread Junio C Hamano
SZEDER Gábor writes: >> Thanks for this point. It seems to work using >> "link:technical/multi-pack-index[1]", which is what I'll use in the next >> version. > > It doesn't work, it merely works around the build failure. Sorry. I fell into the same trap X-<. link:techincal/multi-pack-index.html

Re: rev-parse --show-toplevel broken during exec'ed rebase?

2018-07-12 Thread Vitali Lovich
On Thu, Jul 12, 2018 at 8:23 AM Junio C Hamano wrote: > > Vitali Lovich writes: > > > Repro (starting with cwd within git project): > >> (cd xdiff; git rev-parse --show-toplevel) > > ... path to git repository > >> git rebase -i 18404434bf406f6a6f892ed73320c5cf9cc187dd > > # Stop at some commit f

Re: [PATCH v3 0/6] Object store refactoring: commit graph

2018-07-12 Thread Derrick Stolee
On 7/11/2018 6:42 PM, Jonathan Tan wrote: This is on _both_ ds/commit-graph-fsck and sb/object-store-lookup, following Stolee's suggestion. (It also seems better to build it this way to me, since both these branches are going into "next" according to the latest What's Cooking.) Junio wrote in [

git@vger.kernel.org

2018-07-12 Thread Eric Sunshine
On Thu, Jul 12, 2018 at 8:37 AM SZEDER Gábor wrote: > The change below should be squashed into this patch to fix a > previously unnoticed broken &&-chain. I think you missed it, because > this test script is rather expensive and you didn't run it with > GIT_TEST_CLONE_2GB=YesPlease. > > diff --gi

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

2018-07-12 Thread Eric Sunshine
On Thu, Jul 12, 2018 at 10:10 AM Derrick Stolee wrote: > On 7/6/2018 12:36 AM, Eric Sunshine wrote: > > There seems to be a fair bit of duplication in these tests which > > create objects. Is it possible to factor out some of this code into a > > shell function? > > In addition to the other small

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

2018-07-12 Thread Derrick Stolee
On 7/12/2018 2:02 PM, Eric Sunshine wrote: On Thu, Jul 12, 2018 at 10:10 AM Derrick Stolee wrote: On 7/6/2018 12:36 AM, Eric Sunshine wrote: There seems to be a fair bit of duplication in these tests which create objects. Is it possible to factor out some of this code into a shell function? I

Re: [GSoC][PATCH v3 12/13] rebase -i: implement the logic to initialize the variable $revision in C

2018-07-12 Thread Junio C Hamano
Alban Gruin writes: > @@ -50,6 +71,13 @@ int cmd_rebase__helper(int argc, const char **argv, const > char *prefix) > N_("prepare the branch to be rebased"), > PREPARE_BRANCH), > OPT_CMDMODE(0, "complete-action", &command, > N_("c

git@vger.kernel.org

2018-07-12 Thread Jeff King
On Thu, Jul 12, 2018 at 01:44:49PM -0400, Eric Sunshine wrote: > On Thu, Jul 12, 2018 at 8:37 AM SZEDER Gábor wrote: > > The change below should be squashed into this patch to fix a > > previously unnoticed broken &&-chain. I think you missed it, because > > this test script is rather expensive

Re: [GSoC][PATCH v3 12/13] rebase -i: implement the logic to initialize the variable $revision in C

2018-07-12 Thread Junio C Hamano
Junio C Hamano writes: > If I am reading the body of this if() block correctly, I think it > does everything init_revisions_and_shortrevisions shell function > does, i.e. compute $revisions for both cases with or without > upstream and write squash-onto state if needed, so that we can call > the

git@vger.kernel.org

2018-07-12 Thread Junio C Hamano
Eric Sunshine writes: > On Thu, Jul 12, 2018 at 8:37 AM SZEDER Gábor wrote: >> The change below should be squashed into this patch to fix a >> previously unnoticed broken &&-chain. I think you missed it, because >> this test script is rather expensive and you didn't run it with >> GIT_TEST_CLON

git@vger.kernel.org

2018-07-12 Thread Junio C Hamano
Junio C Hamano writes: > Eric Sunshine writes: > >> On Thu, Jul 12, 2018 at 8:37 AM SZEDER Gábor wrote: >>> The change below should be squashed into this patch to fix a >>> previously unnoticed broken &&-chain. I think you missed it, because >>> this test script is rather expensive and you did

git@vger.kernel.org

2018-07-12 Thread Eric Sunshine
On Thu, Jul 12, 2018 at 2:35 PM Junio C Hamano wrote: > Junio C Hamano writes: > Oops, sent before completing the message. > > For that to happen, we need a sign-off ;-) > > I guess this one would have been caught with the "sed script on > subshell" linter that does not execute? Yes, thi

Re: [PATCH] t6036: fix broken && chain in sub-shell

2018-07-12 Thread Junio C Hamano
Ramsay Jones writes: > Signed-off-by: Ramsay Jones > --- > > Hi Junio, > > I had a test failure on 'pu' today - Eric's chain-lint series > found another broken chain in one of Elijah's new tests (on the > 'en/t6036-recursive-corner-cases' branch). Thanks, I see the same breakage in my build, to

git@vger.kernel.org

2018-07-12 Thread Junio C Hamano
Eric Sunshine writes: > On Thu, Jul 12, 2018 at 2:35 PM Junio C Hamano wrote: >> Junio C Hamano writes: >> Oops, sent before completing the message. >> >> For that to happen, we need a sign-off ;-) >> >> I guess this one would have been caught with the "sed script on >> subshell" linter

git@vger.kernel.org

2018-07-12 Thread Eric Sunshine
On Thu, Jul 12, 2018 at 2:50 PM Junio C Hamano wrote: > Eric Sunshine writes: > > The exact reason is that the prerequisite was not met (indeed, I > > wasn't even aware of that prerequisite), so the commit message can be > > more direct: > > > > This was missed by the previous clean-ups due t

gitweb and Levenshtein

2018-07-12 Thread David Brown
Howdy, I want to hack the getweb_make_index.perl script to create a string search using: https://github.com/git/git/blob/master/levenshtein.c. How do i reference the compiled code? I would like to call this routine using Java and maybe Perl. Please advise. Thanks. Regards,

[PATCH] RFC: submodule-config: introduce trust level

2018-07-12 Thread Stefan Beller
The series merged at 614ea03a71e (Merge branch 'bw/submodule-config-cleanup', 2017-08-26) went to great length to make it explicit to the caller where a value came from, as that would help the caller to be careful to decide which values to take from where, i.e. be careful about security implication

Re: [PATCH v2] sha1-name.c: for ":/", find detached HEAD commits

2018-07-12 Thread Junio C Hamano
William Chargin writes: >> As we discussed during the review on v1, ":/" >> is *NOT* pathspec (that is why having these tests in t4208 is wrong >> but we are following existing mistakes). > > Ah, I understand the terminology better now. Thanks. I'll change the > commit message wording to use "ext

Re: [PATCH v3] handle lower case drive letters on Windows

2018-07-12 Thread Junio C Hamano
Ben Peart writes: > On Windows, if a tool calls SetCurrentDirectory with a lower case drive > letter, the subsequent call to GetCurrentDirectory will return the same > lower case drive letter. Powershell, for example, does not normalize the > path. If that happens, test-drop-caches will error out

RE: [PATCH v3] handle lower case drive letters on Windows

2018-07-12 Thread Ben Peart
> -Original Message- > From: Junio C Hamano On Behalf Of Junio C Hamano > Sent: Thursday, July 12, 2018 3:13 PM > To: Ben Peart > Cc: git@vger.kernel.org; sbel...@google.com; johannes.schinde...@gmx.de > Subject: Re: [PATCH v3] handle lower case drive letters on Windows > > Ben Peart wr

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

2018-07-12 Thread Eric Sunshine
On Thu, Jul 12, 2018 at 12:56 PM Jeff King wrote: > Like Junio, I'm a little nervous that this is going to end up being a > maintenance burden. People may hit false positives and then be > confronted with this horrible mass of sed to try to figure out what went > wrong [...] A very valid concern.

[PATCH v4 03/23] multi-pack-index: add builtin

2018-07-12 Thread Derrick Stolee
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 --- .gitignore | 3 ++- Documentation/git-multi-pack-index.txt | 36 +++

[PATCH v4 00/23] Multi-pack-index (MIDX)

2018-07-12 Thread Derrick Stolee
v3 had a lot of interesting feedback, most of which was non-functional, but made a big impact on the shape of the patch, especially the test script. These are the important changes: * 'git multi-pack-index' will report usage if the 'write' verb is not provided, or if extra parameters are provid

[PATCH v4 01/23] multi-pack-index: add design document

2018-07-12 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- Documentation/technical/multi-pack-index.txt | 109 +++ 1 file changed, 109 insertions(+) create mode 100644 Documentation/technical/multi-pack-index.txt diff --git a/Documentation/technical/multi-pack-index.txt b/Documentation/technical/multi-

[PATCH v4 02/23] multi-pack-index: add format details

2018-07-12 Thread Derrick Stolee
The multi-pack-index feature generalizes the existing pack-index feature by indexing objects across multiple pack-files. Describe the basic file format, using a 12-byte header followed by a lookup table for a list of "chunks" which will be described later. The file ends with a footer containing a

[PATCH v4 05/23] midx: write header information to lockfile

2018-07-12 Thread Derrick Stolee
As we begin writing the multi-pack-index format to disk, start with the basics: the 12-byte header and the 20-byte checksum footer. Start with these basics so we can add the rest of the format in small increments. As we implement the format, we will use a technique to check that our computed offse

[PATCH v4 04/23] multi-pack-index: add 'write' verb

2018-07-12 Thread Derrick Stolee
In anticipation of writing multi-pack-indexes, add a skeleton 'git multi-pack-index write' subcommand and send the options to a write_midx_file() method. Also create a skeleton test script that tests the 'write' subcommand. Signed-off-by: Derrick Stolee --- Documentation/git-multi-pack-index.txt

[PATCH v4 06/23] multi-pack-index: load into memory

2018-07-12 Thread Derrick Stolee
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 --- Makefile| 1 + midx.c

[PATCH v4 07/23] t5319: expand test data

2018-07-12 Thread Derrick Stolee
As we build the multi-pack-index file format, we want to test the format on real repositories. Add tests that create repository data including multiple packfiles with both version 1 and version 2 formats. The current 'git multi-pack-index write' command will always write the same file with no "rea

[PATCH v4 11/23] midx: read pack names into array

2018-07-12 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- midx.c | 17 + midx.h | 1 + t/helper/test-read-midx.c | 5 + t/t5319-multi-pack-index.sh | 17 - 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/midx.c b/midx.c ind

[PATCH v4 10/23] multi-pack-index: write pack names in chunk

2018-07-12 Thread Derrick Stolee
The multi-pack-index needs to track which packfiles it indexes. Store these in our first required chunk. Since filenames are not well structured, add padding to keep good alignment in later chunks. Modify the 'git multi-pack-index read' subcommand to output the existence of the pack-file name chun

[PATCH v4 15/23] midx: write object offsets

2018-07-12 Thread Derrick Stolee
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 pack-index version 2 format by storing all offsets at least 2^

[PATCH v4 14/23] midx: write object id fanout chunk

2018-07-12 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- Documentation/technical/pack-format.txt | 5 +++ midx.c | 53 +++-- midx.h | 1 + t/helper/test-read-midx.c | 4 +- t/t5319-multi-pack-index.sh | 16

[PATCH v4 18/23] midx: use midx in abbreviation calculations

2018-07-12 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- midx.c | 11 + midx.h | 3 +++ packfile.c | 6 + packfile.h | 1 + sha1-name.c | 70 + 5 files changed, 91 insertions(+) diff --git a/midx.c b/midx.c index 182535933c..4e014ff6e3 1006

[PATCH v4 08/23] packfile: generalize pack directory list

2018-07-12 Thread Derrick Stolee
In anticipation of sharing the pack directory listing with the multi-pack-index, generalize prepare_packed_git_one() into for_each_file_in_pack_dir(). Signed-off-by: Derrick Stolee --- packfile.c | 101 + packfile.h | 6 2 files changed,

[PATCH v4 17/23] midx: read objects from multi-pack-index

2018-07-12 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- midx.c | 91 +- midx.h | 3 ++ packfile.c | 8 - 3 files changed, 100 insertions(+), 2 deletions(-) diff --git a/midx.c b/midx.c index 4090cf4ca4..182535933c 100644 --- a/midx.c +++ b/midx.c @@ -5

[PATCH v4 12/23] midx: sort and deduplicate objects from packfiles

2018-07-12 Thread Derrick Stolee
Before writing a list of objects and their offsets to a multi-pack-index, we need to collect the list of objects contained in the packfiles. There may be multiple copies of some objects, so this list must be deduplicated. It is possible to artificially get into a state where there are many duplica

[PATCH v4 09/23] multi-pack-index: read packfile list

2018-07-12 Thread Derrick Stolee
When constructing a multi-pack-index file for a given object directory, read the files within the enclosed pack directory and find matches that end with ".idx" and find the correct paired packfile using add_packed_git(). Signed-off-by: Derrick Stolee --- midx.c | 48

[PATCH v4 13/23] midx: write object ids in a chunk

2018-07-12 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- Documentation/technical/pack-format.txt | 4 +++ midx.c | 47 +++-- midx.h | 1 + t/helper/test-read-midx.c | 2 ++ t/t5319-multi-pack-index.sh | 4

[PATCH v4 16/23] config: create core.multiPackIndex setting

2018-07-12 Thread Derrick Stolee
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. Read this config setting in the new prepare_multi_pack_index_one() which is called during prepare_packed_git(). This check is run once

[PATCH v4 22/23] packfile: skip loading index if in multi-pack-index

2018-07-12 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- packfile.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/packfile.c b/packfile.c index 2c819a0ad8..e6ecf12ab5 100644 --- a/packfile.c +++ b/packfile.c @@ -469,8 +469,19 @@ static int open_packed_git_1(struct packed_git *

[PATCH v4 23/23] midx: clear midx on repack

2018-07-12 Thread Derrick Stolee
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| 9 + midx.c | 12 midx.h

[PATCH v4 19/23] midx: use existing midx when writing new one

2018-07-12 Thread Derrick Stolee
Due to how Windows handles replacing a lockfile when there is an open handle, create the close_midx() method to close the existing midx before writing the new one. Signed-off-by: Derrick Stolee --- midx.c | 116 ++--- midx.h | 1 + 2 files ch

[PATCH v4 21/23] midx: prevent duplicate packfile loads

2018-07-12 Thread Derrick Stolee
The multi-pack-index, when present, tracks the existence of objects and their offsets within a list of packfiles. This allows us to use the multi-pack-index for object lookups, abbreviations, and object counts. When the multi-pack-index tracks a packfile, then we do not need to add that packfile t

[PATCH v4 20/23] midx: use midx in approximate_object_count

2018-07-12 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- packfile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packfile.c b/packfile.c index c0eb5ac885..97e7812b6b 100644 --- a/packfile.c +++ b/packfile.c @@ -861,10 +861,13 @@ unsigned long approximate_object_count(void) { if (!the_repository->obje

[PATCH 0/6] git-submodule.sh: convert part of cmd_update to C

2018-07-12 Thread Stefan Beller
I thought about writing it all in one go, but the series got too large, so let's chew one bite at a time. Thanks, Stefan Stefan Beller (6): git-submodule.sh: align error reporting for update mode to use path git-submodule.sh: rename unused variables builtin/submodule--helper: factor out sub

[PATCH 2/6] git-submodule.sh: rename unused variables

2018-07-12 Thread Stefan Beller
The 'mode' variable is not used in cmd_update for its original purpose, rename it to 'dummy' as it only serves the purpose to abort quickly documenting this knowledge. The variable 'stage' is also not used any more in cmd_update, so remove it. This went unnoticed as first each function used the c

[PATCH 5/6] builtin/submodule--helper: factor out method to update a single submodule

2018-07-12 Thread Stefan Beller
In a later patch we'll find this method handy. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index c9c3fe2bf28..4bbf580df79 100644 -

[PATCH 1/6] git-submodule.sh: align error reporting for update mode to use path

2018-07-12 Thread Stefan Beller
All other error messages in cmd_update are reporting the submodule based on its path, so let's do that for invalid update modes, too. Signed-off-by: Stefan Beller --- git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-submodule.sh b/git-submodule.sh index 5f

[PATCH 6/6] submodule--helper: introduce new update-module-mode helper

2018-07-12 Thread Stefan Beller
This chews off a bit of the shell part of the update command in git-submodule.sh. When writing the C code, keep in mind that the submodule--helper part will go away eventually and we want to have a C function that is able to determine the submodule update strategy, it as a nicety, make determine_su

[PATCH 3/6] builtin/submodule--helper: factor out submodule updating

2018-07-12 Thread Stefan Beller
Separate the command line parsing from the actual execution of the command within the repository. For now there is not a lot of execution as most of it is still in git-submodule.sh. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 59 + 1 file ch

  1   2   >