[RFC PATCH 3/5] split index: add a test to demonstrate the racy split index problem

2018-09-05 Thread SZEDER Gábor
git update-index' writes the newly added file's cache entry to the split index, the third 'git update-index's do_write_index() now has a chance to look at this entry, notices its raciness, and writes smudged stat data to the new split index. [1] In the branch l

[PATCH 2/5] t0090: disable GIT_TEST_SPLIT_INDEX for the test checking split index

2018-09-05 Thread SZEDER Gábor
for this test to avoid unintended random index splitting. Signed-off-by: SZEDER Gábor --- t/t0090-cache-tree.sh | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/t/t0090-cache-tree.sh b/t/t0090-cache-tree.sh index 7de40141ca..65b5152b9b 100755 --- a/t/t0090

[PATCH 1/5] t1700-split-index: drop unnecessary 'grep'

2018-09-05 Thread SZEDER Gábor
The test 'disable split index' in 't1700-split-index.sh' runs the following pipeline: cmd | grep | sed s/// Drop that 'grep' from the pipeline, and let 'sed' take over its duties. Signed-off-by: SZEDER Gábor --- t/t1700-split-index.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[RFC PATCH 4/5] t1700-split-index: date back files to avoid racy situations

2018-09-05 Thread SZEDER Gábor
0' to fail. Let's prepare 't1700-split-index.sh' for this upcoming change and modify its tests to avoid racily clean files by backdating the mtime of any file modifications (and since a lot of tests create or modify files, encapsulate it into a helper function). Signed-off-by: SZEDER Gábor --- t/t

[RFC PATCH 5/5] split-index: smudge and add racily clean cache entries to split index

2018-09-05 Thread SZEDER Gábor
ading to the merge commit v2.1.0-rc0~45 (Merge branch 'nd/split-index', 2014-07-16). Signed-off-by: SZEDER Gábor --- cache.h | 2 ++ read-cache.c| 2 +- split-index.c | 12 +++- t/t1701-racy-split-index.sh | 4 +--- 4 files ch

[RFC PATCH 0/5] Fix the racy split index problem

2018-09-05 Thread SZEDER Gábor
to be read already in the commit messages of patches 3 and 5. RFC, because I'm not sure that the fix in patch 5 is the best fix for this issue. ... and because I usually don't dive this deep into core stuff during my Git hacking adventures, so who knows what subtleties I might have missed. SZEDER

Re: What's cooking in git.git (Sep 2018, #01; Tue, 4)

2018-09-05 Thread SZEDER Gábor
On Wed, Sep 05, 2018 at 06:48:06PM +0200, Duy Nguyen wrote: > On Wed, Sep 5, 2018 at 6:35 PM Junio C Hamano wrote: > > > > Junio C Hamano writes: > > > > > Here are the topics that have been cooking. Commits prefixed with > > > '-' are only in 'pu' (proposed updates) while commits prefixed with

[PATCH] Documentation/git.txt: clarify that GIT_TRACE=/path appends

2018-09-03 Thread SZEDER Gábor
ppended. Signed-off-by: SZEDER Gábor --- Documentation/git.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git.txt b/Documentation/git.txt index dba7f0c18e..74a9d7edb4 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -599,8 +599

Re: [PATCH 2/3] Add test for commit --dry-run --short.

2018-09-01 Thread SZEDER Gábor
On Thu, Aug 30, 2018 at 10:39:20PM -0700, Stephen P. Smith wrote: > diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh > index 810d4cea7..fc69da816 100755 > --- a/t/t7501-commit.sh > +++ b/t/t7501-commit.sh > @@ -682,4 +682,14 @@ test_expect_success '--dry-run with conflicts fixed from > a merge'

Re: [PATCH 1/2] t2013: add test for missing but active submodule

2018-08-29 Thread SZEDER Gábor
On Mon, Aug 27, 2018 at 03:12:56PM -0700, Stefan Beller wrote: > When cloning a superproject with the option > --recurse-submodules='.', it is easy to find yourself wanting > a submodule active, but not having that submodule present in > the modules directory. > > Signed-off-by: Stefan Beller >

[PATCH] t/lib-rebase.sh: support explicit 'pick' commands in 'fake_editor.sh'

2018-08-23 Thread SZEDER Gábor
the FAKE_LINES variable (e.g. to error out when encountering unknown rebase commands or commands and line numbers in the wrong order). Signed-off-by: SZEDER Gábor --- t/lib-rebase.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh index 25a77ee5c

Re: [PATCH] t6018-rev-list-glob: fix 'empty stdin' test

2018-08-22 Thread SZEDER Gábor
On Wed, Aug 22, 2018 at 7:53 PM Eric Sunshine wrote: > Can you say a word or two (here in the email thread) about how you're > finding these failures (across the various test fixes you've posted > recently)? Are you instrumenting the code in some fashion? Or, finding > them by visual inspection?

