Re: [BUG] Segfault in "git submodule"

2018-10-01 Thread Raymond Jennings
I instructed downstream to update their repository. On Mon, Oct 1, 2018 at 2:31 PM Raymond Jennings wrote: > > Yes, git 2.16.4 to be exact. > > I upgraded to 2.19 after ~arch keywording the package on gentoo and > that fixed it. > On Mon, Oct 1, 2018 at 12:19 PM Stefan Beller wrote: > > > > On

[PATCH v4 3/4] transport.c: introduce core.alternateRefsCommand

2018-10-01 Thread Taylor Blau
When in a repository containing one or more alternates, Git would sometimes like to list references from those alternates. For example, 'git receive-pack' lists the "tips" pointed to by references in those alternates as special ".have" references. Listing ".have" references is designed to make

[PATCH v4 2/4] transport.c: extract 'fill_alternate_refs_command'

2018-10-01 Thread Taylor Blau
To list alternate references, 'read_alternate_refs' creates a child process running 'git for-each-ref' in the alternate's Git directory. Prepare to run other commands besides 'git for-each-ref' by introducing and moving the relevant code from 'read_alternate_refs' to

[PATCH v4 4/4] transport.c: introduce core.alternateRefsPrefixes

2018-10-01 Thread Taylor Blau
The recently-introduced "core.alternateRefsCommand" allows callers to specify with high flexibility the tips that they wish to advertise from alternates. This flexibility comes at the cost of some inconvenience when the caller only wishes to limit the advertisement to one or more prefixes. For

[PATCH v4 0/4] Filter alternate references

2018-10-01 Thread Taylor Blau
Hi, Attached is the fourth re-roll of a series to teach 'core.alternateRefsCommand' and 'core.alternateRefsPrefixes' to filter refs from an alternate from being visible to the fork. This is done in order to optimize a case described in patch [3/4]. As always, a range-diff is included below,

[PATCH v4 1/4] transport: drop refnames from for_each_alternate_ref

2018-10-01 Thread Taylor Blau
From: Jeff King None of the current callers use the refname parameter we pass to their callbacks. In theory somebody _could_ do so, but it's actually quite weird if you think about it: it's a ref in somebody else's repository. So the name has no meaning locally, and in fact there may be

Re: [PATCH v3 4/4] transport.c: introduce core.alternateRefsPrefixes

2018-10-01 Thread Taylor Blau
On Mon, Oct 01, 2018 at 06:57:37PM -0700, Taylor Blau wrote: > On Sat, Sep 29, 2018 at 03:34:26AM -0400, Jeff King wrote: > > On Fri, Sep 28, 2018 at 03:05:57PM -0700, Taylor Blau wrote: > > > > > > > For example, to advertise only tags, a caller using > > > > > 'core.alternateRefsCommand' would

Re: [PATCH v3 4/4] transport.c: introduce core.alternateRefsPrefixes

2018-10-01 Thread Taylor Blau
On Sat, Sep 29, 2018 at 03:34:26AM -0400, Jeff King wrote: > On Fri, Sep 28, 2018 at 03:05:57PM -0700, Taylor Blau wrote: > > > > > For example, to advertise only tags, a caller using > > > > 'core.alternateRefsCommand' would have to do: > > > > > > > > $ git config core.alternateRefsCommand ' \

Re: [PATCH v3 3/4] transport.c: introduce core.alternateRefsCommand

2018-10-01 Thread Taylor Blau
On Sat, Sep 29, 2018 at 03:31:38AM -0400, Jeff King wrote: > On Fri, Sep 28, 2018 at 03:04:10PM -0700, Taylor Blau wrote: > > > > Well, you also need to pass the path so it knows which repo to look at. > > > Which I think is the primary reason we do it, but behaving differently > > > for each

Re: Git Evolve

