Re: [PATCH v2 2/3] setup: do not use invalid `repository_format`

2019-01-16 Thread Martin Ågren
On Tue, 15 Jan 2019 at 20:31, Jeff King wrote: > > On Mon, Jan 14, 2019 at 07:34:56PM +0100, Martin Ågren wrote: > > > This can be observed by adding this to the end of > > `read_repository_format()`: > > > > if (format->version == -1) > > format->hash_algo = 0; /* no-one shoul

Re: [PATCH 1/5] compat/obstack: fix -Wcast-function-type warnings

2019-01-16 Thread SZEDER Gábor
On Tue, Jan 15, 2019 at 05:13:11PM -0800, Jonathan Nieder wrote: > Hi, > > SZEDER Gábor wrote: > > gnulib's obstack.{c,h} doesn't fix the issues that we've fixed in > > 3254310863 (obstack.c: Fix some sparse warnings, 2011-09-11) and > > d190a0875f (obstack: Fix portability issues, 2011-08-28). S

[PATCH v2 3/5] travis-ci: don't be '--quiet' when running the tests

2019-01-16 Thread SZEDER Gábor
All Travis CI build jobs run the test suite with 'make --quiet test'. On one hand, being quiet doesn't save us from much clutter in the output: $ make test |wc -l 861 $ make --quiet test |wc -l 848 It only spares 13 lines, mostly the output of entering the 't/' directory and the pre- and

[PATCH v2 0/5] travis-ci: build with the right compiler

2019-01-16 Thread SZEDER Gábor
Ever since we started using Travis CI, some of our Travis CI build jobs don't use the compiler they are supposed to. The last patch explains what's going on and fixes this issue. The first four patches are necessary cleanups/fixes to make the fix work. Changes since v1: - In patch 1, rename

[PATCH v2 5/5] travis-ci: build with the right compiler

2019-01-16 Thread SZEDER Gábor
Our 'Makefile' hardcodes the compiler to build Git as 'CC = cc'. This CC variable can be overridden from the command line, i.e. 'make CC=gcc-X.Y' will build with that particular GCC version, but not from the environment, i.e. 'CC=gcc-X.Y make' will still build with whatever 'cc' happens to be on t

[PATCH v2 1/5] compat/obstack: fix -Wcast-function-type warnings

2019-01-16 Thread SZEDER Gábor
GCC 8 introduced the new -Wcast-function-type warning, which is implied by -Wextra (which, in turn is enabled in our DEVELOPER flags). When building Git with GCC 8 and this warning enabled on a non-glibc platform [1], one is greeted with a screenful of compiler warnings/errors: compat/obstack.c:

[PATCH v2 4/5] travis-ci: switch to Xcode 10.1 macOS image

2019-01-16 Thread SZEDER Gábor
When building something with GCC installed from Homebrew in the default macOS (with Xcode 9.4) image on Travis CI, it errors out with something like this: /usr/local/Cellar/gcc/8.1.0/lib/gcc/8/gcc/x86_64-apple-darwin17.5.0/8.1.0/include-fixed/stdio.h:78:10: fatal error: _stdio.h: No such file

[PATCH v2 2/5] .gitignore: ignore external debug symbols from GCC on macOS

2019-01-16 Thread SZEDER Gábor
When Git is build with a "real" GCC on macOS [1], or at least with GCC installed via Homebrew, and CFLAGS includes the '-g' option (and our default CFLAGS does), then by default GCC writes the debug symbols into external files under '.dSYM/' directories (e.g. 'git-daemon.dSYM/', 'git.dSYM/', etc.).

[PATCH] repository.c: fix sparse warning

2019-01-16 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- Hi Duy, If you need to re-roll your 'nd/the-index-final' branch, could you please squash this into the relevant patch (commit 4478671442, "cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch", 2019-01-12). [the warning is caused by the lack of the extern dec

Minor typos in the documentation for git checkout

2019-01-16 Thread Rory O’Kane
I noticed some errors in one paragraph of the documentation for the argument of git-checkout. A convenient link to that documentation: https://git-scm.com/docs/git-checkout#git-checkout-ltbranchgt This is the current AsciiDoc source for that paragraph: You can use the `"@{-N}"` syntax to ref

Re: [PATCH v3 0/2] support for filtering trees and blobs based on depth

2019-01-16 Thread Matthew DeVore
On 2019/01/15 15:41, Junio C Hamano wrote: Junio C Hamano writes: This is turning out to be messier than I like. The topic is tangled with too many things in flight and I think I reduced its dependencies down to nd/the-index and sb/more-repo-in-api plus then-current tip of master (and that

Re: [PATCHv2 1/2] git-p4: add failing test for shelved CL update involving move

2019-01-16 Thread Mazo, Andrey
> > Updating a shelved P4 changelist where one or more files have > been moved does not work. Add a test for this. > > The problem is that P4 requires a complete list of the files being > changed, and move/rename only includes the _source_ in the case of > updating a shelved changelist. This resu

[WIP 1/8] tests: define GIT_TEST_PROTOCOL_VERSION

2019-01-16 Thread Jonathan Tan
Define a GIT_TEST_PROTOCOL_VERSION environment variable meant to be used from tests. When set, this ensures protocol.version is at least the given value, allowing the entire test suite to be run as if this configuration is in place for all repositories. As of this patch, all tests pass whether GIT

[WIP 3/8] t5503: fix overspecification of trace expectation

2019-01-16 Thread Jonathan Tan
In order to extract the wants from a trace, a loop in t5503 currently breaks if "" is found. This works for protocol v0 and v1, but not v2. Instead, teach t5503 to look specifically for the "want" string, which is compatible with all protocols. Signed-off-by: Jonathan Tan --- t/t5503-tagfoll

[WIP 0/8] Trying to revive GIT_TEST_PROTOCOL_VERSION

2019-01-16 Thread Jonathan Tan
Ævar, are you planning to revive GIT_TEST_PROTOCOL_VERSION? I have updated the patchset in light of some new branches that have appeared. This is on master merged with: - jk/proto-v2-hidden-refs-fix - tg/t5570-drop-racy-test - js/protocol-advertise-multi - jt/upload-pack-deepen-relative-proto-

[WIP 5/8] t5700: only run with protocol version 1

2019-01-16 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- t/t5700-protocol-v1.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/t5700-protocol-v1.sh b/t/t5700-protocol-v1.sh index 2e56c79233..9857bd0ecb 100755 --- a/t/t5700-protocol-v1.sh +++ b/t/t5700-protocol-v1.sh @@ -4,6 +4,9 @@ test_description='test git wi

[WIP 7/8] t5552: compensate for v2 filtering ref adv.

2019-01-16 Thread Jonathan Tan
Protocol v2 filters the ref advertisement, but protocol v0 does not. A test in t5552 uses the ref advertisement, so fix it to use protocol v0. Signed-off-by: Jonathan Tan --- t/t5552-skipping-fetch-negotiator.sh | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/t5552-skip

[WIP 4/8] t5512: compensate for v0 only sending HEAD symrefs

2019-01-16 Thread Jonathan Tan
Protocol v2 supports sending non-HEAD symrefs, but this is not true of protocol v0. Some tests expect protocol v0 behavior, so fix them to use protocol v0. Signed-off-by: Jonathan Tan --- t/t5512-ls-remote.sh | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a

[WIP 6/8] tests: fix protocol version for overspecifications

2019-01-16 Thread Jonathan Tan
These tests are also marked with a NEEDSWORK comment. Signed-off-by: Jonathan Tan --- t/t5515-fetch-merge-logic.sh | 4 t/t5539-fetch-http-shallow.sh | 5 - t/t5541-http-push-smart.sh| 14 -- t/t5551-http-fetch-smart.sh | 34 ++ 4 fil

[WIP 2/8] tests: always test fetch of unreachable with v0

2019-01-16 Thread Jonathan Tan
Some tests check that fetching an unreachable object fails, but protocol v2 allows such fetches. Unset GIT_TEST_PROTOCOL_VERSION so that these tests are always run using protocol v0. Signed-off-by: Jonathan Tan --- t/t5500-fetch-pack.sh | 4 +++- t/t5516-fetch-push.sh | 22 +

[WIP 8/8] remote-curl: in v2, fill credentials if needed

2019-01-16 Thread Jonathan Tan
In post_rpc(), remote-curl calls credential_fill() if HTTP_REAUTH is returned, but this is not true in proxy_request(). Do this in proxy_request() too. When t5551 is run using GIT_TEST_PROTOCOL_VERSION=2, one of the tests that used to fail now pass. Signed-off-by: Jonathan Tan --- remote-curl.c

Re: [PATCH 03/10] submodule add: support multiple worktrees

2019-01-16 Thread Stefan Beller
> --- /dev/null > +++ b/t/t2405-worktree-submodules.sh > @@ -0,0 +1,42 @@ > +#!/bin/sh > + > +test_description='multiple worktrees as superprojects' > + > +. ./test-lib.sh > + > +test_expect_success 'set up submodule source' ' > + test_create_repo submodsrc && > + ( > + cd

Re: [PATCH 01/10] doc: about submodule support with multiple worktrees

2019-01-16 Thread Stefan Beller
> The third problem is a big and complicaed one. Submodule clones complicated > (inside the superproject) are per-worktree. So if you have two > worktrees, and these have one submodule, you need space for _two_ > clones. This is definitely not elegant. The tenative plan is to move tentative? >

Re: [PATCH v2 1/1] Use size_t instead of 'unsigned long' for data in memory

2019-01-16 Thread Thomas Braun
Am 20.11.2018 um 06:04 schrieb tbo...@web.de: I'm interested in helping getting this forward! > What we really need for this patch to fly are this branches: > mk/use-size-t-in-zlib In pu. > tb/print-size-t-with-uintmax-format in master. > And then it is rebased on top of all cooking stuff, to

Re: Broken interactive rebase text after some UTF-8 characters

2019-01-16 Thread Michal Nowak
Hello Phillip, thanks for reaching out. This is what I see with your suggested command: $ GIT_SEQUENCE_EDITOR=cat git rebase -i 08487eea68a2fa501b5042131c6db068089f82e1 hint: Waiting for your editor to close the file... pick 1ea94c756c 10202 loader: use screen-#rows to find bottom left co-ord

Re: What's cooking in git.git (Jan 2019, #02; Tue, 15)

2019-01-16 Thread Thomas Gummerer
On 01/15, Junio C Hamano wrote: > * ps/stash-in-c (2019-01-04) 27 commits > - tests: add a special setup where stash.useBuiltin is off > - stash: optionally use the scripted version again > - stash: add back the original, scripted `git stash` > - stash: convert `stash--helper.c` into `stash.c`

Re: [PATCH 1/1] t6042: work around speed optimization on Windows

2019-01-16 Thread Elijah Newren
Hi Dscho, On Wed, Jan 16, 2019 at 12:31 PM Johannes Schindelin wrote: > > Hi Elijah, > > On Wed, 16 Jan 2019, Elijah Newren wrote: > > > On Wed, Jan 16, 2019 at 5:37 AM Johannes Schindelin via GitGitGadget > > wrote: > > > > > > From: Johannes Schindelin > > > > > > When Git determines whether

Re: [PATCH 0/1] t6042: fix breakage on Windows

2019-01-16 Thread Johannes Schindelin
Hi Elijah, On Wed, 16 Jan 2019, Elijah Newren wrote: > Hi Dscho, > > On Wed, Jan 16, 2019 at 5:37 AM Johannes Schindelin via GitGitGadget > wrote: > > > > Unfortunately, Travis decided to change some things under the hood that > > affect the Windows build. As a consequence, master has not been

Re: [PATCH 1/1] t6042: work around speed optimization on Windows

2019-01-16 Thread Johannes Schindelin
Hi Elijah, On Wed, 16 Jan 2019, Elijah Newren wrote: > On Wed, Jan 16, 2019 at 5:37 AM Johannes Schindelin via GitGitGadget > wrote: > > > > From: Johannes Schindelin > > > > When Git determines whether a file has changed, it looks at the mtime, > > at the file size, and to detect changes even

[PATCH v3 4/4] tests: define GIT_TEST_SIDEBAND_ALL

2019-01-16 Thread Jonathan Tan
Define a GIT_TEST_SIDEBAND_ALL environment variable meant to be used from tests. When set to true, this overrides uploadpack.allowsidebandall to true, allowing the entire test suite to be run as if this configuration is in place for all repositories. As of this patch, all tests pass whether GIT_TE

[PATCH v3 3/4] {fetch,upload}-pack: sideband v2 fetch response

2019-01-16 Thread Jonathan Tan
Currently, a response to a fetch request has sideband support only while the packfile is being sent, meaning that the server cannot send notices until the start of the packfile. Extend sideband support in protocol v2 fetch responses to the whole response. upload-pack will advertise it if the uploa

[PATCH v3 1/4] pkt-line: introduce struct packet_writer

2019-01-16 Thread Jonathan Tan
A future patch will allow the client to request multiplexing of the entire fetch response (and not only during packfile transmission), which in turn allows the server to send progress and keepalive messages at any time during the response. It will be convenient for a future patch if writing option

[PATCH v3 2/4] sideband: reverse its dependency on pkt-line

2019-01-16 Thread Jonathan Tan
A subsequent patch will teach struct packet_reader a new field that, if set, instructs it to interpret read data as multiplexed. This will create a dependency from pkt-line to sideband. To avoid a circular dependency, split recv_sideband() into 2 parts: the reading loop (left in recv_sideband()) a

[PATCH v3 0/4] Sideband the whole fetch v2 response

2019-01-16 Thread Jonathan Tan
Like previous versions, this is on origin/ms/packet-err-check. First of all, thanks to those who noticed the issue with t5409. I have merged sg/stress-test and ran: make DEVELOPER=1 && (cd t && sh ./t5409-col*.sh --stress) with no issues. demultiplex_sideband() now requires its caller to ma

Re: [PATCH v2 2/4] sideband: reverse its dependency on pkt-line

2019-01-16 Thread SZEDER Gábor
On Wed, Jan 16, 2019 at 09:43:19AM -0800, Jonathan Tan wrote: > > On Tue, Jan 15, 2019 at 11:40:28AM -0800, Jonathan Tan wrote: > > In the last couple of days I noticed occasional but frequent failures > > in the test 'leading space' in 't5409-colorize-remote-messas.sh' on > Thanks for checking.

Stage or discard a hunk at a time?

2019-01-16 Thread Cameron Steffen
Hello, I have this feature idea for git. There should be a command that effectively combines git add -p and git checkout -p so that I can navigate changed hunks and either stage or discard them. There is already a SO question asking about this exactly... https://stackoverflow.com/questions/115386

[PATCH v5 3/5] revision: implement sparse algorithm

2019-01-16 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee When enumerating objects to place in a pack-file during 'git pack-objects --revs', we discover the "frontier" of commits that we care about and the boundary with commit we find uninteresting. From that point, we walk trees to discover which trees and blobs are uninteresting.

[PATCH v5 1/5] revision: add mark_tree_uninteresting_sparse

2019-01-16 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee In preparation for a new algorithm that walks fewer trees when creating a pack from a set of revisions, create a method that takes an oidset of tree oids and marks reachable objects as UNINTERESTING. The current implementation uses the existing mark_tree_uninteresting to rec

[PATCH v5 4/5] pack-objects: create pack.useSparse setting

2019-01-16 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The '--sparse' flag in 'git pack-objects' changes the algorithm used to enumerate objects to one that is faster for individual users pushing new objects that change only a small cone of the working directory. The sparse algorithm is not recommended for a server, which likely

[PATCH v5 5/5] pack-objects: create GIT_TEST_PACK_SPARSE

2019-01-16 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee Create a test variable GIT_TEST_PACK_SPARSE to enable the sparse object walk algorithm by default during the test suite. Enabling this variable ensures coverage in many interesting cases, such as shallow clones, partial clones, and missing objects. Signed-off-by: Derrick Sto

[PATCH v5 2/5] list-objects: consume sparse tree walk

2019-01-16 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee When creating a pack-file using 'git pack-objects --revs' we provide a list of interesting and uninteresting commits. For example, a push operation would make the local topic branch be interesting and the known remote refs as uninteresting. We want to discover the set of new

[PATCH v5 0/5] Add a new "sparse" tree walk algorithm

2019-01-16 Thread Derrick Stolee via GitGitGadget
One of the biggest remaining pain points for users of very large repositories is the time it takes to run 'git push'. We inspected some slow pushes by our developers and found that the "Enumerating Objects" phase of a push was very slow. This is unsurprising, because this is why reachability bitmap

Git Test Coverage Report (Wed Jan 16)

2019-01-16 Thread Derrick Stolee
Here is today's test coverage report. Thanks, -Stolee [1] https://dev.azure.com/git/git/_build/results?buildId=303 --- pu: 8df4a8d850bb2115f6e24d1e45a2d58700f66ece jch: 7529c1c1876fbd86faf08d8e45080e5bdde0ca9a next: 40155ab247a57ccc696d2ded09336b2c5203e832 master: 77556354bb7ac50450e3b28999e35

Re: [PATCH v2 2/4] sideband: reverse its dependency on pkt-line

2019-01-16 Thread Jonathan Tan
> On Tue, Jan 15, 2019 at 11:40:28AM -0800, Jonathan Tan wrote: > > A subsequent patch will teach struct packet_reader a new field that, if > > set, instructs it to interpret read data as multiplexed. This will > > create a dependency from pkt-line to sideband. > > > > To avoid a circular dependen

submodule.recurse should apply to clone

2019-01-16 Thread Tim Hutt
For some reason submodule.recurse applies to everything except clone. Is there a reason for this strange inconsistency? Cheers, Tim

Re: [PATCH 1/1] t6042: work around speed optimization on Windows

2019-01-16 Thread Elijah Newren
Hi Dscho, On Wed, Jan 16, 2019 at 5:37 AM Johannes Schindelin via GitGitGadget wrote: > > From: Johannes Schindelin > > When Git determines whether a file has changed, it looks at the mtime, > at the file size, and to detect changes even if the mtime is the same > (on Windows, the mtime granular

Re: null pointer dereference in refs/file-backend

2019-01-16 Thread René Scharfe
Am 16.01.2019 um 10:18 schrieb Carlo Arenas: > while running HEAD cppcheck against git HEAD got the following error, > that seem to be in the code all the way to maint: > > [refs/files-backend.c:2681] -> [refs.c:1044] -> [cache.h:1075]: > (error) Null pointer dereference: src > > the code that uses

Re: [PATCH 0/1] t6042: fix breakage on Windows

2019-01-16 Thread Elijah Newren
Hi Dscho, On Wed, Jan 16, 2019 at 5:37 AM Johannes Schindelin via GitGitGadget wrote: > > Unfortunately, Travis decided to change some things under the hood that > affect the Windows build. As a consequence, master has not been tested in > quite a while, even if the test runs pretended that it ha

I am Mrs Rita Brown

2019-01-16 Thread Rita Brown
Dear Friend I am Mrs Rita Brown.I want to transfer the sum of 9.5M USD to your account.50% will be for you while 30%will be for charity and 20% will be for my personal doctor . No risk involved. Contact my doctor for more details .I have cancer at pelvic and i cannot determine my fate presently Ki

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

2019-01-16 Thread Ben Peart
On 1/3/2019 5:05 PM, Anthony Sottile wrote: On Thu, Jan 3, 2019 at 1:51 PM Junio C Hamano wrote: Anthony Sottile writes: On Thu, Jan 3, 2019 at 12:26 PM Junio C Hamano wrote: A "fix" to Ben's optimization for this particular case should be fairly straight-forward. I think we have a sp

Re: [PATCH 2/6] commit: copy saved getenv() result

2019-01-16 Thread Johannes Schindelin
Hi Peff, On Tue, 15 Jan 2019, Jeff King wrote: > On Tue, Jan 15, 2019 at 11:25:45AM -0800, Stefan Beller wrote: > > > > Stefan was routinely running coverity, though I haven't seen results in > > > a while. I think we should make sure that continues, as it did turn up > > > some useful results (

Re: [PATCH v2 00/13] Offer to run CI/PR builds in Azure Pipelines

2019-01-16 Thread Johannes Schindelin
Hi Junio, On Thu, 25 Oct 2018, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > > For a long time already, we have Git's source code continuously tested via > > Travis CI, see e.g. https://travis-ci.org/git/git/builds/421738884. It has > > served us well, and more an

Re: [PATCH 0/1] Be careful about left-over files from git add --edit runs

2019-01-16 Thread Johannes Schindelin
Hi Junio, On Tue, 15 Jan 2019, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > I didn't realize that "add -e" codepath was so old until today to > check with "git blame" to see how old this bug was (it predates the > transition from builtin-foo.c to builtin/foo.c);

[PATCH 0/1] t6042: fix breakage on Windows

2019-01-16 Thread Johannes Schindelin via GitGitGadget
Unfortunately, Travis decided to change some things under the hood that affect the Windows build. As a consequence, master has not been tested in quite a while, even if the test runs pretended that it had been tested :-( So imagine my surprise when master simply would refuse to pass the test suite

[PATCH 1/1] t6042: work around speed optimization on Windows

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When Git determines whether a file has changed, it looks at the mtime, at the file size, and to detect changes even if the mtime is the same (on Windows, the mtime granularity is 100ns, read: if two files are written within the same 100ns time slot, they have the same mt

[PATCH v3 19/21] tests: optionally skip bin-wrappers/

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This speeds up the tests by a bit on Windows, where running Unix shell scripts (and spawning processes) is not exactly a cheap operation. Signed-off-by: Johannes Schindelin --- t/README | 9 + t/test-lib.sh | 19 +-- 2 files changed, 22 i

[PATCH v3 05/21] ci: use a junction on Windows instead of a symlink

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Symbolic links are still not quite as easy to use on Windows as on Linux (for example, on versions older than Windows 10, only administrators can create symlinks, and on Windows 10 you still need to be in developer mode for regular users to have permission), but NTFS jun

[PATCH v3 16/21] mingw: try to work around issues with the test cleanup

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin It seems that every once in a while in the Git for Windows SDK, there are some transient file locking issues preventing the test clean up to delete the trash directory. Let's be gentle and try again five seconds later, and only error out if it still fails the second time

[PATCH v3 07/21] tests: optionally write results as JUnit-style .xml

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This will come in handy when publishing the results of Git's test suite during an automated Azure DevOps run. Note: we need to make extra sure that invalid UTF-8 encoding is turned into valid UTF-8 (using the Replacement Character, \uFFFD) because t9902's trace contains

[PATCH v3 14/21] tests: avoid calling Perl just to determine file sizes

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin It is a bit ridiculous to spin up a full-blown Perl instance (especially on Windows, where that means spinning up a full POSIX emulation layer, AKA the MSYS2 runtime) just to tell how large a given file is. So let's just use the test-tool to do that job instead. This c

[PATCH v3 15/21] tests: include detailed trace logs with --write-junit-xml upon failure

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The JUnit XML format lends itself to be presented in a powerful UI, where you can drill down to the information you are interested in very quickly. For test failures, this usually means that you want to see the detailed trace of the failing tests. With Travis CI, we pa

[PATCH v3 06/21] test-date: add a subcommand to measure times in shell scripts

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin In the next commit, we want to teach Git's test suite to optionally output test results in JUnit-style .xml files. These files contain information about the time spent. So we need a way to measure time. While we could use `date +%s` for that, this will give us only seco

[PATCH v3 10/21] ci: move the Windows job to the top

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The Windows job currently takes a whopping ~1h20m to complete. Which is *far* longer than the next-longest job takes (linux-gcc, ~35m). As such, it makes sense to start the Windows job first, to minimize the overall run time (which is now pretty safely the run time of th

[PATCH v3 04/21] ci: inherit --jobs via MAKEFLAGS in run-build-and-tests

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Let's not decide in the generic ci/ script how many jobs to run in parallel; it is easy enough to hand that information down via the `MAKEFLAGS`. Signed-off-by: Johannes Schindelin --- ci/run-build-and-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH v3 08/21] ci/lib.sh: add support for Azure Pipelines

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This patch introduces a conditional arm that defines some environment variables and a function that displays the URL given the job id (to identify previous runs for known-good trees). For example, we do not have to install the git-lfs and gettext packages on Azure Pipel

[PATCH v3 11/21] ci: use git-sdk-64-minimal build artifact

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Instead of a shallow fetch followed by a sparse checkout, we are better off by using a separate, dedicated Pipeline that bundles the SDK as a build artifact, and then consuming that build artifact here. In fact, since this artifact will be used a lot, we spent substanti

[PATCH v3 18/21] t0061: fix with --with-dashes and RUNTIME_PREFIX

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When building Git with RUNTIME_PREFIX and starting a test helper from t/helper/, it fails to detect the system prefix correctly. This is the reason that the warning RUNTIME_PREFIX requested, but prefix computation failed. [...] to be printed. In t0061, we did

[PATCH v3 03/21] ci/lib.sh: encapsulate Travis-specific things

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The upcoming patches will allow building git.git via Azure Pipelines (i.e. Azure DevOps' Continuous Integration), where variable names and URLs look a bit different than in Travis CI. Signed-off-by: Johannes Schindelin --- ci/install-dependencies.sh | 3 ++- ci/lib.s

[PATCH v3 21/21] ci: parallelize testing on Windows

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The fact that Git's test suite is implemented in Unix shell script that is as portable as we can muster, combined with the fact that Unix shell scripting is foreign to Windows (and therefore has to be emulated), results in pretty abysmal speed of the test suite on that p

[PATCH v3 02/21] ci: rename the library of common functions

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The name is hard-coded to reflect that we use Travis CI for continuous testing. In the next commits, we will extend this to be able use Azure DevOps, too. So let's adjust the name to make it more generic. Signed-off-by: Johannes Schindelin --- ci/install-dependencie

[PATCH v3 01/21] travis: fix skipping tagged releases

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When building a PR, TRAVIS_BRANCH refers to the *target branch*. Therefore, if a PR targets `master`, and `master` happened to be tagged, we skipped the build by mistake. Fix this by using TRAVIS_PULL_REQUEST_BRANCH (i.e. the *source branch*) when available, falling bac

[PATCH v3 09/21] Add a build definition for Azure DevOps

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This commit adds an azure-pipelines.yml file which is Azure DevOps' equivalent to Travis CI's .travis.yml. To make things a bit easier to understand, we refrain from using the `matrix` feature here because (while it is powerful) it can be a bit confusing to users who ar

[PATCH v3 17/21] tests: add t/helper/ to the PATH with --with-dashes

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin We really need to be able to find the test helpers... Really. This change was forgotten when we moved the test helpers into t/helper/ Signed-off-by: Johannes Schindelin --- t/test-lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/test-lib.sh

[PATCH v3 13/21] README: add a build badge (status of the Azure Pipelines build)

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Just like so many other OSS projects, we now also have a build badge. Signed-off-by: Johannes Schindelin --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f920a42fad..764c480c66 100644 --- a/README.md +++ b/README.md @@ -1

[PATCH v3 20/21] ci: speed up Windows phase

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin As Unix shell scripting comes at a hefty price on Windows, we have to see where we can save some time to run the test suite. Let's skip the chain linting and the bin-wrappers/ redirection on Windows; this seems to shave of anywhere between 10-30% from the overall runtim

[PATCH v3 12/21] mingw: be more generous when wrapping up the setitimer() emulation

2019-01-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Every once in a while, the Azure Pipeline fails with some semi-random error: timer thread did not terminate timely This error message means that the thread that is used to emulate the setitimer() function did not terminate within 1,000 milliseconds. The most l

[PATCH v3 00/21] Offer to run CI/PR builds in Azure Pipelines

2019-01-16 Thread Johannes Schindelin via GitGitGadget
For a long time already, we have tested Git's source code continuously via Travis CI, see e.g. https://travis-ci.org/git/git/builds/421738884. It has served us well, and more and more developers actually pay attention and benefit from the testing this gives us. It is also an invaluable tool for co

[PATCH v5 5/9] commit-graph write: show progress for object search

2019-01-16 Thread Ævar Arnfjörð Bjarmason
Show the percentage progress for the "Finding commits for commit graph" phase for the common case where we're operating on all packs in the repository, as "commit-graph write" or "gc" will do. Before we'd emit on e.g. linux.git with "commit-graph write": Finding commits for commit graph: 6529

[PATCH v5 7/9] commit-graph write: remove empty line for readability

2019-01-16 Thread Ævar Arnfjörð Bjarmason
Remove the empty line between a QSORT(...) and the subsequent oideq() for-loop. This makes it clearer that the QSORT(...) is being done so that we can run the oideq() loop on adjacent OIDs. Amends code added in 08fd81c9b6 ("commit-graph: implement write_commit_graph()", 2018-04-02). Signed-off-by:

[PATCH v5 8/9] commit-graph write: add itermediate progress

2019-01-16 Thread Ævar Arnfjörð Bjarmason
Add progress output to sections of code between "Annotating[...]" and "Computing[...]generation numbers". This can collectively take 5-10 seconds on a large enough repository. On a test repository with I have with ~7 million commits and ~50 million objects we'll now emit: $ ~/g/git/git --exec

[PATCH v5 0/9] commit-graph write: progress output improvements

2019-01-16 Thread Ævar Arnfjörð Bjarmason
This was reviewed & discussed shortly before 2.20 went out the door, but the changes deemed too significant during the RC period, and instead we had my much smaller 01ca387774 ("commit-graph: split up close_reachable() progress output", 2018-11-19) as a fix. That's now landed in master, and this v

[PATCH v5 6/9] commit-graph write: add more descriptive progress output

2019-01-16 Thread Ævar Arnfjörð Bjarmason
Make the progress output shown when we're searching for commits to include in the graph more descriptive. This amends code I added in 7b0f229222 ("commit-graph write: add progress output", 2018-09-17). Now, on linux.git, we'll emit this sort of output in the various modes we support: $ git co

[PATCH v5 3/9] commit-graph write: add "Writing out" progress output

2019-01-16 Thread Ævar Arnfjörð Bjarmason
Add progress output to be shown when we're writing out the commit-graph, this adds to the output already added in 7b0f229222 ("commit-graph write: add progress output", 2018-09-17). As noted in that commit most of the progress output isn't displayed on small repositories, but before this change we

[PATCH v5 4/9] commit-graph write: more descriptive "writing out" output

2019-01-16 Thread Ævar Arnfjörð Bjarmason
Make the "Writing out" part of the progress output more descriptive. Depending on the shape of the graph we either make 3 or 4 passes over it. Let's present this information to the user in case they're wondering what this number, which is much larger than their number of commits, has to do with wr

[PATCH v5 9/9] commit-graph write: emit a percentage for all progress

2019-01-16 Thread Ævar Arnfjörð Bjarmason
Follow-up 01ca387774 ("commit-graph: split up close_reachable() progress output", 2018-11-19) by making the progress bars in close_reachable() report a completion percentage. This fixes the last occurrence where in the commit graph writing where we didn't report that. The change in 01ca387774 spli

[PATCH v5 1/9] commit-graph: rename 'num_extra_edges' variable to 'num_large_edges'

2019-01-16 Thread Ævar Arnfjörð Bjarmason
From: SZEDER Gábor The commit graph file format describes an optional 'Large Edge List' chunk, and the function writing out this chunk is called write_graph_chunk_large_edges(). Then there are two functions in 'commit-graph.c', namely write_graph_chunk_data() and write_commit_graph(), which have

[PATCH v5 2/9] commit-graph: don't call write_graph_chunk_large_edges() unnecessarily

2019-01-16 Thread Ævar Arnfjörð Bjarmason
From: SZEDER Gábor The optional 'Large Edge List' chunk of the commit graph file stores parent information for commits with more than two parents. Since the chunk is optional, write_commit_graph() looks through all commits to find those with more than two parents, and then writes the commit grap

Re: [PATCH/RFC v1 1/1] test-lint: sed -E (or -a, -l) are not portable

2019-01-16 Thread Ævar Arnfjörð Bjarmason
On Tue, Jan 15 2019, tbo...@web.de wrote: > From: Torsten Bögershausen > > From `man sed` (on a Mac OS X box): > The -E, -a and -i options are non-standard FreeBSD extensions and may not be > available > on other operating systems. > > From `man sed` on a Linux box: > REGULAR EXPRESSIONS >

Re: [PATCH] helper/test-ref-store: fix "new-sha1" vs "old-sha1" typo

2019-01-16 Thread Christian Couder
On Mon, Jan 7, 2019 at 1:53 PM Duy Nguyen wrote: > > On Sun, Jan 6, 2019 at 10:46 PM Christian Couder > wrote: > > > > It looks like it is a copy-paste error made in 80f2a6097c > > (t/helper: add test-ref-store to test ref-store functions, > > 2017-03-26) to pass "old-sha1" instead of "new-sha1"

Re: [PATCH v2 2/4] sideband: reverse its dependency on pkt-line

2019-01-16 Thread SZEDER Gábor
On Tue, Jan 15, 2019 at 11:40:28AM -0800, Jonathan Tan wrote: > A subsequent patch will teach struct packet_reader a new field that, if > set, instructs it to interpret read data as multiplexed. This will > create a dependency from pkt-line to sideband. > > To avoid a circular dependency, split re

Re: Broken interactive rebase text after some UTF-8 characters

2019-01-16 Thread Phillip Wood
Dear Michal Thanks for the bug report, unfortunately I'm unable to reproduce it here using git 2.20.1 (see below). Knowing a little about how the todo list is created I cannot think how multibyte characters would break it. What command line were you using to start the rebase? Best Wishes Ph

[PATCH 09/10] submodule clone: propagate extensions.worktreeConfig

2019-01-16 Thread Nguyễn Thái Ngọc Duy
If this extension is already enabled on the superproject, the user likes to use multiple worktrees very much and is already aware of it. Enable it in submodules too so that when they want to make secondary submodule worktrees, they will not be worried about enabling it or migrating per-worktree con

[PATCH 08/10] submodule clone: use repo_config_set()

2019-01-16 Thread Nguyễn Thái Ngọc Duy
Avoid direct access to $SUBMODULE/config and do it through repo_config_set() instead. Note that repo_submodule_init() cannot be used because this early in the submodule initialization process, we may fail to get and parse .gitmodules with submodule_from_path(). Signed-off-by: Nguyễn Thái Ngọc Duy

[PATCH 03/10] submodule add: support multiple worktrees

2019-01-16 Thread Nguyễn Thái Ngọc Duy
The entire submodule section in the superproject will be per-worktree and written to $GIT_DIR/config.worktree. The behavior when you only have one worktree (and not enabled extensions.worktreeConfig) is the same as before, everything is still written in $GIT_DIR/config 'submodule-helper config --

[PATCH 06/10] submodule sync: support multiple worktrees

2019-01-16 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/submodule--helper.c| 12 +++- t/t2405-worktree-submodules.sh | 33 + 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 6b749b41

[PATCH 02/10] submodule--helper: add missing \n

2019-01-16 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/submodule--helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index d38113a31a..232bfaac7f 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c

[PATCH 05/10] submodule update: add tests for multiple worktrees

2019-01-16 Thread Nguyễn Thái Ngọc Duy
There are no changes needed for 'submodule update'. The clones will be per-worktree and all the support is already in place. Add a test to make sure it actually works. Signed-off-by: Nguyễn Thái Ngọc Duy --- t/t2405-worktree-submodules.sh | 11 +++ 1 file changed, 11 insertions(+) diff

[PATCH 10/10] submodule ensure-core-worktree: write to config.worktree

2019-01-16 Thread Nguyễn Thái Ngọc Duy
Use repo_config_set_worktree_gently() to write core.worktree. If the submodule has extensions.worktreeConfig on, the key will be in config.worktree instead of config file and not affect any new submodule's worktrees. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/submodule--helper.c | 8 +++

[PATCH 04/10] submodule init: support multiple worktrees

2019-01-16 Thread Nguyễn Thái Ngọc Duy
The entire submodule section in the superproject will be per-worktree and written to $GIT_DIR/config.worktree. The behavior when you only have one worktree (and not enabled extensions.worktreeConfig) is the same as before, everything is still written in $GIT_DIR/config Signed-off-by: Nguyễn Thái

[PATCH 07/10] submodule deinit: support multiple worktrees

2019-01-16 Thread Nguyễn Thái Ngọc Duy
This is the reverse of 'init' or 'add', config from superproject is removed from config.worktree (or just config in standard single worktree setup) Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/submodule--helper.c| 8 ++-- t/t2405-worktree-submodules.sh | 11 +++ 2 files chang

  1   2   >