[PATCH 1/2] t3903-stash: don't try to grep non-existing file

2018-08-22 Thread SZEDER Gábor
-by: SZEDER Gábor --- t/t3903-stash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index 1f871d3cca..6450bc6698 100755 --- a/t/t3903-stash.sh +++ b/t/t3903-stash.sh @@ -724,7 +724,7 @@ test_expect_success 'store updates stash ref and reflog

[PATCH 2/2] t3420-rebase-autostash: don't try to grep non-existing files

2018-08-22 Thread SZEDER Gábor
avoiding unexpected errors from 'grep' as well. Signed-off-by: SZEDER Gábor --- t/t3420-rebase-autostash.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh index e243700660..0c4eefec76 100755 --- a/t/t3420-rebase

[PATCH] t6018-rev-list-glob: fix 'empty stdin' test

2018-08-22 Thread SZEDER Gábor
it.) Signed-off-by: SZEDER Gábor --- t/t6018-rev-list-glob.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t6018-rev-list-glob.sh b/t/t6018-rev-list-glob.sh index 02936c2f24..0bf10d0686 100755 --- a/t/t6018-rev-list-glob.sh +++ b/t/t6018-rev-list-glob.sh @@ -256,7 +256,7

[PATCH 2/2] t4051-diff-function-context: read the right file

2018-08-22 Thread SZEDER Gábor
The test ' context does not include preceding empty lines' in the block of tests 'change with long common tail and no context' in 't4051-diff-function-context.sh' tries to read the file 'long_common_tail.diff.diff', but that file doesn't exist as its name contains one more '.diff' suffixes than

[PATCH 1/2] t0020-crlf: check the right file

2018-08-22 Thread SZEDER Gábor
the name of the file to be checked. Signed-off-by: SZEDER Gábor --- t/t0020-crlf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh index 5f056982a5..854da0ae16 100755 --- a/t/t0020-crlf.sh +++ b/t/t0020-crlf.sh @@ -160,7 +160,7

[PATCH] t7501-commit: drop silly command substitution

2018-08-21 Thread SZEDER Gábor
re that 'git merge' fails. Signed-off-by: SZEDER Gábor --- t/t7501-commit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh index 51646d8019..d766bf34c4 100755 --- a/t/t7501-commit.sh +++ b/t/t7501-commit.sh @@ -677,7 +677,7 @@ test_exp

[PATCH 4/4] tests: use 'test_must_be_empty' instead of 'test_cmp '

2018-08-19 Thread SZEDER Gábor
Signed-off-by: SZEDER Gábor --- There is also a related discussion about 'test_cmp' and empty files starting at: https://public-inbox.org/git/CAM0VKj=rw14mblbxvujiiwf05txo1tu6a8xzy+_3rhoytx8...@mail.gmail.com/T/#md31427850f3ccf8de8252703a49ee431f7e0a6b8 t/t0001-init.sh

[PATCH 2/4] tests: use 'test_must_be_empty' instead of 'test ! -s'

2018-08-19 Thread SZEDER Gábor
was created by: sed -i -e 's/test ! -s/test_must_be_empty/' t[0-9]*.sh Signed-off-by: SZEDER Gábor --- t/t4201-shortlog.sh | 2 +- t/t4211-line-log.sh | 2 +- t/t8010-cat-file-filters.sh | 2 +- t/t9802-git-p4-filetype.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 0/4] tests: make more use of 'test_must_be_empty'

2018-08-19 Thread SZEDER Gábor
This series is a continuation of and applies on top of 'ab/test-must-be-empty-for-master', and converts even more places to use 'test_must_be_empty'. There are still a bunch of cases in the form of 'test -z "$(cmd...)"' that could use 'test_must_be_empty'... maybe someday. SZEDE

[PATCH 1/4] tests: use 'test_must_be_empty' instead of '! test -s'

2018-08-19 Thread SZEDER Gábor
those 'test -f' commands are removed as well. Signed-off-by: SZEDER Gábor --- That dedicated patch to t7508 can be found at: https://public-inbox.org/git/20180818175606.24108-1-szeder@gmail.com/ t/t-basic.sh | 2 +- t/t0090-cache-tree.sh

[PATCH 3/4] tests: use 'test_must_be_empty' instead of 'test_cmp /dev/null '

2018-08-19 Thread SZEDER Gábor
not fail in an empty repo' in 't7401-submodule-summary.sh', where it was 'test_cmp output /dev/null'. Signed-off-by: SZEDER Gábor --- t/t3210-pack-refs.sh | 6 +++--- t/t3308-notes-merge.sh| 2 +- t/t3310-notes-merge-manual-resolve.sh | 8 t/t4047-diff

[RFC PATCH] t7508-status: fix a bogus check in a submodule-related test

2018-08-18 Thread SZEDER Gábor
ing tests or even later in the same test, all running 'git status' in similar situations. So drop that bogus check, and verify that 'git status's output matches what's otherwise expected in similar cases. Signed-off-by: SZEDER Gábor --- This is a submodules-related test, and I'm not ver