2018-10-01 Thread Taylor Blau
Hi Stefan, On Sat, Sep 29, 2018 at 04:00:04PM -0700, Stefan Xenos wrote: > Hello, List! > > I'm interested in porting something like Mercurial's evolve command to > Git. Welcome to Git :-). I think that the discussion in this thread is good, but it's not why I'm replying. I have also wanted a

[PATCH] submodule update --remote: introduce pinning

2018-10-01 Thread Stefan Beller
gitmodules(5) sayeth: submodule..branch A remote branch name for tracking updates in the upstream submodule. If the option is not specified, it defaults to master. This doesn't allow having a "pinned" submodule that should not be updated from upstream. We should change this to

Re: [PATCH v3 1/5] CodingGuidelines: add shell piping guidelines

2018-10-01 Thread Matthew DeVore
On Thu, Sep 27, 2018 at 2:18 PM SZEDER Gábor wrote: > > On Tue, Sep 25, 2018 at 02:58:08PM -0700, Matthew DeVore wrote: > > + - Use Git upstream in the non-final position in a piped chain, as in: > > Note the starting upper case 'U'. > > > + - Use command substitution in a way that discards git's

Re: What's cooking in git.git (Sep 2018, #04; Thu, 20)

2018-10-01 Thread René Scharfe
Am 01.10.2018 um 22:12 schrieb Jeff King: > On Mon, Oct 01, 2018 at 09:16:07PM +0200, René Scharfe wrote: > >> Am 21.09.2018 um 07:22 schrieb Junio C Hamano: >>> * cc/delta-islands (2018-08-16) 7 commits >> [...] >>> * jk/pack-delta-reuse-with-bitmap (2018-08-21) 6 commits >> >> Not sure if it's

Re: [BUG] Segfault in "git submodule"

2018-10-01 Thread Raymond Jennings
Yes, git 2.16.4 to be exact. I upgraded to 2.19 after ~arch keywording the package on gentoo and that fixed it. On Mon, Oct 1, 2018 at 12:19 PM Stefan Beller wrote: > > On Sat, Sep 29, 2018 at 9:43 AM Raymond Jennings wrote: > > > > I have a repo, but it appears to be specific to staging area

Re: [PATCH 15/16] commit-reach: make can_all_from_reach... linear

2018-10-01 Thread René Scharfe
Am 01.10.2018 um 21:26 schrieb Derrick Stolee: > On 10/1/2018 3:16 PM, René Scharfe wrote: >> Am 28.06.2018 um 14:31 schrieb Derrick Stolee via GitGitGadget: >>> diff --git a/commit-reach.c b/commit-reach.c >>> index c58e50fbb..ac132c8e4 100644 >>> --- a/commit-reach.c >>> +++ b/commit-reach.c >>>

Re: [PATCH 2/2] fsck: use oidset for skiplist

2018-10-01 Thread Jeff King
On Mon, Oct 01, 2018 at 09:15:53PM +0200, René Scharfe wrote: > Am 28.08.2018 um 01:03 schrieb Jeff King: > > On Sun, Aug 26, 2018 at 01:37:41PM +0200, René Scharfe wrote: > >> So it seems worth it. > > > > Hmm, that really does. Which is a shame, because I hoped that one day we > > could get

Re: What's cooking in git.git (Sep 2018, #04; Thu, 20)

2018-10-01 Thread Jeff King
On Mon, Oct 01, 2018 at 09:16:07PM +0200, René Scharfe wrote: > Am 21.09.2018 um 07:22 schrieb Junio C Hamano: > > * cc/delta-islands (2018-08-16) 7 commits > [...] > > * jk/pack-delta-reuse-with-bitmap (2018-08-21) 6 commits > > Not sure if it's the interaction of the two topics or if only one

Re: [PATCH v5 9/9] submodule: support reading .gitmodules when it's not in the working tree

