Re: [2.22.0] difftool no longer passes through to git diff if diff.tool is unset

2019-06-19 Thread Jeff King
On Wed, Jun 19, 2019 at 10:45:17PM -0400, Denton Liu wrote: > Using the following command on git.git, > > $ HOME=/dev/null ./git --exec-path=. difftool --no-index color.c color.h > > I did a quick bisect on the issue and it seems like the cause of this > bug is actually 287ab28bfa (diff: r

What's cooking in git.git (Jun 2019, #05; Wed, 19)

2019-06-19 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. The second batch of topics post 2.

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-19 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > This is probably just my itch. Every time I have to do something with > the index, I need to add a little bit code here, a little bit there to > get a better "view" of the index. ;-) JSON is not particularly my cup-of-tea but it is better than many other things

Re: [GSoC][PATCH v5 4/5] cherry-pick/revert: add --skip option

2019-06-19 Thread Junio C Hamano
Rohit Ashiwal writes: > +give_advice: > + advise(_("have you committed already?\n" > + "try \"git %s --continue\""), > + action == REPLAY_REVERT ? "revert" : "cherry-pick"); > + return error(_("there is nothing to skip")); > +} Two comments. The places touched

Re: [2.22.0] difftool no longer passes through to git diff if diff.tool is unset

2019-06-19 Thread Denton Liu
On Wed, Jun 19, 2019 at 09:17:44PM -0400, Denton Liu wrote: > Hi Logan, > > On Wed, Jun 19, 2019 at 11:54:22PM +, Pugh, Logan wrote: > > Note: This issue was originally discussed on this StackOverflow thread: > > https://stackoverflow.com/q/56675863 > > > > Prior to Git version 2.22.0 I was

[PATCH] doc: mention that 'git submodule update' fetches missing commits

2019-06-19 Thread Philippe Blain
'git submodule update' will fetch new commits from the submodule remote if the SHA-1 recorded in the superproject is not found. This was not mentioned in the documentation. Signed-off-by: Philippe Blain --- Documentation/git-submodule.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [2.22.0] difftool no longer passes through to git diff if diff.tool is unset

2019-06-19 Thread Denton Liu
Hi Logan, On Wed, Jun 19, 2019 at 11:54:22PM +, Pugh, Logan wrote: > Note: This issue was originally discussed on this StackOverflow thread: > https://stackoverflow.com/q/56675863 > > Prior to Git version 2.22.0 I was able to use git difftool without > configuring diff.tool or merge.tool an

[2.22.0] difftool no longer passes through to git diff if diff.tool is unset

2019-06-19 Thread Pugh, Logan
Note: This issue was originally discussed on this StackOverflow thread: https://stackoverflow.com/q/56675863 Prior to Git version 2.22.0 I was able to use git difftool without configuring diff.tool or merge.tool and it would show the diff using git diff. E.g. with Git 2.21.0: ~/gits/src/git$ g

Re: [PATCH] documentation: add tutorial for revision walking