Re: [PATCH] t5310-pack-bitmaps: fix bogus 'pack-objects to file can use bitmap' test

2018-08-17 Thread SZEDER Gábor
On Fri, Aug 17, 2018 at 9:27 PM Andrei Rybak wrote: > > On 17/08/18 19:39, SZEDER Gábor wrote: > > > > See, we have quite a few tests that extract repetitive common tasks > > into helper functions, which sometimes includes preparing the expected > > results and runn

Re: [PATCH] t5310-pack-bitmaps: fix bogus 'pack-objects to file can use bitmap' test

2018-08-17 Thread SZEDER Gábor
On Fri, Aug 17, 2018 at 12:36 AM Junio C Hamano wrote: > > Andrei Rybak writes: > > > On 14/08/18 13:47, SZEDER Gábor wrote: > >> ... both > >> invocations produce empty 'pack{a,b}.objects' files, and the > >> subsequent 'test_cmp' hap

[PATCH] t5310-pack-bitmaps: fix bogus 'pack-objects to file can use bitmap' test

2018-08-14 Thread SZEDER Gábor
in that function by replacing it with an &&-chained pair of commands using an intermediate file, so a failure of 'git show-index' or the shell redirection will fail the test. Signed-off-by: SZEDER Gábor --- t/t5310-pack-bitmaps.sh | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/t

Re: [PATCHv3 0/5] Simple fixes to t7406

2018-08-13 Thread SZEDER Gábor
On Tue, Aug 7, 2018 at 6:49 PM Elijah Newren wrote: > Since folks like to notice other problems with t7406 while reading my > patches, here's a challenge: > > Find something *else* wrong with t7406 that neither I nor any of the > reviewers so far have caught that could be fixed. Well, I'd

[PATCH v2] t5318: use 'test_cmp_bin' to compare commit-graph files

2018-08-13 Thread SZEDER Gábor
errick Stolee Signed-off-by: SZEDER Gábor --- Same diff, updated commit message, including Derrick's Reviewed-by. t/t5318-commit-graph.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh index 4f17d7701e..1c148ebf21

Re: [PATCH] t5318: use 'test_cmp_bin' to compare commit-graph files

2018-08-13 Thread SZEDER Gábor
On Mon, Aug 13, 2018 at 1:24 PM Derrick Stolee wrote: > > On 8/12/2018 4:18 PM, SZEDER Gábor wrote: > > The commit-graph files are binary files, so they should not be > > compared with 'test_cmp', because that might cause issues on Windows, > > where 'test_cmp' is

[PATCH] t5318: avoid unnecessary command substitutions

2018-08-12 Thread SZEDER Gábor
. Signed-off-by: SZEDER Gábor --- t/t5318-commit-graph.sh | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh index 1c148ebf21..3c1ffad491 100755 --- a/t/t5318-commit-graph.sh +++ b/t/t5318-commit-graph.sh @@ -444,25

[PATCH] t5318: use 'test_cmp_bin' to compare commit-graph files

2018-08-12 Thread SZEDER Gábor
The commit-graph files are binary files, so they should not be compared with 'test_cmp', because that might cause issues on Windows, where 'test_cmp' is a shell function to deal with random LF-CRLF conversions. Use 'test_cmp_bin' instead. Signed-off-by: SZEDER Gábor --- t/t5318-commit-graph.sh

Re: [PATCH v3 1/1] clone: report duplicate entries on case-insensitive filesystems

2018-08-11 Thread SZEDER Gábor
> Paths that only differ in case work fine in a case-sensitive > filesystems, but if those repos are cloned in a case-insensitive one, > you'll get problems. The first thing to notice is "git status" will > never be clean with no indication what exactly is "dirty". > > This patch helps the

Re: [PATCH v3 2/8] Add delta-islands.{c,h}

