Re: [PATCH 0/1] gitignore: ignore comments on the same line as a pattern

2019-10-01 Thread Junio C Hamano
"Chris Zehner via GitGitGadget" writes: > Why make this change? > = > > Add the ability to use # to put comments after ignore patterns. This is > useful for documenting the reason for particular ignore patterns inclusion > and structure. > > Right now a common convention in .g

Re: git-grep in sparse checkout

2019-10-01 Thread Junio C Hamano
Elijah Newren writes: > * other commands (archive, bisect, clean?, gitk, shortlog, blame, > fsck?, etc.) likely need to pay attention to sparsity patterns as > well, but there are some special cases: "git archive" falls into the same class as fast-(im|ex)port; it should ignore the sparse cone by

Re: git-grep in sparse checkout

2019-10-01 Thread Junio C Hamano
Derrick Stolee writes: > Is that the expected behavior? In a sparse-checkout, wouldn't you _want_ > Git to report things outside the cone? That should be optional, I would think. When you declare "by default, this the subset of the project I am interested in", we should honor it, I would think.

[PATCH] t0000: cover GIT_SKIP_TESTS blindspot

2019-10-01 Thread Denton Liu
Currently, the tests for GIT_SKIP_TESTS do not cover the situation where we skip an entire test suite. Add a test case so we cover this blindspot. Signed-off-by: Denton Liu --- This patch was created as a result of me teaching test-lib.sh to recognise GIT_RUN_TESTS as a variable, similar to the -

Re: [PATCH 1/1] ci: run `hdr-check` as part of the `Static Analysis` job