2018-10-01 Thread Stefan Beller
On Mon, Oct 1, 2018 at 8:45 AM Antonio Ospite wrote: > > On Thu, 27 Sep 2018 11:00:52 -0700 > Stefan Beller wrote: > > > On Thu, Sep 27, 2018 at 7:44 AM Antonio Ospite wrote: > [...] > > > OK, so the plan for v6 is: > > > > > > - avoid the corruption issues spotted by Gábor by removing the

Re: [PATCH 15/16] commit-reach: make can_all_from_reach... linear

2018-10-01 Thread Derrick Stolee
On 10/1/2018 3:16 PM, René Scharfe wrote: Am 28.06.2018 um 14:31 schrieb Derrick Stolee via GitGitGadget: diff --git a/commit-reach.c b/commit-reach.c index c58e50fbb..ac132c8e4 100644 --- a/commit-reach.c +++ b/commit-reach.c @@ -513,65 +513,88 @@ int commit_contains(struct ref_filter *filter,

Re: [PATCH] grep: provide a noop --recursive option

2018-10-01 Thread Stefan Beller
On Sat, Sep 29, 2018 at 7:55 AM Ævar Arnfjörð Bjarmason wrote: > > This --recursive (-r) option does nothing, and is purely here to > appease people who have "grep -r ..." burned into their muscle memory. > > Requested-by: Christoph Berg > Signed-off-by: Ævar Arnfjörð Bjarmason > --- > > On

Re: [PATCH 2/2] fsck: use oidset for skiplist

2018-10-01 Thread René Scharfe
Am 28.08.2018 um 01:03 schrieb Jeff King: > On Sun, Aug 26, 2018 at 01:37:41PM +0200, René Scharfe wrote: >> So it seems worth it. > > Hmm, that really does. Which is a shame, because I hoped that one day we > could get rid of the nasty macro-infestation that is khash.h. But it > really is a lot

Re: What's cooking in git.git (Sep 2018, #04; Thu, 20)

2018-10-01 Thread René Scharfe
Am 21.09.2018 um 07:22 schrieb Junio C Hamano: > * cc/delta-islands (2018-08-16) 7 commits > (merged to 'next' on 2018-08-27 at cf3d7bd93f) > + pack-objects: move 'layer' into 'struct packing_data' > + pack-objects: move tree_depth into 'struct packing_data' > + t5320: tests for delta islands

Re: [PATCH] grep: provide a noop --recursive option

2018-10-01 Thread René Scharfe
Am 29.09.2018 um 19:11 schrieb Junio C Hamano: > I however do not mind if we added "--recursive" with matching > "--no-recursive", and > > - made "--recursive" the default (obviously) > > - made "--no-recursive" a synonym to setting the recursion limit >to "never recurse" > > - and made

Re: [BUG] Segfault in "git submodule"

2018-10-01 Thread Stefan Beller
On Sat, Sep 29, 2018 at 9:43 AM Raymond Jennings wrote: > > I have a repo, but it appears to be specific to staging area state. > It only segfaults when I have a certain file deleted. > > Where do you want me to upload it? > On Sat, Sep 29, 2018 at 8:34 AM Duy Nguyen wrote: > > > > On Sat, Sep

Re: [PATCH 15/16] commit-reach: make can_all_from_reach... linear

2018-10-01 Thread René Scharfe
Am 28.06.2018 um 14:31 schrieb Derrick Stolee via GitGitGadget: > diff --git a/commit-reach.c b/commit-reach.c > index c58e50fbb..ac132c8e4 100644 > --- a/commit-reach.c > +++ b/commit-reach.c > @@ -513,65 +513,88 @@ int commit_contains(struct ref_filter *filter, struct > commit *commit, >

Re: [PATCH v2] help -a: improve and make --verbose default

2018-10-01 Thread Taylor Blau
On Sat, Sep 29, 2018 at 08:08:14AM +0200, Nguyễn Thái Ngọc Duy wrote: > When you type "git help" (or just "git") you are greeted with a list > with commonly used commands and their short description and are > suggested to use "git help -a" or "git help -g" for more details. > > "git help -av"

Re: [PATCH v7 7/7] read-cache: load cache entries on worker threads

2018-10-01 Thread Duy Nguyen
On Mon, Oct 1, 2018 at 3:46 PM Ben Peart wrote: > +/* > + * A helper function that will load the specified range of cache entries > + * from the memory mapped file and add them to the given index. > + */ > +static unsigned long load_cache_entry_block(struct index_state *istate, > +

Re: [PATCH v7 6/7] ieot: add Index Entry Offset Table (IEOT) extension

2018-10-01 Thread Duy Nguyen
On Mon, Oct 1, 2018 at 3:46 PM Ben Peart wrote: > @@ -1888,6 +1890,23 @@ static size_t estimate_cache_size(size_t ondisk_size, > unsigned int entries) > return ondisk_size + entries * per_entry; > } > > +struct index_entry_offset > +{ > + /* starting byte offset into index file,

Re: [Outreachy] Introducing

2018-10-01 Thread Christian Couder
Hi Giovana, On Mon, Oct 1, 2018 at 4:04 PM Giovana Morais wrote: > > Hey there, Christian and Git! > > My initial Outreachy application got accepted and, looking through available > projects, I was really interested in `git bisect` one, since I want to take > my C skills to a next level and,

Re: [PATCH v7 5/7] read-cache: load cache extensions on a worker thread

2018-10-01 Thread Duy Nguyen
On Mon, Oct 1, 2018 at 3:46 PM Ben Peart wrote: > @@ -1890,6 +1891,46 @@ static size_t estimate_cache_size(size_t ondisk_size, > unsigned int entries) > static size_t read_eoie_extension(const char *mmap, size_t mmap_size); > static void write_eoie_extension(struct strbuf *sb, git_hash_ctx >

Re: [PATCH v5 9/9] submodule: support reading .gitmodules when it's not in the working tree

2018-10-01 Thread Antonio Ospite
On Thu, 27 Sep 2018 11:00:52 -0700 Stefan Beller wrote: > On Thu, Sep 27, 2018 at 7:44 AM Antonio Ospite wrote: [...] > > OK, so the plan for v6 is: > > > > - avoid the corruption issues spotted by Gábor by removing the call > > to repo_read_gitmodules in builtin/grep.c (this still does

Re: [PATCH v7 3/7] eoie: add End of Index Entry (EOIE) extension

2018-10-01 Thread Duy Nguyen
On Mon, Oct 1, 2018 at 3:46 PM Ben Peart wrote: > @@ -2479,6 +2491,7 @@ static int do_write_index(struct index_state *istate, > struct tempfile *tempfile, > if (ce_write(, newfd, , sizeof(hdr)) < 0) > return -1; > > + offset = lseek(newfd, 0, SEEK_CUR) +

Re: [PATCH v7 3/7] eoie: add End of Index Entry (EOIE) extension

2018-10-01 Thread SZEDER Gábor
On Mon, Oct 01, 2018 at 09:45:52AM -0400, Ben Peart wrote: > From: Ben Peart > > The End of Index Entry (EOIE) is used to locate the end of the variable > length index entries and the beginning of the extensions. Code can take > advantage of this to quickly locate the index extensions without

Re: [PATCH v7 2/7] read-cache: clean up casting and byte decoding

2018-10-01 Thread Duy Nguyen
On Mon, Oct 1, 2018 at 3:46 PM Ben Peart wrote: > > From: Ben Peart > > This patch does a clean up pass to minimize the casting required to work > with the memory mapped index (mmap). > > It also makes the decoding of network byte order more consistent by using > get_be32() where possible. > >

Re: [PATCH v6 4/7] config: add new index.threads config setting

2018-10-01 Thread SZEDER Gábor
On Mon, Oct 01, 2018 at 09:17:53AM -0400, Ben Peart wrote: > > > On 9/28/2018 6:15 PM, Junio C Hamano wrote: > >Ramsay Jones writes: > > > >>>     if (!nr) { > >>>     ieot_blocks = istate->cache_nr / THREAD_COST; > >>>-   if (ieot_blocks < 1)

Re: Using git svn rebase at quarantine environment or a feasible alternative to synchronize git and svn repositories

2018-10-01 Thread Ævar Arnfjörð Bjarmason
On Mon, Oct 1, 2018 at 4:17 PM Jose Gisbert wrote: > > > > Dear members of the Git community, > > > > > > The enterprise I work for is planning to switch from svn to git. > > > > > > Before the complete switch to git we have decided to implement a scenario > > > where the two SCMs live together,

Re: Using git svn rebase at quarantine environment or a feasible alternative to synchronize git and svn repositories

2018-10-01 Thread Jeff King
On Mon, Oct 01, 2018 at 08:12:49AM +, Jose Gisbert wrote: > My proposal consists to import the svn repository to git using git svn and set > receive.denyCurrentBranch to updateInstead. Then install pre-receive and > post-receive hooks and set that repository as the central repository for git

RE: Using git svn rebase at quarantine environment or a feasible alternative to synchronize git and svn repositories

2018-10-01 Thread Jose Gisbert
> > Dear members of the Git community, > > > > The enterprise I work for is planning to switch from svn to git. > > > > Before the complete switch to git we have decided to implement a scenario > > where the two SCMs live together, being the svn repository the reference. > > We also want this

[PATCH v7 6/7] ieot: add Index Entry Offset Table (IEOT) extension

2018-10-01 Thread Ben Peart
From: Ben Peart This patch enables addressing the CPU cost of loading the index by adding additional data to the index that will allow us to efficiently multi- thread the loading and conversion of cache entries. It accomplishes this by adding an (optional) index extension that is a table of

[PATCH v7 5/7] read-cache: load cache extensions on a worker thread

2018-10-01 Thread Ben Peart
From: Ben Peart This patch helps address the CPU cost of loading the index by loading the cache extensions on a worker thread in parallel with loading the cache entries. In some cases, loading the extensions takes longer than loading the cache entries so this patch utilizes the new EOIE to

[PATCH v7 4/7] config: add new index.threads config setting

2018-10-01 Thread Ben Peart
From: Ben Peart Add support for a new index.threads config setting which will be used to control the threading code in do_read_index(). A value of 0 will tell the index code to automatically determine the correct number of threads to use. A value of 1 will make the code single threaded. A

[PATCH v7 7/7] read-cache: load cache entries on worker threads

2018-10-01 Thread Ben Peart
From: Ben Peart This patch helps address the CPU cost of loading the index by utilizing the Index Entry Offset Table (IEOT) to divide loading and conversion of the cache entries across multiple threads in parallel. I used p0002-read-cache.sh to generate some performance data: Test w/100,000

[PATCH v7 0/7] speed up index load through parallelization

2018-10-01 Thread Ben Peart
Thanks for all the feedback. The biggest change since the last version is how this patch series interacts with the split-index feature. With a split index, most of the cache entries are stored in the shared index so would benefit from multi-threaded parsing. To enable that, the EOIE and IEOT

[PATCH v7 2/7] read-cache: clean up casting and byte decoding

2018-10-01 Thread Ben Peart
From: Ben Peart This patch does a clean up pass to minimize the casting required to work with the memory mapped index (mmap). It also makes the decoding of network byte order more consistent by using get_be32() where possible. Signed-off-by: Ben Peart --- read-cache.c | 23

[PATCH v7 3/7] eoie: add End of Index Entry (EOIE) extension

2018-10-01 Thread Ben Peart
From: Ben Peart The End of Index Entry (EOIE) is used to locate the end of the variable length index entries and the beginning of the extensions. Code can take advantage of this to quickly locate the index extensions without having to parse through all of the index entries. Because it must be

[PATCH v7 1/7] read-cache.c: optimize reading index format v4

2018-10-01 Thread Ben Peart
From: Nguyễn Thái Ngọc Duy Index format v4 requires some more computation to assemble a path based on a previous one. The current code is not very efficient because - it doubles memory copy, we assemble the final path in a temporary first before putting it back to a cache_entry -

Re: [PATCH v6 4/7] config: add new index.threads config setting

2018-10-01 Thread Ben Peart
On 9/28/2018 6:15 PM, Junio C Hamano wrote: Ramsay Jones writes:     if (!nr) {     ieot_blocks = istate->cache_nr / THREAD_COST; -   if (ieot_blocks < 1) -   ieot_blocks = 1;     cpus =

Re: [PATCH] read-cache: fix division by zero core-dump

2018-10-01 Thread Derrick Stolee
On 9/28/2018 11:31 AM, Ramsay Jones wrote: Also, this is not the first time some multi-threaded code in git has 'failed' by assuming more than one cpu, so ... I wonder if this is a good time to create a GIT_TEST_CPU_COUNT variable so we can mock out single-processor environments instead of

Re: Git Evolve

2018-10-01 Thread Derrick Stolee
On 9/29/2018 7:00 PM, Stefan Xenos wrote: Hello, List! Hello! Welcome. I'm interested in porting something like Mercurial's evolve command to Git. I'll be following up with a formal proposal shortly, but before I do I thought I'd introduce myself to the list and find out if anyone else is

[PATCH v2 2/3] git.c: handle_alias: prepend alias info when first argument is -h

2018-10-01 Thread Rasmus Villemoes
Most git commands respond to -h anywhere in the command line, or at least as a first and lone argument, by printing the usage information. For aliases, we can provide a little more information that might be useful in interpreting/understanding the following output by prepending a line telling that

[PATCH v2 1/3] help: redirect to aliased commands for "git cmd --help"

2018-10-01 Thread Rasmus Villemoes
As discussed in the thread for v1 of this patch [1] [2], this changes the rules for "git foo --help" when foo is an alias. (0) When invoked as "git help foo", we continue to print the "foo is aliased to bar" message and nothing else. (1) If foo is an alias for a shell command, print "foo is

[PATCH v2 3/3] git-help.txt: document "git help cmd" vs "git cmd --help" for aliases

2018-10-01 Thread Rasmus Villemoes
This documents the existing behaviour of "git help cmd" when cmd is an alias, as well as providing a hint to use the "git cmd --help" form to be taken directly to the man page for the aliased command. Signed-off-by: Rasmus Villemoes --- Documentation/git-help.txt | 4 1 file changed, 4

Re: Using git svn rebase at quarantine environment or a feasible alternative to synchronize git and svn repositories

2018-10-01 Thread Ævar Arnfjörð Bjarmason
On Mon, Oct 01 2018, Jose Gisbert wrote: > Dear members of the Git community, > > The enterprise I work for is planning to switch from svn to git. > > Before the complete switch to git we have decided to implement a scenario > where the two SCMs live together, being the svn repository the

Using git svn rebase at quarantine environment or a feasible alternative to synchronize git and svn repositories

2018-10-01 Thread Jose Gisbert
Dear members of the Git community, The enterprise I work for is planning to switch from svn to git. Before the complete switch to git we have decided to implement a scenario where the two SCMs live together, being the svn repository the reference. We also want this scenario to be transparent for

Re: Null pointer dereference in rerere.c

2018-10-01 Thread Ruud van Asseldonk
> I do believe this bug may actually be fixed in master, by 93406a282f > ("rerere: fix crash with files rerere can't handle", 2018-08-05). Do > you by any chance remember if you committed a file that contained > conflict markers during the rebase at some point? I might have, but I am not 100%