2018-08-11 Thread SZEDER Gábor
> diff --git a/delta-islands.c b/delta-islands.c > new file mode 100644 > index 00..448ddcbbe4 > --- /dev/null > +++ b/delta-islands.c > +static void deduplicate_islands(void) > +{ > + struct remote_island *island, *core = NULL, **list; > + unsigned int island_count, dst, src,

Re: [PATCH] travis-ci: include the trash directories of failed tests in the trace log

2018-08-07 Thread SZEDER Gábor
On Tue, Aug 7, 2018 at 5:12 PM Lars Schneider wrote: > > > On Aug 1, 2018, at 12:56 AM, SZEDER Gábor wrote: > > > > The trash directory of a failed test might contain invaluable > > information about the cause of the failure, but we have no access to > > the tra

Re: [PATCH 3/3] t7406: make a test_must_fail call fail for the right reason

2018-08-07 Thread SZEDER Gábor
> A test making use of test_must_fail was failing like this: > fatal: ambiguous argument '|': unknown revision or path not in the working > tree. > when the intent was to verify that a specific string was not found > in the output of the git diff command, i.e. that grep returned > non-zero.

[BUG] 'git ls-files --no-exclude' segfault & co

2018-08-06 Thread SZEDER Gábor
'git ls-files' has the options '--exclude', '--exclude-from', '--exclude-per-directory', and '--exclude-standard', which all work fine. However, it also allows the negated version of all these four options, and they definitely don't work very well: $ git ls-files --no-exclude Segmentation

Re: [PATCH 2/3] t7406: avoid having git commands upstream of a pipe

2018-08-06 Thread SZEDER Gábor
> When a git command is on the left side of a pipe, the pipe will swallow > its exit status, preventing us from detecting failures in said commands. > Restructure the tests to put the output in a temporary file to avoid > this problem. > > Signed-off-by: Elijah Newren > --- >

Re: t5570-git-daemon fails with SIGPIPE on OSX

2018-08-06 Thread SZEDER Gábor
[Resending with Clemens' last used email address. Clemens, please consider sending a patch to update our .mailmap file.] On Mon, Aug 6, 2018 at 5:11 PM SZEDER Gábor wrote: > > Travis CI changed its default OSX image to use XCode 9.4 on 2018-07-31 > [1]. Since then OSX build jobs fa

t5570-git-daemon fails with SIGPIPE on OSX

2018-08-06 Thread SZEDER Gábor
Travis CI changed its default OSX image to use XCode 9.4 on 2018-07-31 [1]. Since then OSX build jobs fail rather frequently because of a SIGPIPE in the tests 'fetch notices corrupt pack' or 'fetch notices corrupt idx' in 't5570-git-daemon.sh' [2]. I think this is a symptom a real bug in Git

Re: [PATCH v7 21/22] gc: automatically write commit-graph files

2018-08-03 Thread SZEDER Gábor
Hi Derrick, > The commit-graph file is a very helpful feature for speeding up git > operations. In order to make it more useful, make it possible to > write the commit-graph file during standard garbage collection > operations. > > Add a 'gc.commitGraph' config setting that triggers writing a

Re: [RFC PATCH v2 03/12] t7411: be nicer to future tests and really clean things up

2018-08-02 Thread SZEDER Gábor
> Tests 5 and 8 in t/t7411-submodule-config.sh add two commits with > invalid lines in .gitmodules but then only the second commit is removed. > > This may affect future subsequent tests if they assume that the > .gitmodules file has no errors. > > Since those commits are not needed anymore

[PoC] coccinelle: make Coccinelle-related make targets more fine-grained

2018-08-02 Thread SZEDER Gábor
This approach uses $(eval), which we haven't used in any of our Makefiles yet. I wonder whether it's portable enough. And it's ugly and complicated. Signed-off-by: SZEDER Gábor --- Makefile | 52 --- contrib/coccinelle/.gitigno

Re: [PATCH] t1404: increase core.packedRefsTimeout to avoid occasional test failure

2018-07-31 Thread SZEDER Gábor
On Wed, Aug 1, 2018 at 1:39 AM Jonathan Nieder wrote: > SZEDER Gábor wrote: > > > While 3secs timeout seems plenty, and indeed is sufficient in most > > cases, on rare occasions it's just not quite enough: I saw this test > > fail in Travis CI build jobs two, maybe

[PATCH] t1404: increase core.packedRefsTimeout to avoid occasional test failure

2018-07-31 Thread SZEDER Gábor
problems, e.g. the Travis CI build job will exceed its time limit anyway, or the lockfile module is broken. Signed-off-by: SZEDER Gábor --- t/t1404-update-ref-errors.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref

[PATCH] travis-ci: include the trash directories of failed tests in the trace log

2018-07-31 Thread SZEDER Gábor
ories when the combined size of the included base64-encoded blocks would exceed 1MB. Signed-off-by: SZEDER Gábor --- Notes: This is an improved version of the PoC mentioned some months ago at: https://public-inbox.org/git/20180122182717.21539-1-szeder@gmail.com/ I'm stil

Re: [PATCH 1/1] Add the `p4-pre-submit` hook

2018-07-31 Thread SZEDER Gábor
> diff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh > index 4849edc4e..2b7baa95d 100755 > --- a/t/t9800-git-p4-basic.sh > +++ b/t/t9800-git-p4-basic.sh > @@ -261,6 +261,35 @@ test_expect_success 'unresolvable host in P4PORT should > display error' ' > ) > ' > > +# Test

Re: [PATCH] tests: make use of the test_must_be_empty function

2018-07-30 Thread SZEDER Gábor
On Fri, Jul 27, 2018 at 7:48 PM Ævar Arnfjörð Bjarmason wrote: > > Change various tests that use an idiom of the form: > > >expect && > test_cmp expect actual > > To instead use: > > test_must_be_empty actual Thanks for working on this. > The test_must_be_empty() wrapper was

Re: [PATCH v3 00/10] fsck: doc fixes & fetch.fsck.* implementation

2018-07-30 Thread SZEDER Gábor
't5504-fetch-receive-strict.sh', in particular the test 'push with transfer.fsckobjects' failed on me while building this branch the other day, caused by 'test_cmp' failing, because 'git push' didn't print anything to its standard input. I was unable to reproduce the failure with the usual

Re: [GSoC][PATCH v4 15/20] rebase -i: rewrite write_basic_state() in C

2018-07-30 Thread SZEDER Gábor
> diff --git a/sequencer.c b/sequencer.c > index 1c035ceec7..d257903db0 100644 > --- a/sequencer.c > +++ b/sequencer.c > +int write_basic_state(struct replay_opts *opts, const char *head_name, > + const char *onto, const char *orig_head) > +{ > + const char *quiet =

Re: Using Environment variable GIT_CONFIG does not work as expected

2018-07-30 Thread SZEDER Gábor
> I have a shared linux account which is used by multiple developers. > But I would like to have git commit history configured so that I can > see who made a change to common repository (so that author of the > commit would be correct person, not shared user). There are reasons > why developers

Re: [PATCH v1 03/25] structured-logging: add structured logging framework

2018-07-26 Thread SZEDER Gábor
> +void slog_set_command_name(const char *command_name) > +{ > + /* > + * Capture the command name even if logging is not enabled > + * because we don't know if the config has been loaded yet by > + * the cmd_() and/or it may be too early to force a > + * lazy load. > +

Re: [PATCH 2/2] travis-ci: fail if Coccinelle static analysis found something to transform

2018-07-26 Thread SZEDER Gábor
On Mon, Jul 23, 2018 at 3:02 PM SZEDER Gábor wrote: > The only way to draw attention in such an automated setting is to fail > the build job. Therefore, modify the 'ci/run-static-analysis.sh' > build script to check all the resulting '*.cocci.patch' files, and > fail the buil

Re: [PATCH v8 3/3] http-backend: respect CONTENT_LENGTH for receive-pack

2018-07-25 Thread SZEDER Gábor
On Wed, Jul 25, 2018 at 4:51 PM Max Kirillov wrote: > > On Wed, Jul 25, 2018 at 02:14:35PM +0200, SZEDER Gábor wrote: > >> +# sometimes there is fatal error buit the result is still 200 > >> +if grep 'fatal:' act.err > >> +then > >> +

Re: [PATCH v8 3/3] http-backend: respect CONTENT_LENGTH for receive-pack

2018-07-25 Thread SZEDER Gábor
[Hrm, this time with hopefully proper In-Reply-To: header. Sorry for the double post.] > Push passes to another commands, as described in > https://public-inbox.org/git/20171129032214.gb32...@sigill.intra.peff.net/ > > As it gets complicated to correctly track the data length, instead

Re: [PATCH v8 3/3] http-backend: respect CONTENT_LENGTH for receive-pack

2018-07-25 Thread SZEDER Gábor
> Push passes to another commands, as described in > https://public-inbox.org/git/20171129032214.gb32...@sigill.intra.peff.net/ > > As it gets complicated to correctly track the data length, instead transfer > the data through parent process and cut the pipe as the specified length is > reached.

Re: [PATCH 3/5] coccinelle: exclude sha1dc source files from static analysis

2018-07-23 Thread SZEDER Gábor
On Mon, Jul 23, 2018 at 8:28 PM Eric Sunshine wrote: > > On Mon, Jul 23, 2018 at 9:51 AM SZEDER Gábor wrote: > > sha1dc is an external library, that we carry in-tree for convenience > > or grab as a submodule, so there is no use in applying our semantic > > pat

[PATCH 4/5] coccinelle: put sane filenames into output patches

2018-07-23 Thread SZEDER Gábor
'). Signed-off-by: SZEDER Gábor --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 73e2d16926..72ea29df4e 100644 --- a/Makefile +++ b/Makefile @@ -564,7 +564,7 @@ SPATCH = spatch export TCL_PATH TCLTK_PATH SPARSE_FLAGS = -SPATCH_FLAGS = --all

[PATCH 5/5] coccinelle: extract dedicated make target to clean Coccinelle's results

2018-07-23 Thread SZEDER Gábor
Sometimes I want to remove only Coccinelle's results, but keep all other build artifacts left after my usual 'make all man' build. This new 'cocciclean' make target will allow just that. Signed-off-by: SZEDER Gábor --- Makefile | 8 +--- 1 file changed, 5 insertions(+), 3 deletions

[PATCH 3/5] coccinelle: exclude sha1dc source files from static analysis

2018-07-23 Thread SZEDER Gábor
git source tree. Signed-off-by: SZEDER Gábor --- Makefile | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8f509576e9..73e2d16926 100644 --- a/Makefile +++ b/Makefile @@ -2666,10 +2666,16 @@ check: command-list.h fi C_SOURCES

[PATCH 2/5] coccinelle: use $(addsuffix) in 'coccicheck' make target

2018-07-23 Thread SZEDER Gábor
The dependencies of the 'coccicheck' make target are listed with the help of the $(patsubst) make function, which in this case doesn't do any pattern substitution, but only adds the '.patch' suffix. Use the shorter and more idiomatic $(addsuffix) make function instead. Signed-off-by: SZEDER

[PATCH 1/5] coccinelle: mark the 'coccicheck' make target as .PHONY

2018-07-23 Thread SZEDER Gábor
The 'coccicheck' target doesn't create a file with the same name, so mark it as .PHONY. Signed-off-by: SZEDER Gábor --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index e4b503d259..27bfc196dd 100644 --- a/Makefile +++ b/Makefile @@ -2685,6 +2685,8

[PATCH 0/5] Misc Coccinelle-related improvements

2018-07-23 Thread SZEDER Gábor
Just a couple of minor Coccinelle-related improvements: - The first two patches are small cleanups. - The last three could make life perhaps just a tad bit easier for devs running 'make coccicheck'. SZEDER Gábor (5): coccinelle: mark the 'coccicheck' make target as .PHONY

[PATCH 3/2 for pb/bisect-helper-2] squash! bisect--helper: `bisect_start` shell function partially in C

2018-07-23 Thread SZEDER Gábor
bisect--helper: use oid_to_hex() Signed-off-by: SZEDER Gábor --- builtin/bisect--helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c index fc02f889e6..eac4c27787 100644 --- a/builtin/bisect--helper.c +++ b/builtin

[PATCH 2/2] travis-ci: fail if Coccinelle static analysis found something to transform

2018-07-23 Thread SZEDER Gábor
of them turns out to be not empty. Include those files' contents, i.e. Coccinelle's suggested transformations, in the build job's trace log, so we'll know why it failed. Signed-off-by: SZEDER Gábor --- ci/run-static-analysis.sh | 19 +++ 1 file changed, 19 insertions(+) diff

[PATCH 1/2] travis-ci: run Coccinelle static analysis with two parallel jobs

2018-07-23 Thread SZEDER Gábor
don't seem to bring further runtime benefits. Signed-off-by: SZEDER Gábor --- ci/run-static-analysis.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/run-static-analysis.sh b/ci/run-static-analysis.sh index fe4ee4e06b..fa719c9ef9 100755 --- a/ci/run-static-analysis.sh +++ b

[PATCH 0/2] travis-ci: fail if Coccinelle found something to transform

2018-07-23 Thread SZEDER Gábor
. - pb/bisect-helper-2: this topic has not seen an update in about 9 months, so I'll send a followup patch 3/2 to be applied on top or squashed in, whichever is deemed better. SZEDER Gábor (2): travis-ci: run Coccinelle static analysis with two parallel jobs travis-ci: fail

Re: [PATCH 01/15] contrib: add cocci script to replace index compat macros

2018-07-23 Thread SZEDER Gábor
On Tue, Jun 19, 2018 at 5:21 PM Derrick Stolee wrote: > > On 6/19/2018 10:51 AM, Duy Nguyen wrote: > > Do we run 'make coccicheck' > > automatically somewhere? If true, I need to move this script elsewhere > > because it's meant to run manually. You run it when you intend to do > > more manual

[PATCH] t9300: wait for background fast-import process to die after killing it

2018-07-19 Thread SZEDER Gábor
h, ksh93 and mksh) even without any of the verbose options, because they don't print messages like these in non-interactive mode in the first place. Signed-off-by: SZEDER Gábor --- t/t9300-fast-import.sh | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/t9300-fast-import

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

2018-07-19 Thread SZEDER Gábor
> On Mon, 16 Jul 2018, Junio C Hamano wrote: > > > Jeff King writes: > > > > > None of which is too surprising. The root of the bug is in the > > > conversion to rebase--helper, I think, when presumably we started > > > setting GIT_DIR at all (but I didn't dig further). Then 09d7b6c6fa fixed >

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

2018-07-17 Thread SZEDER Gábor
On Thu, Jul 12, 2018 at 8:35 PM Junio C Hamano wrote: > > 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 > >>&

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

2018-07-17 Thread SZEDER Gábor
> diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c > index 034ba1bb2e0..d4cb7c72e33 100644 > --- a/builtin/submodule--helper.c > +++ b/builtin/submodule--helper.c > +static int module_update_module_mode(int argc, const char **argv, const char > *prefix) > +{ > +

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

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

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

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

2018-07-12 Thread SZEDER Gábor
patch. (and necessary adjustments to the subsequent patches because of conflicts) Interdiff included below. (I wanted to include range-diff, but it didn't make any sense) SZEDER Gábor (3): t5541: clean up truncating access log t/lib-httpd: add the strip_access_log() helper function t

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

2018-07-12 Thread SZEDER Gábor
helper function 'strip_access_log' in 'lib-httpd.sh', and use it in all of those tests. Signed-off-by: SZEDER Gábor --- t/lib-httpd.sh | 9 + t/t5541-http-push-smart.sh | 14 ++ t/t5551-http-fetch-smart.sh | 7 +-- t/t5561-http-backend.sh | 7 +-- 4

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

2018-07-12 Thread SZEDER Gábor
uld be performed in four tests in three test scripts, put this into a new helper function 'check_access_log' in 't/lib-httpd.sh'. Signed-off-by: SZEDER Gábor --- t/lib-httpd.sh | 12 t/t5541-http-push-smart.sh | 6 ++ t/t5551-http-fetch-smart.sh | 3 +-- t/t5561-h

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

2018-07-12 Thread SZEDER Gábor
by specifying it as a 'test_when_finished' command. Signed-off-by: SZEDER Gábor --- t/t5541-http-push-smart.sh | 12 1 file changed, 4 insertions(+), 8 deletions(-) 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

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

2018-07-11 Thread SZEDER Gábor
On Wed, Jul 11, 2018 at 4:57 PM Jeff King wrote: > > On Wed, Jul 11, 2018 at 02:56:47PM +0200, SZEDER Gábor wrote: > > > +# Requires one argument: the name of a file containing the expected > > stripped > > +# access log entries. > > +check_access_log() {

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

2018-07-11 Thread SZEDER Gábor
uld be performed in four tests in three test scripts, put this into a new helper function 'check_access_log' in 't/lib-httpd.sh'. Signed-off-by: SZEDER Gábor --- t/lib-httpd.sh | 12 t/t5541-http-push-smart.sh | 13 + t/t5551-http-fetch-smart.sh | 3 +-- t/t5

[PATCH v2 1/3] t5541: avoid empty line when truncating access log

2018-07-11 Thread SZEDER Gábor
g's contents must consider this improper truncation and include an empty line in the expected content. There is no need for that newline at all, so drop the 'echo' from the truncation and adjust the expected content accordingly. Signed-off-by: SZEDER Gábor --- t/t5541-http-push-smart.sh | 3 +--

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

2018-07-11 Thread SZEDER Gábor
helper function 'strip_access_log' in 'lib-httpd.sh', and use it in all of those tests. Signed-off-by: SZEDER Gábor --- t/lib-httpd.sh | 9 + t/t5541-http-push-smart.sh | 14 ++ t/t5551-http-fetch-smart.sh | 7 +-- t/t5561-http-backend.sh | 7 +-- 4

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

2018-07-11 Thread SZEDER Gábor
/git/20180614123107.11608-1-szeder@gmail.com/T/#u The first two patches are identical to those in v1, and the last patch implements a different and simpler fix than in v1, following Peff's suggestion. The third patch was dropped, because it's not necessary for this simpler fix. SZEDER Gábor

Re: [RFC PATCH 4/4] t/lib-httpd: sort log based on timestamp to avoid occasional failure

2018-07-11 Thread SZEDER Gábor
On Thu, Jun 14, 2018 at 7:53 PM Jeff King wrote: > > On Thu, Jun 14, 2018 at 02:31:07PM +0200, SZEDER Gábor wrote: > > > The last test of 't5561-http-backend.sh', 'server request log matches > > test results' may fail occasionally, because the order of entries in > >

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

2018-07-11 Thread SZEDER Gábor
On Wed, Jun 27, 2018 at 8:28 PM SZEDER Gábor wrote: > > > diff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh > > index 03bf1b8a3b..11546d6e14 100755 > > --- a/t/t3418-rebase-continue.sh > > +++ b/t/t3418-rebase-continue.sh > > @@ -74,6 +74,

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

2018-07-11 Thread SZEDER Gábor
> 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). A shortest augmenting > path > + * algorithm for dense and sparse

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

2018-07-11 Thread SZEDER Gábor
> 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 reading from the >

Re: [PATCH v7 06/22] commit-graph: load a root tree from specific graph

2018-07-11 Thread SZEDER Gábor
> When lazy-loading a tree for a commit, it will be important to select > the tree from a specific struct commit_graph. Create a new method that > specifies the commit-graph file and use that in > get_commit_tree_in_graph(). > > Signed-off-by: Derrick Stolee > --- > commit-graph.c | 12

Re: [PATCH v2 4/9] t6044: add a testcase for index matching head, when head doesn't match HEAD

2018-07-10 Thread SZEDER Gábor
> diff --git a/t/t6044-merge-unrelated-index-changes.sh > b/t/t6044-merge-unrelated-index-changes.sh > index f9c2f8179..92ec55255 100755 > --- a/t/t6044-merge-unrelated-index-changes.sh > +++ b/t/t6044-merge-unrelated-index-changes.sh > @@ -126,6 +126,17 @@ test_expect_failure 'recursive, when

Re: [PATCH v2 6/6] commit-graph: add repo arg to graph readers

2018-07-10 Thread SZEDER Gábor
> diff --git a/t/helper/test-repository.c b/t/helper/test-repository.c > new file mode 100644 > index 00..5fff540a26 > --- /dev/null > +++ b/t/helper/test-repository.c > @@ -0,0 +1,88 @@ > +#include "test-tool.h" > +#include "cache.h" > +#include "commit-graph.h" > +#include "commit.h" >

Re: [PATCH 3/4] ref-filter: merge get_obj and get_object

2018-07-10 Thread SZEDER Gábor
> This causes GCC to complain thusly: > > > ``` > 2018-07-10T04:59:38.6368270Z ref-filter.c:1477:6: error: variable 'eaten' is > used uninitialized whenever 'if' condition is false > [-Werror,-Wsometimes-uninitialized] > 2018-07-10T04:59:38.6468620Z if (oi->info.contentp) { >

Re: [PATCH 3/4] ref-filter: merge get_obj and get_object

2018-07-10 Thread SZEDER Gábor
> static int get_object(struct ref_array_item *ref, const struct object_id > *oid, > -int deref, struct object **obj, struct strbuf *err) > + int deref, struct object **obj, struct strbuf *err) > { > int eaten; Here the variable 'eaten' is

Re: [PATCH v2] gc --auto: clear repository before auto packing

2018-07-07 Thread SZEDER Gábor
On Wed, Jul 4, 2018 at 10:16 PM Kim Gybels wrote: > diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh > index e402aee6a2..ef599c11cd 100755 > --- a/t/t5510-fetch.sh > +++ b/t/t5510-fetch.sh > @@ -828,10 +828,12 @@ test_expect_success 'fetching with auto-gc does not > lock up' ' >

Re: [PATCH] gc --auto: release pack files before auto packing

2018-07-07 Thread SZEDER Gábor
On Fri, Jul 6, 2018 at 6:39 PM Junio C Hamano wrote: > > Duy Nguyen writes: > > > On Sat, Jun 30, 2018 at 03:38:21PM +0200, Kim Gybels wrote: > >> Teach gc --auto to release pack files before auto packing the repository > >> to prevent failures when removing them. > >> > >> Also teach the test

Re: [PATCH v5 3/8] block alloc: add lifecycle APIs for cache_entry structs

2018-06-28 Thread SZEDER Gábor
> diff --git a/read-cache.c b/read-cache.c > index 9624ce1784..116fd51680 100644 > --- a/read-cache.c > +++ b/read-cache.c > +struct cache_entry *make_transient_cache_entry(unsigned int mode, const > struct object_id *oid, > +const char *path, int

Re: [PATCH v5 2/8] read-cache: make_cache_entry should take object_id struct

2018-06-28 Thread SZEDER Gábor
> The make_cache_entry function should take an object_id struct instead > of sha. > diff --git a/read-cache.c b/read-cache.c > index fa8366ecab..9624ce1784 100644 > --- a/read-cache.c > +++ b/read-cache.c > @@ -746,8 +746,10 @@ int add_file_to_index(struct index_state *istate, const > char

Re: [PATCH v2 1/2] t3418: add testcase showing problems with rebase

2018-06-27 Thread SZEDER Gábor
> Am 27.06.2018 um 19:27 schrieb Elijah Newren: > > On Wed, Jun 27, 2018 at 9:54 AM, Junio C Hamano wrote: > >> Having said that, it would be simpler for at least the latter to > >> write it using a single-shot environment assignment, perhaps? I.e. > >> > >> PATH=./test-bin:$PATH git

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

2018-06-27 Thread SZEDER Gábor
> diff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh > index 03bf1b8a3b..11546d6e14 100755 > --- a/t/t3418-rebase-continue.sh > +++ b/t/t3418-rebase-continue.sh > @@ -74,6 +74,38 @@ test_expect_success 'rebase --continue remembers merge > strategy and options' ' > test -f

Re: [PATCH v3 8/8] diff.c: add white space mode to move detection that allows indent changes

2018-06-23 Thread SZEDER Gábor
> diff --git a/diff.c b/diff.c > index 040b46545e5..9e357111864 100644 > --- a/diff.c > +++ b/diff.c > @@ -302,12 +302,18 @@ static int parse_color_moved_ws(const char *arg) > ret |= XDF_IGNORE_WHITESPACE_AT_EOL; > else if (!strcmp(sb.buf, "ignore-all-space")) >

Re: [PATCH v3 1/7] git-rebase.txt: document incompatible options

2018-06-22 Thread SZEDER Gábor
> @@ -487,6 +510,52 @@ recreates the topic branch with fresh commits so it can > be remerged > successfully without needing to "revert the reversion" (see the > link:howto/revert-a-faulty-merge.html[revert-a-faulty-merge How-To] for > details). > > +INCOMPATIBLE OPTIONS >

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