2019-10-01 Thread Junio C Hamano
"Johannes Schindelin via GitGitGadget" writes: > - sudo apt-get install -y coccinelle && > + sudo apt-get install -y coccinelle coccinelle libcurl4-openssl-dev > libssl-dev libexpat-dev gettext && I think "s/coccinelle //" is necessary here (assuming that "apt-get install" is the

Re: [PATCH v5] wrapper: use a loop instead of repetitive statements

2019-10-01 Thread Junio C Hamano
All three patches looked sensible. Even though there is no dependency or relationships among them (beyond that they got written at the same time by the same person), I'll just queue them on a single ah/cleanups topic and get them advance together, as I do not expect any one of them to be blocking

Re: [PATCH] shallow.c: Don't free unallocated slabs

2019-10-01 Thread Junio C Hamano
Jeff King writes: > ... This is really an internal implementation > detail of how the slab code works. It would be nice if callers didn't > have to care about it. Perhaps we ought to have a slab foreach() > function that encapsulates this, which would let this caller do > something like: > > co

Re: [PATCH v4] diffcore-break: use a goto instead of a redundant if statement

2019-10-01 Thread Junio C Hamano
Alex Henrie writes: > On Mon, Sep 30, 2019 at 3:48 AM Junio C Hamano wrote: >> >> Alex Henrie writes: >> >> > Well, I admit that code clarity is somewhat subjective. To me it's not >> > obvious that "if (q->nr <= j)" means "if the loop exited normally", I agree that it is subjective, but "if c

Re: [PATCH v2 0/2] Git's rename detection requires a stable sort

2019-10-01 Thread Junio C Hamano
"Johannes Schindelin via GitGitGadget" writes: > With the en/merge-recursive-cleanup patches already having advanced to next, > the problem I discovered when rebasing Git for Windows' branch thicket > becomes quite relevant now: t3030.35 fails consistently in the MSVC build & > test (this part of

Re: [PATCH v2 1/6] midx: add MIDX_PROGRESS flag

2019-10-01 Thread Junio C Hamano
William Baker writes: > Although my debugger might not be the smartest, I haven't noticed any > downsides to switching this to an enum. Well, if you write enum { BIT_0 = 1, BIT_1 = 2, BIT_3 = 4 } var; it's pretty much a promise that the normal value for the var is one of these listed v

Re: git mailinfo with patch parser

2019-10-01 Thread Florian Weimer
* Junio C. Hamano: >> Is there a way to get the patch data, as parsed by git apply or git >> am, and dump it back in patch format, without actually applying the >> patch to a working tree? > > So, "the patch data as used by apply" is what you get from mailinfo. > If it is a patch that applies to w

Re: [PATCH v2 1/6] midx: add MIDX_PROGRESS flag

2019-10-01 Thread Junio C Hamano
William Baker writes: > I saw that the code base is currently a mix of #define and enums when it > comes to flags (e.g. dir_struct.flags and rebase_options.flags are both > enums) and so using one here would not be something new stylistically. Yes. But it is a different matter to spread a bad

Re: git mailinfo with patch parser

2019-10-01 Thread Junio C Hamano
Florian Weimer writes: > git mailinfo splits a message into headers, commit message, and patch > text, but does not actually parse the patch text. As a result, the > patch portion produced by git mailinfo can contain something that > looks like a patch, but actually isn't. Yes, mailinfo is abou

git mailinfo with patch parser

2019-10-01 Thread Florian Weimer
git mailinfo splits a message into headers, commit message, and patch text, but does not actually parse the patch text. As a result, the patch portion produced by git mailinfo can contain something that looks like a patch, but actually isn't. Is there a way to get the patch data, as parsed by git

[PATCH 0/1] gitignore: ignore comments on the same line as a pattern

2019-10-01 Thread Chris Zehner via GitGitGadget
Why make this change? = Add the ability to use # to put comments after ignore patterns. This is useful for documenting the reason for particular ignore patterns inclusion and structure. Right now a common convention in .gitignore files is to group patterns by similarity, using

[PATCH 1/1] gitignore: ignore comments on the same line as a pattern

2019-10-01 Thread Chris Zehner via GitGitGadget
From: Chris Zehner Signed-off-by: Chris Zehner --- Documentation/gitignore.txt | 8 ++-- dir.c | 33 + 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt index d47b1

Re: [PATCH v1 5/5] sequencer: directly call pick_commits() from complete_action()

2019-10-01 Thread Junio C Hamano
Alban Gruin writes: > Currently, complete_action() calls sequencer_continue() to do the > rebase. Even though the former already has the todo list, the latter > loads it from the disk and parses it. Calling directly pick_commits() > from complete_action() avoids this unnecessary round trip. > >

Re: [PATCH v1 1/5] sequencer: update `total_nr' when adding an item to a todo list

2019-10-01 Thread Junio C Hamano
Alban Gruin writes: > `total_nr' is the total amount of items, done and toto, that are in a > todo list. But unlike `nr', it was not updated when an item was > appended to the list. s/amount/number/, as amount is specifically for something that cannot be counted. Perhaps a stupid language ques

Re: git-grep in sparse checkout

2019-10-01 Thread Matheus Tavares Bernardino
On Tue, Oct 1, 2019 at 3:29 PM Derrick Stolee wrote: > > On 10/1/2019 9:06 AM, Matheus Tavares Bernardino wrote: > > Hi, > > > > During Git Summit it was mentioned that git-grep searches outside > > sparsity pattern which is not aligned with user expectation. I took a > > quick look at it and it s

Re: [PATCH] completion (zsh): fix misleading install location

2019-10-01 Thread Maxim Belsky
Hey, I face same issue a few days ago. Initially I thought `~/.zsh/_git` should be a dictionary. I’ve made all required actions, but completion didn't work. After a few hours I found that it should be just a file instead of a dictionary. I have two ideas how to patch this comments to help anot

Re: [PATCH v3] dir: special case check for the possibility that pathspec is NULL

2019-10-01 Thread Elijah Newren
On Tue, Oct 1, 2019 at 12:35 PM Denton Liu wrote: > > Hi Elijah, > > Sorry for dragging out this thread for so long... > > On Tue, Oct 01, 2019 at 11:55:24AM -0700, Elijah Newren wrote: > > [...] > > > diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh > > index 192c94eccd..a840919967 1007

Re: [PATCH v3] dir: special case check for the possibility that pathspec is NULL

2019-10-01 Thread Denton Liu
Hi Elijah, Sorry for dragging out this thread for so long... On Tue, Oct 01, 2019 at 11:55:24AM -0700, Elijah Newren wrote: [...] > diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh > index 192c94eccd..a840919967 100755 > --- a/t/t0050-filesystem.sh > +++ b/t/t0050-filesystem.sh > @@ -

[PATCH] squash! grep: replace grep_read_mutex by internal obj read lock

2019-10-01 Thread Matheus Tavares
Signed-off-by: Matheus Tavares --- This is just a small fixup to be squashed into patch 6: with multiple locks, the locking order must be consistent across all critical sections to avoid dead-lock. Since grep_attr_lock() is called before obj_read_lock() in grep_source_load_driver(), it must also

[PATCH v3] dir: special case check for the possibility that pathspec is NULL

2019-10-01 Thread Elijah Newren
Commits 404ebceda01c ("dir: also check directories for matching pathspecs", 2019-09-17) and 89a1f4aaf765 ("dir: if our pathspec might match files under a dir, recurse into it", 2019-09-17) added calls to match_pathspec() and do_match_pathspec() passing along their pathspec parameter. Both match_pa

Re: [PATCH v2] dir: special case check for the possibility that pathspec is NULL

2019-10-01 Thread Elijah Newren
On Tue, Oct 1, 2019 at 11:41 AM Denton Liu wrote: > > Hi Elijah, > > On Tue, Oct 01, 2019 at 11:30:05AM -0700, Elijah Newren wrote: > > [...] > > > diff --git a/dir.c b/dir.c > > index 7ff79170fc..bd39b86be4 100644 > > --- a/dir.c > > +++ b/dir.c > > @@ -1962,8 +1962,9 @@ static enum path_treatmen

Re: [PATCH 1/1] ci: run `hdr-check` as part of the `Static Analysis` job

2019-10-01 Thread Johannes Schindelin
Hi Denton, On Tue, 1 Oct 2019, Denton Liu wrote: > Sorry for not replying or rolling this in earlier, I was waiting for > my series to hit master before doing this change but I guess it > doesn't really hurt to do it any earlier. No worries, thank you for working on this! I wonder whether it wo

Re: [PATCH v2] dir: special case check for the possibility that pathspec is NULL

2019-10-01 Thread Denton Liu
Hi Elijah, On Tue, Oct 01, 2019 at 11:30:05AM -0700, Elijah Newren wrote: [...] > diff --git a/dir.c b/dir.c > index 7ff79170fc..bd39b86be4 100644 > --- a/dir.c > +++ b/dir.c > @@ -1962,8 +1962,9 @@ static enum path_treatment > read_directory_recursive(struct dir_struct *dir, >

[PATCH v2] dir: special case check for the possibility that pathspec is NULL

2019-10-01 Thread Elijah Newren
Commits 404ebceda01c ("dir: also check directories for matching pathspecs", 2019-09-17) and 89a1f4aaf765 ("dir: if our pathspec might match files under a dir, recurse into it", 2019-09-17) added calls to match_pathspec() and do_match_pathspec() passing along their pathspec parameter. Both match_pa

Re: git-grep in sparse checkout

2019-10-01 Thread Derrick Stolee
On 10/1/2019 9:06 AM, Matheus Tavares Bernardino wrote: > Hi, > > During Git Summit it was mentioned that git-grep searches outside > sparsity pattern which is not aligned with user expectation. I took a > quick look at it and it seems the reason is > builtin/grep.c:grep_cache() (which also greps

[PATCH v3] merge-recursive: fix the diff3 common ancestor label for virtual commits

2019-10-01 Thread Elijah Newren
In commit 743474cbfa8b ("merge-recursive: provide a better label for diff3 common ancestor", 2019-08-17), the label for the common ancestor was changed from always being "merged common ancestors" to instead be based on the number of merge bases: >=2: "merged common ancestors"

Re: [PATCH v2 00/11] New sparse-checkout builtin and "cone" mode

2019-10-01 Thread Derrick Stolee
On 10/1/2019 12:54 PM, Elijah Newren wrote: > On Tue, Oct 1, 2019 at 9:48 AM Derrick Stolee wrote: >> >> On 9/19/2019 10:43 AM, Derrick Stolee via GitGitGadget wrote: >>> This series makes the sparse-checkout feature more user-friendly. While >>> there, I also present a way to use a limited set of

Re: git-gui: disable the "loose objects popup" dialog?

2019-10-01 Thread Pratyush Yadav
On 26/09/19 11:13PM, Johannes Sixt wrote: > Am 26.09.19 um 21:15 schrieb Pratyush Yadav: > > Reading the Stackoverflow link, it seems this is already possible via an > > undocumented config variable "gui.gcwarning". I haven't tried using it > > though, but I see no reason for it to not work (look

Re: [PATCH 1/1] respect core.hooksPath, falling back to .git/hooks

2019-10-01 Thread Johannes Schindelin
Hi, On Tue, 1 Oct 2019, Pratyush Yadav wrote: > On 30/09/19 11:42AM, Johannes Schindelin wrote: > > On Fri, 27 Sep 2019, Pratyush Yadav wrote: > > > On 27/09/19 08:10AM, Bert Wesarg wrote: > > > > On Fri, Sep 27, 2019 at 12:40 AM Pratyush Yadav > > > > wrote: > > > > > gitdir is used in a lot o

Re: [PATCH] SubmittingPatches: update git-gui maintainer information

2019-10-01 Thread Pratyush Yadav
On 01/10/19 09:46AM, Denton Liu wrote: > Hi Pratyush, > > On Tue, Oct 01, 2019 at 07:44:35PM +0530, Pratyush Yadav wrote: > > Since I have taken over maintainership of git-gui, it is a good idea to > > point new contributors to my fork of the project, so they can see the > > latest version of the

Re: [PATCH v3 1/2] git-gui: use existing interface to query a path's attribute

2019-10-01 Thread Pratyush Yadav
On 01/10/19 05:22PM, Bert Wesarg wrote: > On Tue, Oct 1, 2019 at 4:24 PM Pratyush Yadav wrote: > > > > Hi, > > > > I don't see any difference between v3 and v2 of this patch. What changed > > in this version? > > nothing, but 2/2 changed. I don't see a v3 of 2/2 in my inbox. A search on public-i

Re: [PATCH v2 00/11] New sparse-checkout builtin and "cone" mode

2019-10-01 Thread Elijah Newren
On Tue, Oct 1, 2019 at 9:48 AM Derrick Stolee wrote: > > On 9/19/2019 10:43 AM, Derrick Stolee via GitGitGadget wrote: > > This series makes the sparse-checkout feature more user-friendly. While > > there, I also present a way to use a limited set of patterns to gain a > > significant performance

Re: [PATCH] SubmittingPatches: update git-gui maintainer information

2019-10-01 Thread Denton Liu
Hi Pratyush, On Tue, Oct 01, 2019 at 07:44:35PM +0530, Pratyush Yadav wrote: > Since I have taken over maintainership of git-gui, it is a good idea to > point new contributors to my fork of the project, so they can see the > latest version of the project. > > Signed-off-by: Pratyush Yadav Junio

Re: [PATCH 1/1] ci: run `hdr-check` as part of the `Static Analysis` job

2019-10-01 Thread Denton Liu
Hi Johannes, Sorry for not replying or rolling this in earlier, I was waiting for my series to hit master before doing this change but I guess it doesn't really hurt to do it any earlier. On Tue, Oct 01, 2019 at 04:16:26AM -0700, Johannes Schindelin via GitGitGadget wrote: > From: Johannes Schin

Re: git-grep in sparse checkout

2019-10-01 Thread Elijah Newren
On Tue, Oct 1, 2019 at 6:30 AM Bert Wesarg wrote: > > Hi, > > On Tue, Oct 1, 2019 at 3:06 PM Matheus Tavares Bernardino > wrote: > > > > Hi, > > > > During Git Summit it was mentioned that git-grep searches outside > > sparsity pattern which is not aligned with user expectation. I took a > > quic

Re: [PATCH] gitk: Add horizontal scrollbar to the files list

2019-10-01 Thread Marc Branchaud
On 2019-10-01 6:08 a.m., Bert Wesarg wrote: Wrapping filenames is an unexpected experience in UX design. Disable wrapping and add a horizontal scrollbar to the files list to remove this. (Thanks for working on gitk and git-gui!) I have to say I'm mildly opposed to this change. The reason is t

Re: [PATCH v3 1/2] git-gui: use existing interface to query a path's attribute

2019-10-01 Thread Bert Wesarg
On Tue, Oct 1, 2019 at 4:24 PM Pratyush Yadav wrote: > > Hi, > > I don't see any difference between v3 and v2 of this patch. What changed > in this version? nothing, but 2/2 changed. Bert > > On 30/09/19 09:54PM, Bert Wesarg wrote: > > Replace the hand-coded call to git check-attr with the alre

Re: [PATCH] shallow.c: Don't free unallocated slabs

2019-10-01 Thread Jeff King
On Tue, Oct 01, 2019 at 01:33:10AM +0200, Ali Utku Selen wrote: > Fix possible segfault when cloning a submodule shallow. Thanks. Just looking at the context, this is clearly the right thing to be doing. > It is possible to have unallocated slabs in shallow.c's commit_depth > for a shallow submo

Re: [DISCUSSION] Growing the Git community

2019-10-01 Thread Jakub Narebski
Hello, Johannes Schindelin writes: > On Fri, 20 Sep 2019, Mike Hommey wrote: >> 6. Newcomers don't really have any idea /what/ they could contribute. >> They either have to come with their own itch to scratch, or read the >> code to figure out if there's something to fix. > > I think this is ver

Re: [PATCH v2] merge-recursive: fix the diff3 common ancestor label for virtual commits

2019-10-01 Thread Jeff King
On Mon, Sep 30, 2019 at 11:58:49PM -0700, Elijah Newren wrote: > In commit 743474cbfa8b ("merge-recursive: provide a better label for > diff3 common ancestor", 2019-08-17), the label for the common ancestor > was changed from always being > > "merged common ancestors" > > to instead be

Re: [PATCH v3 1/2] git-gui: use existing interface to query a path's attribute

2019-10-01 Thread Pratyush Yadav
Hi, I don't see any difference between v3 and v2 of this patch. What changed in this version? On 30/09/19 09:54PM, Bert Wesarg wrote: > Replace the hand-coded call to git check-attr with the already provided one. > > Signed-off-by: Bert Wesarg > --- > lib/diff.tcl | 15 +-- > 1 fi

[PATCH] SubmittingPatches: update git-gui maintainer information

2019-10-01 Thread Pratyush Yadav
Since I have taken over maintainership of git-gui, it is a good idea to point new contributors to my fork of the project, so they can see the latest version of the project. Signed-off-by: Pratyush Yadav --- Documentation/SubmittingPatches | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [PATCH 1/1] git-gui (Windows): use git-bash.exe if it is available

2019-10-01 Thread Pratyush Yadav
On 26/09/19 10:46AM, Thomas Klaeger via GitGitGadget wrote: > From: Thomas Klaeger > > Git for Windows 2.x ships with an executable that starts the Git Bash > with all the environment variables and what not properly set up. It is > also adjusted according to the Terminal emulator option chosen wh

Re: [PATCH v2 00/11] New sparse-checkout builtin and "cone" mode

2019-10-01 Thread Derrick Stolee
On 9/19/2019 10:43 AM, Derrick Stolee via GitGitGadget wrote: > This series makes the sparse-checkout feature more user-friendly. While > there, I also present a way to use a limited set of patterns to gain a > significant performance boost in very large repositories. > > Sparse-checkout is only d

Re: [PATCH 1/1] respect core.hooksPath, falling back to .git/hooks

2019-10-01 Thread Pratyush Yadav
On 30/09/19 11:42AM, Johannes Schindelin wrote: > On Fri, 27 Sep 2019, Pratyush Yadav wrote: > > On 27/09/19 08:10AM, Bert Wesarg wrote: > > > On Fri, Sep 27, 2019 at 12:40 AM Pratyush Yadav > > > wrote: > > > > gitdir is used in a lot of places, and I think all those would > > > > also > > > >

Re: git-grep in sparse checkout

2019-10-01 Thread Bert Wesarg
Hi, On Tue, Oct 1, 2019 at 3:06 PM Matheus Tavares Bernardino wrote: > > Hi, > > During Git Summit it was mentioned that git-grep searches outside > sparsity pattern which is not aligned with user expectation. I took a > quick look at it and it seems the reason is > builtin/grep.c:grep_cache() (w

git-grep in sparse checkout

2019-10-01 Thread Matheus Tavares Bernardino
Hi, During Git Summit it was mentioned that git-grep searches outside sparsity pattern which is not aligned with user expectation. I took a quick look at it and it seems the reason is builtin/grep.c:grep_cache() (which also greps worktree) will grep the object store when a given index entry has th

Re: [PATCH 1/1] git-gui (Windows): use git-bash.exe if it is available

2019-10-01 Thread Pratyush Yadav
On 30/09/19 12:27PM, Johannes Schindelin wrote: > Hi, > > On Fri, 27 Sep 2019, Pratyush Yadav wrote: > > > On 26/09/19 10:46AM, Thomas Klaeger via GitGitGadget wrote: > > > From: Thomas Klaeger > > > > > > Git for Windows 2.x ships with an executable that starts the Git Bash > > > with all the e

[PATCH 0/1] fetch --multiple: respect --jobs=

2019-10-01 Thread Johannes Schindelin via GitGitGadget
I saw with sadness that pd/fetch-jobs went nowhere, and read in the most recent What's Cooking mail that it was even dropped. This is my attempt to resurrect the idea (although without the overhead of trying to support a first-class UI to control submodule and multiple-remote fetches independently

[PATCH 1/1] fetch: let --jobs= parallelize --multiple, too

2019-10-01 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin So far, `--jobs=` only parallelizes submodule fetches/clones, not `--multiple` fetches, which is unintuitive, given that the option's name does not say anything about submodules in particular. Let's change that. With this patch, also fetches from multiple remotes are pa

[PATCH 0/1] t0061: fix test for argv[0] with spaces (MINGW only)

2019-10-01 Thread Alexandr Miloslavskiy via GitGitGadget
The test was originally designed for the case where user reported that setting GIT_SSH to a .bat file with spaces in path fails on Windows: https://github.com/git-for-windows/git/issues/692 The test has two different problems: 1. It succeeds with AND without fix eb7c7863 that addressed user's p

[PATCH 1/1] t0061: fix test for argv[0] with spaces (MINGW only)

2019-10-01 Thread Alexandr Miloslavskiy via GitGitGadget
From: Alexandr Miloslavskiy The test was originally designed for the case where user reported that setting GIT_SSH to a .bat file with spaces in path fails on Windows: https://github.com/git-for-windows/git/issues/692 The test has two different problems: 1. It succeeds with AND without fix eb7c

[PATCH 0/1] Include hdr-check in the CI builds

2019-10-01 Thread Johannes Schindelin via GitGitGadget
Our hdr-check target is now functional in more ways than before. Let's run it as part of the CI builds. I offered this idea in a review of dl/honor-cflags-in-hdr-check [https://public-inbox.org/git/nycvar.qro.7.76.6.1909261452340.15...@tvgsbejvaqbjf.bet/] but it was not picked up. So I offer it

[PATCH 1/1] ci: run `hdr-check` as part of the `Static Analysis` job

2019-10-01 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Signed-off-by: Johannes Schindelin --- azure-pipelines.yml| 2 +- ci/install-dependencies.sh | 3 ++- ci/run-static-analysis.sh | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c329b7218b..

[PATCH] gitk: Add horizontal scrollbar to the files list

2019-10-01 Thread Bert Wesarg
Wrapping filenames is an unexpected experience in UX design. Disable wrapping and add a horizontal scrollbar to the files list to remove this. Signed-off-by: Bert Wesarg --- gitk | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gitk b/gitk index abe4805..bf2a061 10

Re: [PATCH] dir: special case check for the possibility that pathspec is NULL

2019-10-01 Thread Elijah Newren
On Mon, Sep 30, 2019 at 3:31 PM Denton Liu wrote: > > Hi Elijah, > > On Mon, Sep 30, 2019 at 12:11:06PM -0700, Elijah Newren wrote: > > Commits 404ebceda01c ("dir: also check directories for matching > > pathspecs", 2019-09-17) and 89a1f4aaf765 ("dir: if our pathspec might > > match files under a