2019-06-19 Thread Emily Shaffer
On Wed, Jun 19, 2019 at 04:13:35AM -0400, Eric Sunshine wrote: > On Mon, Jun 17, 2019 at 7:20 PM Emily Shaffer wrote: > > On Fri, Jun 07, 2019 at 02:21:07AM -0400, Eric Sunshine wrote: > > > On Thu, Jun 6, 2019 at 9:08 PM Emily Shaffer > > > wrote: > > > > +int cmd_walken(int argc, const char **

[PATCH 6/6] tests: make GIT_TEST_FAIL_PREREQS a boolean

2019-06-19 Thread Ævar Arnfjörð Bjarmason
Change the GIT_TEST_FAIL_PREREQS variable from being "non-empty?" to being a more standard boolean variable. I recently added the variable in dfe1a17df9 ("tests: add a special setup where prerequisites fail", 2019-05-13), having to add another "non-empty?" special-case is what prompted me to write

[PATCH 5/6] tests: replace test_tristate with "git env--helper"

2019-06-19 Thread Ævar Arnfjörð Bjarmason
The test_tristate helper introduced in 83d842dc8c ("tests: turn on network daemon tests by default", 2014-02-10) can now be better implemented with "git env--helper" to give the variables in question the standard boolean behavior. The reason for the "tristate" was to have all of false/true/auto, w

[PATCH 0/6] Change GIT_TEST_* variables to

2019-06-19 Thread Ævar Arnfjörð Bjarmason
This changes the remaining special snowflake test modes to and gets rid of test_tristate() in favor of the now standard "boolea" test. I'm replying to my "gc: run more pre-detach operations under lock" thread because one of the things my WIP patches to make gc locking less sucky depends on is ne

[PATCH 1/6] env--helper: new undocumented builtin wrapping git_env_*()

2019-06-19 Thread Ævar Arnfjörð Bjarmason
We have many GIT_TEST_* variables that accept a because they're implemented in C, and then some that take because they're implemented at least partially in shellscript. Add a helper that wraps git_env_bool() and git_env_ulong() as the first step in fixing this. This isn't being added as a test-t

[PATCH 3/6] tests: make GIT_TEST_GETTEXT_POISON a boolean

2019-06-19 Thread Ævar Arnfjörð Bjarmason
Change the GIT_TEST_GETTEXT_POISON variable from being "non-empty?" to being a more standard boolean variable. Since it needed to be checked in both C code and shellscript (via test -n) it was one of the remaining shellscript-like variables. Now that we have "git env--helper" we can change that.

[PATCH 2/6] t6040 test: stop using global "script" variable

2019-06-19 Thread Ævar Arnfjörð Bjarmason
Change test code added in c0234b2ef6 ("stat_tracking_info(): clear object flags used during counting", 2008-07-03) to stop using the "script" variable also used for lazy prerequisites in test-lib-functions.sh. Since this test uses test_i18ncmp and expects to use its own "script" variable twice it

[PATCH 4/6] tests README: re-flow a previously changed paragraph

2019-06-19 Thread Ævar Arnfjörð Bjarmason
A previous change to the "GIT_TEST_GETTEXT_POISON" variable left this paragraph needing to be re-flowed. Let's do that in this separate change to make it easy to see that there's no change here when viewed with "--word-diff". Signed-off-by: Ævar Arnfjörð Bjarmason --- t/README | 8 1 fi

Re: [RFC/PATCH] gc: run more pre-detach operations under lock

2019-06-19 Thread Ævar Arnfjörð Bjarmason
On Wed, Jun 19 2019, Jeff King wrote: > On Wed, Jun 19, 2019 at 08:01:55PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> > You could sort of avoid the problem here too with >> > >> > parallel 'git fetch --no-auto-gc {}' ::: $(git remote) >> > git gc --auto >> > >> > It's definitely simpler, but of

Re: [PATCH v4 0/4] Test oidmap

2019-06-19 Thread Christian Couder
On Thu, Jun 20, 2019 at 12:09 AM Jeff King wrote: > > On Wed, Jun 19, 2019 at 05:42:13PM -0400, Jeff King wrote: > > > I do think that sha1hash() will eventually go away in favor of > > oidhash(), but we can approach that separately, and convert oidmap along > > with everyone else. Yeah, deprecat

[PATCH] doc: improve usage string in MyFirstContribution

2019-06-19 Thread Christian Couder
We implement a command called git-psuh which accept arguments, so let's show that it accepts arguments in the doc and the usage string. While at it, we need to prepare "a NULL-terminated array of usage strings", not just "a NULL-terminated usage string". Signed-off-by: Christian Couder --- Docu

Re: [RFC PATCH] rev-list: clarify --abbrev and --abbrev-commit usage

2019-06-19 Thread Emily Shaffer
On Wed, Jun 19, 2019 at 05:21:59PM -0400, Jeff King wrote: > On Fri, Jun 14, 2019 at 03:56:54PM -0700, Emily Shaffer wrote: > > > > Ah, I see. I don't consider "|" to indicate an exclusion to the point > > > that the options are rejected. Only that you wouldn't want to use both, > > > because one

Re: [PATCH v4 0/4] Test oidmap

2019-06-19 Thread Jeff King
On Wed, Jun 19, 2019 at 05:42:13PM -0400, Jeff King wrote: > I do think that sha1hash() will eventually go away in favor of > oidhash(), but we can approach that separately, and convert oidmap along > with everyone else. > > It looks like we are close to being able to do that now. Grepping for >

Re: [PATCH v4 0/4] Test oidmap

2019-06-19 Thread Jeff King
On Sat, Jun 15, 2019 at 12:06:58PM +0200, Christian Couder wrote: > Unlike hashmap that has t/helper/test-hashmap.c and t/t0011-hashmap.sh > oidmap has no specific test. The goal of this small patch series is to > change that and also improve oidmap a bit while at it. > > Changes compared to V3 a

Re: [PATCH v5] rev-list: teach --no-object-names to enable piping

2019-06-19 Thread Jeff King
On Wed, Jun 19, 2019 at 01:56:56PM -0700, Emily Shaffer wrote: > Allow easier parsing by cat-file by giving rev-list an option to print > only the OID of a non-commit object without any additional information. > This is a short-term shim; later on, rev-list should be taught how to > print the type

Understanding DIRC section of .git/index

2019-06-19 Thread Farhan Khan
Hi all, I am trying to understand how the DIRC section works, specifically the "index entry" section. Can someone point to where in the code index files are generated? I am having trouble locating the exact place. The documentation (Documentation/technical/index-format.txt) suggests that the c

Re: [PATCH v4] rev-list: teach --no-object-names to enable piping

2019-06-19 Thread Jeff King
On Wed, Jun 19, 2019 at 12:31:34PM -0700, Emily Shaffer wrote: > > I noticed in range-diff, too. So now --object-names can be used > > with --pretty (not that "rev-list --pretty --objects" makes much > > sense in the first place, so no point in testing that it works). > > Yeah, it works. It look

Re: [PATCH v2] rev-list: teach --oid-only to enable piping

2019-06-19 Thread Jeff King
On Fri, Jun 14, 2019 at 04:29:46PM -0700, Emily Shaffer wrote: > On Fri, Jun 14, 2019 at 12:07:28PM -0400, Jeff King wrote: > > On Thu, Jun 13, 2019 at 02:51:03PM -0700, Emily Shaffer wrote: > > > > +test_expect_success 'rev-list --objects --oid-only is usable by > > > cat-file' ' > > > + git re

Re: [RFC PATCH] rev-list: clarify --abbrev and --abbrev-commit usage

2019-06-19 Thread Jeff King
On Fri, Jun 14, 2019 at 03:56:54PM -0700, Emily Shaffer wrote: > > Ah, I see. I don't consider "|" to indicate an exclusion to the point > > that the options are rejected. Only that you wouldn't want to use both, > > because one counteracts the other. So every "--no-foo" is mutually > > exclusive

. components in paths (gitattributes and git hash-object --path)

2019-06-19 Thread Oliver Soong
First of all, the man page for git hash-object doesn't specify whether --path should be relative to the root of the tree or relative to the current directory after git -C. Current behavior seems to be the latter, which is sensible enough and usually works. While .. components seem to be handled c

[PATCH v2 13/20] msvc: fix detect_msys_tty()

2019-06-19 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler The ntstatus.h header is only available in MINGW. Signed-off-by: Jeff Hostetler Signed-off-by: Johannes Schindelin --- compat/winansi.c | 13 + 1 file changed, 13 insertions(+) diff --git a/compat/winansi.c b/compat/winansi.c index f4f08237f9..11cd9b82cc 1006

[PATCH v2 15/20] msvc: support building Git using MS Visual C++

2019-06-19 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler With this patch, Git can be built using the Microsoft toolchain, via: make MSVC=1 [DEBUG=1] Third party libraries are built from source using the open source "vcpkg" tool set. See https://github.com/Microsoft/vcpkg On a first build, the vcpkg tools and the third pa

[PATCH v2 19/20] msvc: avoid debug assertion windows in Debug Mode

2019-06-19 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin For regular debugging, it is pretty helpful when a debug assertion in a running application triggers a window that offers to start the debugger. However, when running the test suite, it is not so helpful, in particular when the debug assertions are then suppressed anywa

[PATCH v2 05/20] obstack: fix compiler warning

2019-06-19 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin MS Visual C suggests that the construct condition ? (int) i : (ptrdiff_t) d is incorrect. Let's fix this by casting to ptrdiff_t also for the positive arm of the conditional. Signed-off-by: Johannes Schindelin --- compat/obstack.h | 2 +- 1 file changed, 1 i

[PATCH v2 12/20] msvc: define ftello()

2019-06-19 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler It is just called differently in MSVC's headers. Signed-off-by: Jeff Hostetler Signed-off-by: Johannes Schindelin --- compat/msvc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compat/msvc.h b/compat/msvc.h index d336d80670..d7525cf61d 100644 --- a/compat/msvc.h

[PATCH v2 04/20] cache-tree/blame: avoid reusing the DEBUG constant

2019-06-19 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler In MS Visual C, the `DEBUG` constant is set automatically whenever compiling with debug information. This is clearly not what was intended in `cache-tree.c` nor in `builtin/blame.c`, so let's use a less ambiguous name there. Signed-off-by: Jeff Hostetler Signed-off-by: Joh

[PATCH v2 17/20] msvc: add pragmas for common warnings

2019-06-19 Thread Philip Oakley via GitGitGadget
From: Philip Oakley MSVC can be overzealous about some warnings. Disable them. Signed-off-by: Philip Oakley Signed-off-by: Johannes Schindelin --- compat/msvc.h | 4 1 file changed, 4 insertions(+) diff --git a/compat/msvc.h b/compat/msvc.h index d7525cf61d..1d7a8c6145 100644 --- a/comp

[PATCH v2 20/20] msvc: ignore .dll and incremental compile output

2019-06-19 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler Ignore .dll files copied into the top-level directory. Ignore MSVC incremental compiler output files. Signed-off-by: Jeff Hostetler Signed-off-by: Johannes Schindelin --- .gitignore | 5 + 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 237

[PATCH v2 16/20] msvc: add a compile-time flag to allow detailed heap debugging

2019-06-19 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler MS Visual C comes with a few neat features we can use to analyze the heap consumption (i.e. leaks, max memory, etc). With this patch, we introduce support via the build-time flag `USE_MSVC_CRTDBG`. Signed-off-by: Jeff Hostetler Signed-off-by: Johannes Schindelin --- comp

[PATCH v2 06/20] mingw: replace mingw_startup() hack

2019-06-19 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Git for Windows has special code to retrieve the command-line parameters (and even the environment) in UTF-16 encoding, so that they can be converted to UTF-8. This is necessary because Git for Windows wants to use UTF-8 encoded strings throughout its code, and the main(

[PATCH v2 11/20] msvc: do not re-declare the timespec struct

2019-06-19 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler VS2015's headers already declare that struct. Signed-off-by: Jeff Hostetler Signed-off-by: Johannes Schindelin --- compat/mingw.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compat/mingw.h b/compat/mingw.h index 210f1b01a8..a03e40e6e2 100644 --- a/compat/mingw.h

[PATCH v2 18/20] msvc: do not pretend to support all signals

2019-06-19 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler This special-cases various signals that are not supported on Windows, such as SIGPIPE. These cause the UCRT to throw asserts (at least in debug mode). Signed-off-by: Jeff Hostetler Signed-off-by: Johannes Schindelin --- compat/mingw.c | 25 + 1 fil

[PATCH v2 07/20] msvc: fix dependencies of compat/msvc.c

2019-06-19 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The file compat/msvc.c includes compat/mingw.c, which means that we have to recompile compat/msvc.o if compat/mingw.c changes. Signed-off-by: Johannes Schindelin --- config.mak.uname | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config.mak.uname b/config.mak.u

[PATCH v2 10/20] msvc: mark a variable as non-const

2019-06-19 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler VS2015 complains when using a const pointer in memcpy()/free(). Signed-off-by: Jeff Hostetler Signed-off-by: Johannes Schindelin --- compat/mingw.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compat/mingw.c b/compat/mingw.c index 0d8713e515..d1

[PATCH v2 09/20] msvc: define O_ACCMODE

2019-06-19 Thread Philip Oakley via GitGitGadget
From: Philip Oakley This constant is not defined in MSVC's headers. In UCRT's fcntl.h, _O_RDONLY, _O_WRONLY and _O_RDWR are defined as 0, 1 and 2, respectively. Yes, that means that UCRT breaks with the tradition that O_RDWR == O_RDONLY | O_WRONLY. It is a perfectly legal way to define those co

[PATCH v2 14/20] msvc: update Makefile to allow for spaces in the compiler path

2019-06-19 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler It is quite common that MS Visual C++ is installed into a location whose path contains spaces, therefore we need to quote it. Signed-off-by: Jeff Hostetler Signed-off-by: Johannes Schindelin --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PATCH v2 08/20] msvc: include sigset_t definition

2019-06-19 Thread Philip Oakley via GitGitGadget
From: Philip Oakley On MSVC (VS2008) sigset_t is not defined. Signed-off-by: Philip Oakley Signed-off-by: Johannes Schindelin --- compat/msvc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compat/msvc.h b/compat/msvc.h index 29a8ce8204..04b4750b87 100644 --- a/compat/msvc.h +++ b/com

[PATCH v2 00/20] Fix MSVC support, at long last

2019-06-19 Thread Johannes Schindelin via GitGitGadget
Philip Oakley and Jeff Hostetler worked quite a bit on getting Git to compile with MS Visual C again, and this patch series is the culmination of those efforts. With these patches, it is as easy as make MSVC=1 Note: the patches went through quite the number of iterations. For example, for a long

[PATCH v2 01/20] mingw: fix a typo in the msysGit-specific section

2019-06-19 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The msysGit project (i.e. Git for Windows 1.x' SDK) is safely dead for *years* already. This is probably the reason why nobody caught this typo until Carlo Arenas spotted a copy-edited version of it nearby. It is probably about time to rip out the remainders of msysGit/

[PATCH v2 02/20] Mark .bat files as requiring CR/LF endings

2019-06-19 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Just like the natural line ending for Unix shell scripts consist of a single Line Feed, the natural line ending for (DOS) Batch scripts consists of a Carriage Return followed by a Line Feed. It seems that both Unix shell script interpreters and the interpreter for Batch

[PATCH v2 03/20] t0001 (mingw): do not expect a specific order of stdout/stderr

2019-06-19 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When redirecting stdout/stderr to the same file, we cannot guarantee that stdout will come first. In fact, in this test case, it seems that an MSVC build always prints stderr first. In any case, this test case does not want to verify the *order* but the *presence* of b

Re: [PATCH 03/17] cache-tree.c: avoid reusing the DEBUG constant

2019-06-19 Thread Johannes Schindelin
Hi Carlo, On Wed, 19 Jun 2019, Carlo Arenas wrote: > while those two changes (from DEBUG to DEBUG_$foo) are worth doing in > their own merit, I am more inclined to consider this as orthogonal > since by your own description[1] the right name to use would be _DEBUG > (with a preceding dash) and th

Re: [PATCH 02/17] t0001 (mingw): do not expect a specific order of stdout/stderr

2019-06-19 Thread Johannes Schindelin
Hi Hannes, On Wed, 19 Jun 2019, Johannes Sixt wrote: > Am 19.06.19 um 13:30 schrieb Johannes Schindelin: > > Interesting side note: I just realized that t6050-replace.sh does indeed > > contain > > > > test_i18ngrep "Needed a single revision" err > > > > so I wonder why that works. > > Why sh

[PATCH v5] rev-list: teach --no-object-names to enable piping

2019-06-19 Thread Emily Shaffer
Allow easier parsing by cat-file by giving rev-list an option to print only the OID of a non-commit object without any additional information. This is a short-term shim; later on, rev-list should be taught how to print the types of objects it finds in a format similar to cat-file's. Before this co

Re: [PATCH 1/1] t0001: fix on case-insensitive filesystems

2019-06-19 Thread Johannes Schindelin
Hi Martin, On Sun, 9 Jun 2019, Martin Ågren wrote: > On Sat, 8 Jun 2019 at 16:45, Johannes Schindelin via GitGitGadget > wrote: > > > > From: Johannes Schindelin > > > > On a case-insensitive filesystem, such as HFS+ or NTFS, it is possible > > that the idea Bash has of the current directory di

Re: [PATCH 1/1] t0001: fix on case-insensitive filesystems

2019-06-19 Thread Johannes Schindelin
Hi, On Mon, 10 Jun 2019, Junio C Hamano wrote: > "brian m. carlson" writes: > > >> test_expect_success 'init with separate gitdir' ' > >>rm -rf newdir && > >>git init --separate-git-dir realgitdir newdir && > >>echo "gitdir: $(pwd)/realgitdir" >expected && > >> + downcase_on_case_i

Re: [PATCH v2 01/10] t: add helper to convert object IDs to paths

2019-06-19 Thread Johannes Schindelin
Hi, On Tue, 18 Jun 2019, SZEDER Gábor wrote: > On Tue, Jun 18, 2019 at 06:15:46PM +0200, Johannes Schindelin wrote: > > > Regardless of how it is implemented, I have another gripe with this > > > helper: the way it must be used requires a process: $(test_out_to_path > > > $foo) > > > > Indeed. >

Re: [PATCH v2 01/10] t: add helper to convert object IDs to paths

2019-06-19 Thread Johannes Schindelin
Hi Peff, On Tue, 18 Jun 2019, Jeff King wrote: > On Tue, Jun 18, 2019 at 06:15:46PM +0200, Johannes Schindelin wrote: > > > > And looking through this patch series, I see a gazillion of *new* > > > process substitutions $(test_something...) and $(basename $whatever). > > > Can't we do something a

Re: [PATCH v4] rev-list: teach --no-object-names to enable piping

2019-06-19 Thread Emily Shaffer
On Wed, Jun 19, 2019 at 07:08:14AM -0700, Junio C Hamano wrote: > Emily Shaffer writes: > > > Since v3, added a corresponding "--object-names" arg to pair with > > "--no-object-names", and "last-one-wins" logic. Also added a test to > > validate this new arg and the logic. > > Thanks for a quick

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-19 Thread Jeff King
On Wed, Jun 19, 2019 at 04:58:50PM +0700, Nguyễn Thái Ngọc Duy wrote: > This is probably just my itch. Every time I have to do something with > the index, I need to add a little bit code here, a little bit there to > get a better "view" of the index. > > This solves it for me. It allows me to see

Re: [RFC/PATCH] gc: run more pre-detach operations under lock

2019-06-19 Thread Jeff King
On Wed, Jun 19, 2019 at 08:01:55PM +0200, Ævar Arnfjörð Bjarmason wrote: > > You could sort of avoid the problem here too with > > > > parallel 'git fetch --no-auto-gc {}' ::: $(git remote) > > git gc --auto > > > > It's definitely simpler, but of course we have to manually add > > --no-auto-gc in

Re: [RFC/PATCH] gc: run more pre-detach operations under lock

2019-06-19 Thread Jeff King
On Wed, Jun 19, 2019 at 07:51:00PM +0700, Duy Nguyen wrote: > > Wheras mine fixes e.g. the same issue for: > > > > parallel 'git fetch {}' ::: $(git remote) > > > > Ditto for you running a "git" command and your editor running a > > "fetch" at the same time. > > You could sort of avoid the pr

Re: [PATCH] fetch: only run 'gc' once when fetching multiple remotes

2019-06-19 Thread Jeff King
On Wed, Jun 19, 2019 at 04:46:30PM +0700, Nguyễn Thái Ngọc Duy wrote: > In multiple remotes mode, git-fetch is launched for n-1 remotes and the > last remote is handled by the current process. Each of these processes > will in turn run 'gc' at the end. > > This is not really a problem because eve

Re: [RFC PATCH] userdiff: ship built-in driver config file

2019-06-19 Thread Jeff King
On Wed, Jun 19, 2019 at 11:32:19PM +0800, LI, BO XUAN wrote: > > [diff "foo"] > > xfuncname = "the pattern starts here... > > and continues through newlines!" > > > > If I recall correctly, the above version wouldn't work, but the > following version would: > > [diff "foo"] > xfuncname

Re: [RFC PATCH] userdiff: ship built-in driver config file

2019-06-19 Thread Jeff King
On Wed, Jun 19, 2019 at 08:30:25AM +0200, Johannes Sixt wrote: > >> Why place this file in .git? To have per-repository diff drivers, we can > >> already specify them via 'git config'. This file should be installed in > >> the system. > > > > I think it _could_ actually just be part of the system

Re: [PATCH v2 1/1] submodule foreach: fix recursion of options

2019-06-19 Thread Johannes Schindelin
Hi Morian, On Tue, 18 Jun 2019, Morian Sonnet wrote: > "Morian Sonnet via GitGitGadget" wrote: > > > Calling > > > > git submodule foreach --recursive git reset --hard > > > > leads to an error stating that the option --hard is unknown to > > submodule--helper. > > > > Reasons: > > > > . Abo

Re: [RFC/PATCH] gc: run more pre-detach operations under lock

2019-06-19 Thread Ævar Arnfjörð Bjarmason
On Wed, Jun 19 2019, Duy Nguyen wrote: > On Wed, Jun 19, 2019 at 5:26 PM Ævar Arnfjörð Bjarmason > wrote: >> This patch is part of a WIP branch I have that's a bit of a mess. It's >> more-gc-detach-under-lock on github.com/avar/git.git. It doesn't apply >> on master because it relies on some pr

Re: [PATCH 0/2] a few more redundant system include cleanups

2019-06-19 Thread Jeff King
On Wed, Jun 19, 2019 at 02:12:30AM -0700, Carlo Arenas wrote: > > I did a quick grep for similar cases, and didn't find any that I think > > would be problematic. There were a few cleanups, below. > > would you mind if I add your 2 patches to a series and include that > missing one?, that way I'l

Re: [PATCH] interpret-trailers: load default config

2019-06-19 Thread Jeff King
On Wed, Jun 19, 2019 at 07:24:10AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > Subject: [PATCH] interpret-trailers: load default config > > > > The interpret-trailers program does not do the usual loading of config > > via git_default_config(), and thus does not respect many of the us

git@vger.kernel.org

2019-06-19 Thread Konstantin Matokhin
Hello, I have a question about sparse checkout. Git version 2.17.1 For some reason it checks out files from not specified folders. My .git/info/sparse-checkout has two lines: frontend/ common/ However backend/ is also created with some files in it (not all) Is it a known bug? Any workaround t

Re: [PATCH 02/17] t0001 (mingw): do not expect a specific order of stdout/stderr

2019-06-19 Thread Johannes Sixt
Am 19.06.19 um 13:30 schrieb Johannes Schindelin: > Interesting side note: I just realized that t6050-replace.sh does indeed > contain > > test_i18ngrep "Needed a single revision" err > > so I wonder why that works. Why should it not work? If GIT_TEST_GETTEXT_POISON is on, it pretends succ

Re: [PATCH 03/17] cache-tree.c: avoid reusing the DEBUG constant

2019-06-19 Thread Carlo Arenas
while those two changes (from DEBUG to DEBUG_$foo) are worth doing in their own merit, I am more inclined to consider this as orthogonal since by your own description[1] the right name to use would be _DEBUG (with a preceding dash) and that would obviously not conflict here. the only remaining cha

Re: [PATCH 15/17] msvc: do not pretend to support all signals

2019-06-19 Thread Johannes Schindelin
Hi Eric, On Wed, 19 Jun 2019, Eric Sunshine wrote: > On Tue, Jun 18, 2019 at 8:24 AM Jeff Hostetler via GitGitGadget > wrote: > > This special-cases various signals that are not supported on Windows, > > such as SIGPIPE. These cause the UCRT to throw asserts (at least in > > debug mode). > > > >

Re: [PATCH] interpret-trailers: load default config

2019-06-19 Thread Masahiro Yamada
On Wed, Jun 19, 2019 at 12:37 PM Jeff King wrote: > > On Sat, Jun 15, 2019 at 10:41:44AM +0200, Christian Couder wrote: > > > On Fri, Jun 14, 2019 at 5:10 PM Jeff King wrote: > > > > > > On Fri, Jun 14, 2019 at 08:35:04PM +0900, Masahiro Yamada wrote: > > > > > > > Perhaps, 'git interpret-trailer

Re: [RFC PATCH] userdiff: ship built-in driver config file

2019-06-19 Thread LI, BO XUAN
On Wed, Jun 19, 2019 at 11:58 AM Jeff King wrote: > > While having separate lines that get joined here does make the result > easier to read, I think it creates some confusion. diff.*.xfuncname in a > regular config file _doesn't_ behave this way (it's the usual > last-one-wins, so we expect a sin

Re: [PATCH v3 1/1] ref-filter: sort detached HEAD lines firstly

2019-06-19 Thread Junio C Hamano
Matthew DeVore writes: > ... By > removing the parenthesis from the localizable text, we can share strings > with wt-status.c and remove a cautionary comment to translators. ... > - /* > - * TRANSLATORS: make sure this matches "HEAD > -

Re: [PATCH 03/17] cache-tree.c: avoid reusing the DEBUG constant

2019-06-19 Thread Junio C Hamano
Eric Sunshine writes: > On Tue, Jun 18, 2019 at 8:24 AM Jeff Hostetler via GitGitGadget > wrote: >> In MSVC, the DEBUG constant is set automatically whenever compiling with >> debug information. >> >> This is clearly not what was intended in cache-tree.c, so let's use a less >> ambiguous constan

Re: [PATCH] documentation: add tutorial for revision walking

2019-06-19 Thread Junio C Hamano
Emily Shaffer writes: > Maybe there's a case for storing them as a set of patch files that are > revision-controlled somewhere within Documentation/? There was some > discussion on the IRC a few weeks ago about trying to organize these > tutorials into their own directory to form a sort of "Git C

[PATCH v2 3/3] repo-settings: pack.useSparse=true

2019-06-19 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee If a repo is large, then it probably has a very large working directory. In this case, a typical developer's edits usually impact many fewer paths than the full path set. The sparse treewalk algorithm is optimized for this case, speeding up 'git push' calls. Use pack.useSpar

[PATCH v2 1/3] repo-settings: create core.featureAdoptionRate setting

2019-06-19 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee Several advanced config settings are highly recommended for clients using large repositories. Power users learn these one-by-one and enable them as they see fit. This could be made simpler, to allow more users to have access to these almost-always beneficial features (and mor

[PATCH v2 2/3] repo-settings: use index.version=4 by default

2019-06-19 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee If a repo is large, it likely has many paths in its working directory. This means the index could be compressed using version 4. Set this as a default when core.featureAdoptionRate is at least three. Signed-off-by: Derrick Stolee --- Documentation/config/core.txt | 3 +++

[PATCH v2 0/3] [RFC] Create 'core.featureAdoptionRate' setting to update config defaults

2019-06-19 Thread Derrick Stolee via GitGitGadget
Here is a second run at this RFC, which aims to create a "meta" config setting that automatically turns on other settings according to a user's willingness to trade new Git behavior or new feature risk for performance benefits. The new name for the setting is "core.featureAdoptionRate" and is an in

Re: [PATCH 13/17] msvc: support building Git using MS Visual C++

2019-06-19 Thread Johannes Schindelin
Hi Eric, On Wed, 19 Jun 2019, Eric Sunshine wrote: > On Tue, Jun 18, 2019 at 8:24 AM Jeff Hostetler via GitGitGadget > wrote: > > With this patch, Git can be built using the Microsoft toolchain, via: > > > > make MSVC=1 [DEBUG=1] > > > > Third party libraries are built from source using

Re: [RFC PATCH] userdiff: ship built-in driver config file

2019-06-19 Thread Junio C Hamano
Johannes Sixt writes: > But /etc/gitconfig would be the wrong place, because it would not be > updated when a new version ships with new patterns. > > I would suggest to install the file as $prefix/share/git-core/userdiff > although the name "userdiff" sounds like an accident. How about > .../fil

Re: [RFC PATCH] userdiff: ship built-in driver config file

2019-06-19 Thread Junio C Hamano
Jeff King writes: > I think it _could_ actually just be part of the system /etc/gitconfig, > though it is kind of big, and Git has a tendency to parse the config > more than necessary. I wonder if would add a noticeable slowdown. Yeah, that was what I was wondering too when somebody made a casua

Re: [PATCH] wrapper: avoid UB in macOS

2019-06-19 Thread Junio C Hamano
Carlo Marcelo Arenas Belón writes: > 0620b39b3b ("compat: add a mkstemps() compatibility function", 2009-05-31) > included a function based on code from libiberty which would result in > undefined behaviour in platforms where timeval's tv_usec is a 32-bit signed > type as shown by: > > wrapper.c

Re: ds/commit-graph-incremental (was Re: What's cooking in git.git (Jun 2019, #04; Fri, 14))

2019-06-19 Thread Derrick Stolee
On 6/19/2019 10:32 AM, Junio C Hamano wrote: > Derrick Stolee writes: > >> On 6/14/2019 4:50 PM, Junio C Hamano wrote: >>> * ds/commit-graph-incremental (2019-06-12) 16 commits >>> - commit-graph: test --split across alternate without --split >> >> Please hold on this one. I've found multiple is

Re: ds/commit-graph-incremental (was Re: What's cooking in git.git (Jun 2019, #04; Fri, 14))

2019-06-19 Thread Junio C Hamano
Derrick Stolee writes: > On 6/14/2019 4:50 PM, Junio C Hamano wrote: >> * ds/commit-graph-incremental (2019-06-12) 16 commits >> - commit-graph: test --split across alternate without --split > > Please hold on this one. I've found multiple issues while integrating > this with VFS for Git and the

Re: js/gcc-8-and-9, was Re: What's cooking in git.git (Jun 2019, #04; Fri, 14)

2019-06-19 Thread Junio C Hamano
Johannes Schindelin writes: > What I *tried* to suggest is to take my minimal `kwset: allow building > with GCC 8` together with the other three, as it fixes the build. Without > it, the build is not fixed under `DEVELOPER=1`, it is still broken. Ah, of course, we can do that. Whether we are

Re: [PATCH 6/8] read-cache.c: dump "IEOT" extension as json

2019-06-19 Thread Derrick Stolee
On 6/19/2019 9:24 AM, Duy Nguyen wrote: > On Wed, Jun 19, 2019 at 8:18 PM Derrick Stolee wrote: >> >> On 6/19/2019 5:58 AM, Nguyễn Thái Ngọc Duy wrote:> @@ -2266,7 +2271,7 @@ int >> do_read_index(struct index_state *istate, const char *path, int must_exist) >>>* to multi-thread the readin

Re: [PATCH] interpret-trailers: load default config

2019-06-19 Thread Junio C Hamano
Jeff King writes: > Subject: [PATCH] interpret-trailers: load default config > > The interpret-trailers program does not do the usual loading of config > via git_default_config(), and thus does not respect many of the usual > options. In particular, we will not load core.commentChar, even though

Re: [PATCH v4] rev-list: teach --no-object-names to enable piping

2019-06-19 Thread Junio C Hamano
Emily Shaffer writes: > Since v3, added a corresponding "--object-names" arg to pair with > "--no-object-names", and "last-one-wins" logic. Also added a test to > validate this new arg and the logic. Thanks for a quick turnaround (unfortunately, I was OOO yesterday and I am half-sick today, so p

Updating local tags: bugs and general feasibility

2019-06-19 Thread Karen Arutyunov
Hello, I'm trying to configure my git client to update local tags with the remote ones. Prior to git 2.20 the following option in ~/.gitconfig did the job: [remote "origin"] tagopt = --tags So the following commands worked as expected and the local tag gets updated: # Create remote

Re: [PATCH 6/8] read-cache.c: dump "IEOT" extension as json

2019-06-19 Thread Duy Nguyen
On Wed, Jun 19, 2019 at 8:18 PM Derrick Stolee wrote: > > On 6/19/2019 5:58 AM, Nguyễn Thái Ngọc Duy wrote:> @@ -2266,7 +2271,7 @@ int > do_read_index(struct index_state *istate, const char *path, int must_exist) > >* to multi-thread the reading of the cache entries. > >*/ > >

Re: [PATCH 6/8] read-cache.c: dump "IEOT" extension as json

2019-06-19 Thread Derrick Stolee
On 6/19/2019 5:58 AM, Nguyễn Thái Ngọc Duy wrote:> @@ -2266,7 +2271,7 @@ int do_read_index(struct index_state *istate, const char *path, int must_exist) >* to multi-thread the reading of the cache entries. >*/ > if (extension_offset && nr_threads > 1) > - ieot = r

Re: [PATCH 4/8] resolve-undo.c: dump "REUC" extension as json

2019-06-19 Thread Derrick Stolee
On 6/19/2019 5:58 AM, Nguyễn Thái Ngọc Duy wrote: > + if (jw) { > + jw_object_inline_begin_object(jw, "resolve-undo"); > + jw_object_intmax(jw, "ext-size", size); > + jw_object_inline_begin_array(jw, "entries"); > + } While reading this block, I noticed

Re: [PATCH 1/8] ls-files: add --json to dump the index

2019-06-19 Thread Derrick Stolee
On 6/19/2019 5:58 AM, Nguyễn Thái Ngọc Duy wrote: > So far we don't have a command to basically dump the index file out, > with all its glory details. Checking some info, for example, stat > time, usually involves either writing new code or firing up "xxd" and > decoding values by yourself. > > Th

Re: [RFC/PATCH] gc: run more pre-detach operations under lock

2019-06-19 Thread Duy Nguyen
On Wed, Jun 19, 2019 at 5:26 PM Ævar Arnfjörð Bjarmason wrote: > This patch is part of a WIP branch I have that's a bit of a mess. It's > more-gc-detach-under-lock on github.com/avar/git.git. It doesn't apply > on master because it relies on some previous test work, but for RFC > purposes I figure

Re: [PATCH 13/17] msvc: support building Git using MS Visual C++

2019-06-19 Thread Johannes Schindelin
Hi Carlo, On Tue, 18 Jun 2019, Carlo Arenas wrote: > On Tue, Jun 18, 2019 at 5:26 AM Jeff Hostetler via GitGitGadget > wrote: > > diff --git a/compat/mingw.c b/compat/mingw.c > > index d14d33308d..667285887a 100644 > > --- a/compat/mingw.c > > +++ b/compat/mingw.c > > @@ -2388,6 +2388,12 @@ stat

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-19 Thread Derrick Stolee
On 6/19/2019 8:42 AM, Duy Nguyen wrote: > On Wed, Jun 19, 2019 at 6:58 PM Derrick Stolee wrote: >> >> On 6/19/2019 5:58 AM, Nguyễn Thái Ngọc Duy wrote: >>> This is probably just my itch. Every time I have to do something with >>> the index, I need to add a little bit code here, a little bit there

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-19 Thread Duy Nguyen
On Wed, Jun 19, 2019 at 6:58 PM Derrick Stolee wrote: > > On 6/19/2019 5:58 AM, Nguyễn Thái Ngọc Duy wrote: > > This is probably just my itch. Every time I have to do something with > > the index, I need to add a little bit code here, a little bit there to > > get a better "view" of the index. > >

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-19 Thread Derrick Stolee
On 6/19/2019 5:58 AM, Nguyễn Thái Ngọc Duy wrote: > This is probably just my itch. Every time I have to do something with > the index, I need to add a little bit code here, a little bit there to > get a better "view" of the index. > > This solves it for me. It allows me to see pretty much everythi

  1   2   >