Re: [RFC PATCH 00/19] object-store refactoring 3 (replace objects, main ref store)

2018-04-06 Thread René Scharfe
Am 07.04.2018 um 01:21 schrieb Stefan Beller: > This applies on top of 464416a2eaadf84d2bfdf795007863d03b222b7c > (sb/packfiles-in-repository). > It is also available at > https://github.com/stefanbeller/git/tree/object-store-3 This series conflicts with 1731a1e239 (replace_object: convert

pujcky

2018-04-06 Thread Ronald Bernstein
Jsem Ronald Bernstein, jsem úverový dustojník, dávám pujcky jednotlivcum a firme pro obchodní a osobní úcely, kontaktujte me, pokud potrebujete jakýkoliv druh pujcky. Poskytuji pujcky široké verejnosti s úrokovou sazbou 2%.

Re: Is support for 10.8 dropped?

2018-04-06 Thread Igor Korot
Hi, Eric, On Thu, Apr 5, 2018 at 5:46 PM, Eric Sunshine wrote: > On Thu, Apr 5, 2018 at 3:48 PM, Igor Korot wrote: >> Is support for 10.8 dropped? > > Until about a year ago, I was still periodically building Git from > source on MacOS 10.5, and

Re: [PATCH v5 2/2] builtin/config.c: prefer `--type=bool` over `--bool`, etc.

2018-04-06 Thread Taylor Blau
On Fri, Apr 06, 2018 at 10:55:18AM -0400, Jeff King wrote: > On Fri, Apr 06, 2018 at 02:14:34AM -0400, Eric Sunshine wrote: > > > > diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt > > > @@ -9,13 +9,13 @@ git-config - Get and set repository or global options > > > SYNOPSIS

Re: [PATCH v5 1/3] builtin/config: introduce `--default`

2018-04-06 Thread Taylor Blau
On Fri, Apr 06, 2018 at 03:40:56AM -0400, Eric Sunshine wrote: > On Fri, Apr 6, 2018 at 2:53 AM, Eric Sunshine wrote: > > On Fri, Apr 6, 2018 at 2:30 AM, Taylor Blau wrote: > >> +test_expect_success 'uses entry when available' ' > >> + echo bar

Re: [PATCH v5 1/3] builtin/config: introduce `--default`

2018-04-06 Thread Taylor Blau
On Fri, Apr 06, 2018 at 02:53:45AM -0400, Eric Sunshine wrote: > On Fri, Apr 6, 2018 at 2:30 AM, Taylor Blau wrote: > > [...] > > This commit (and those following it in this series) aim to eventually > > replace `--get-color` with a consistent alternative. By introducing > >

Re: [PATCH v5 3/3] builtin/config: introduce `color` type specifier

2018-04-06 Thread Taylor Blau
On Fri, Apr 06, 2018 at 03:29:48AM -0400, Eric Sunshine wrote: > On Fri, Apr 6, 2018 at 2:30 AM, Taylor Blau wrote: > > [...] > > For consistency, let's introduce `--type=color` and encourage its use > > with `--default` together over `--get-color` alone. > > A couple minor

Re: [PATCH v6 2/2] builtin/config.c: support `--type=` as preferred alias for `--type`

2018-04-06 Thread Taylor Blau
On Fri, Apr 06, 2018 at 03:04:53AM -0400, Eric Sunshine wrote: > On Fri, Apr 6, 2018 at 2:39 AM, Taylor Blau wrote: > > [...] > > In this patch, we support `--type=` in > > addition to `--int`, `--bool`, and etc. This allows the aforementioned > >

[PATCH 06/19] refs: add repository argument to get_main_ref_store

2018-04-06 Thread Stefan Beller
Add a repository argument to allow the get_main_ref_store caller to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the previous commits, use a macro to catch

[PATCH 04/19] replace-object: move replace objects prepared flag to object store

2018-04-06 Thread Stefan Beller
Remove another global variable on the way. Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- object-store.h | 2 ++ replace-object.c | 6 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/object-store.h

[PATCH 05/19] replace-object: check_replace_refs is safe in multi repo environment

2018-04-06 Thread Stefan Beller
In ecef23 (inline lookup_replace_object() calls, 2011-05-15) a shortcut for checking the object replacement was added by setting check_replace_refs to 0 once the replacements were evaluated to not exist. This works fine in with the assumption of only one repository in existence. The

[PATCH 18/19] replace-object: allow do_lookup_replace_object to handle arbitrary repositories

2018-04-06 Thread Stefan Beller
Signed-off-by: Stefan Beller --- replace-object.c | 9 + replace-object.h | 3 +-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/replace-object.c b/replace-object.c index 967d794687..075a48b661 100644 --- a/replace-object.c +++ b/replace-object.c @@

[PATCH 10/19] replace-object: add repository argument to prepare_replace_object

2018-04-06 Thread Stefan Beller
Add a repository argument to allow the prepare_replace_object caller to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the previous commits, use a macro to

[PATCH 07/19] refs: add repository argument to for_each_replace_ref

2018-04-06 Thread Stefan Beller
Add a repository argument to allow for_each_replace_ref callers to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the previous commits, use a macro to catch

[PATCH 12/19] replace-object: add repository argument to lookup_replace_object

2018-04-06 Thread Stefan Beller
Add a repository argument to allow callers of lookup_replace_object to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the previous commits, use a macro to

[PATCH 08/19] replace-object: add repository argument to replace_object_pos

2018-04-06 Thread Stefan Beller
Add a repository argument to allow the replace_object_pos caller to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the previous commits, use a macro to catch

[PATCH 17/19] replace-object: allow prepare_replace_object to handle arbitrary repositories

2018-04-06 Thread Stefan Beller
Signed-off-by: Stefan Beller --- replace-object.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/replace-object.c b/replace-object.c index b3bfd21541..967d794687 100644 --- a/replace-object.c +++ b/replace-object.c @@ -72,15 +72,13 @@ static

[PATCH 19/19] replace-object: allow lookup_replace_object to handle arbitrary repositories

2018-04-06 Thread Stefan Beller
Signed-off-by: Stefan Beller --- replace-object.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/replace-object.h b/replace-object.h index e15f0725cb..e7511ea54c 100644 --- a/replace-object.h +++ b/replace-object.h @@ -22,14 +22,14 @@ extern

[PATCH 16/19] replace-object: allow register_replace_object to handle arbitrary repositories

2018-04-06 Thread Stefan Beller
Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- replace-object.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/replace-object.c b/replace-object.c index 9272c7acbf..b3bfd21541 100644

[PATCH 09/19] replace-object: add repository argument to register_replace_object

2018-04-06 Thread Stefan Beller
Add a repository argument to allow the register_replace_object caller to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the previous commits, use a macro to

[PATCH 11/19] replace-object: add repository argument to do_lookup_replace_object

2018-04-06 Thread Stefan Beller
Add a repository argument to allow the do_lookup_replace_object caller to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the previous commits, use a macro to

[PATCH 03/19] object-store: move lookup_replace_object to replace-object.h

2018-04-06 Thread Stefan Beller
lookup_replace_object is a low-level function that most users of the object store do not need to use directly. Move it to replace-object.h to avoid a dependency loop in an upcoming change to its inline definition that will make use of repository.h. Signed-off-by: Stefan Beller

[PATCH 02/19] replace-object: move replace_object to object store

2018-04-06 Thread Stefan Beller
Refs belong to particular repositories, so the replacements defined by them should belong to a particular repository as well. Move the definition of a single object replacement to a new header "replace-object.h". While at it replace the hardcoded 20 by GIT_MAX_RAWSZ. Signed-off-by: Jonathan

[PATCH 14/19] refs: allow for_each_replace_ref to handle arbitrary repositories

2018-04-06 Thread Stefan Beller
Signed-off-by: Stefan Beller --- refs.c | 4 ++-- refs.h | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/refs.c b/refs.c index 793b827e19..ee71733a74 100644 --- a/refs.c +++ b/refs.c @@ -1415,9 +1415,9 @@ int refs_for_each_fullref_in(struct ref_store

[PATCH 15/19] replace-object: allow replace_object_pos to handle arbitrary repositories

2018-04-06 Thread Stefan Beller
Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- replace-object.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/replace-object.c b/replace-object.c index 944bcaf242..9272c7acbf 100644 --- a/replace-object.c +++

[PATCH 13/19] refs: store the main ref store inside the repository struct

2018-04-06 Thread Stefan Beller
Signed-off-by: Stefan Beller --- refs.c | 13 + refs.h | 4 +--- repository.h | 5 + 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/refs.c b/refs.c index 0352cbdcc1..793b827e19 100644 --- a/refs.c +++ b/refs.c @@ -1608,9 +1608,6

[PATCH 01/19] replace_object.c: rename to use dash in file name

2018-04-06 Thread Stefan Beller
This is more consistent with the project style. The majority of Git's source files use dashes in preference to underscores in their file names. Noticed while adding a header corresponding to this file. Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller

[RFC PATCH 00/19] object-store refactoring 3 (replace objects, main ref store)

2018-04-06 Thread Stefan Beller
This applies on top of 464416a2eaadf84d2bfdf795007863d03b222b7c (sb/packfiles-in-repository). It is also available at https://github.com/stefanbeller/git/tree/object-store-3 This series will bring the replacement mechanism (git replace) into the object store. The first patches are cleaning up a

Re: [PATCH v5 1/5] stash: improve option parsing test coverage

2018-04-06 Thread Paul-Sebastian Ungureanu
On 06.04.2018 16:06, Johannes Schindelin wrote: + git stash clear && + test_when_finished "git reset --hard HEAD" && + echo foo >file2 && + git stash && + echo bar >file2 && + git stash && + test-chmtime =123456789 file2 && + for type in apply pop

Re: [PATCH] Make running git under other debugger-like programs easy

2018-04-06 Thread Elijah Newren
Hi Dscho, On Fri, Apr 6, 2018 at 3:38 AM, Johannes Schindelin wrote: > On Thu, 5 Apr 2018, Elijah Newren wrote: >> On Thu, Apr 5, 2018 at 12:57 PM, Johannes Schindelin >> wrote: >> That all looks great to me. But at this point, it

Re: [PATCH 5/7] diff.c: refactor internal representation for coloring moved code

2018-04-06 Thread Jonathan Tan
On Fri, 6 Apr 2018 14:28:40 -0700 Stefan Beller wrote: > Now that I redid it another way[1], I have the impression that this was the > right approach, because it allows for a short > if (o->color_moved) > condition. If we treat white spaces separately, then we'd have to >

[PATCH] t/helper: 'test-chmtime (--get|-g)' to print only the mtime

2018-04-06 Thread Paul-Sebastian Ungureanu
Compared to 'test-chmtime -v +0 file' which prints the mtime and and the file name, 'test-chmtime --get file' displays only the mtime. If it is used in combination with (+|=|=+|=-|-)seconds, it changes and prints the new value. test-chmtime -v +0 file | sed 's/[^0-9].*$//' is now

Re: FREAD_READS_DIRECTORIES test fails for the wrong reasons

2018-04-06 Thread Jeff King
On Fri, Apr 06, 2018 at 05:57:15PM -0400, Jonathan Primrose wrote: > > Oops. This is due to my 3adf9fdecf (configure.ac: loosen > > FREAD_READS_DIRECTORIES test program, 2017-06-14). > > > > Neither I nor the original tester noticed, because we're on Linux, which > > needs that set. > > I'm

Re: FREAD_READS_DIRECTORIES test fails for the wrong reasons

2018-04-06 Thread Jonathan Primrose
On 04/06/2018 03:33 PM, Jeff King wrote: On Fri, Apr 06, 2018 at 02:06:50PM -0400, Jonathan Primrose wrote: A while ago, the configure test for FREAD_READS_DIRECTORIES was changed to (attempt to) check for a NULL result from fopen. Unfortunately, the test will always fail - because it won't

Re: A potential approach to making tests faster on Windows

2018-04-06 Thread Stefan Beller
On Fri, Apr 6, 2018 at 2:40 PM, Jeff King wrote: > On Tue, Apr 03, 2018 at 06:00:05PM +0200, Johannes Schindelin wrote: > >> > But if we're at the point of creating custom C builtins for >> > busybox/dash/etc, you should be able to create a primitive for "read >> > this using

Re: [PATCH v8 00/15] nd/pack-objects-pack-struct updates

2018-04-06 Thread Jeff King
On Sat, Mar 31, 2018 at 12:02:56PM +0200, Nguyễn Thái Ngọc Duy wrote: > v8 changes > > - prefer BUG() over die() > - do "1U <<" instead of "1 << " to avoid undefined behavior with > signed shifting. > - add more comments based on Jeff's feedback > - plug a leak in try_delta() when delta_size

Re: [PATCH 4/3] Makefile: untangle DEVELOPER and -Werror

2018-04-06 Thread Jeff King
On Tue, Apr 03, 2018 at 05:17:00PM +0200, Duy Nguyen wrote: > It's not that complex. With the EAGER_DEVELOPER patch removed, we can > have something like this where eager devs just need to put > > DEVOPTS = gentle no-suppression > > and you put > > DEVOPTS = gentle > > (bad naming, I

Re: A potential approach to making tests faster on Windows

2018-04-06 Thread Jeff King
On Tue, Apr 03, 2018 at 06:00:05PM +0200, Johannes Schindelin wrote: > > But if we're at the point of creating custom C builtins for > > busybox/dash/etc, you should be able to create a primitive for "read > > this using buffered stdio, other processes be damned, and return one > > line at a

Re: [PATCH v2 00/15] Assorted fixes for `git config` (including the "empty sections" bug)

2018-04-06 Thread Jeff King
On Tue, Apr 03, 2018 at 06:27:55PM +0200, Johannes Schindelin wrote: > I am very, very grateful for the time Peff spent on reviewing the previous > iteration, and hope that he realizes just how much the elegance of the > event-stream-based version is due to his excellent review. Unfortunately I

Re: [PATCH v2 11/15] git_config_set: do not use a state machine

2018-04-06 Thread Jeff King
On Tue, Apr 03, 2018 at 06:28:42PM +0200, Johannes Schindelin wrote: > While a neat theoretical construct, state machines are hard to read. In > this instance, it does not even make a whole lot of sense because we are > more interested in flags, anyway: has the section been seen? Has the key >

Re: [PATCH 5/7] diff.c: refactor internal representation for coloring moved code

2018-04-06 Thread Stefan Beller
On Mon, Apr 2, 2018 at 4:51 PM, Jonathan Tan wrote: > On Mon, 2 Apr 2018 15:48:52 -0700 > Stefan Beller wrote: > >> At the time the move coloring was implemented we thought an enum of modes >> is the best to configure this feature. However as we

Re: [PATCH v2 09/15] config: avoid using the global variable `store`

2018-04-06 Thread Jeff King
On Tue, Apr 03, 2018 at 06:28:34PM +0200, Johannes Schindelin wrote: > It is much easier to reason about, when the config code to set/unset > variables or to remove/rename sections does not rely on a global (or > file-local) variable. Agreed. > -static struct { > +struct config_set_store {

Re: [PATCH v2 08/15] config: introduce an optional event stream while parsing

2018-04-06 Thread Jeff King
On Tue, Apr 03, 2018 at 06:28:29PM +0200, Johannes Schindelin wrote: > This extends our config parser so that it can optionally produce an event > stream via callback function, where it reports e.g. when a comment was > parsed, or a section header, etc. > > This parser will be used subsequently

Re: [PATCH] git-svn: avoid warning on undef readline()

2018-04-06 Thread Ævar Arnfjörð Bjarmason
On Fri, Apr 06 2018, Eric Wong wrote: > Ævar Arnfjörð Bjarmason wrote: >> On Fri, Apr 06 2018, Eric Wong wrote: >> > Ævar Arnfjörð Bjarmason wrote: >> > >> >> --- a/perl/Git.pm >> >> +++ b/perl/Git.pm >> >> @@ -554,7 +554,7 @@ sub get_record { >> >> my

Re: [PATCH] git-svn: avoid warning on undef readline()

2018-04-06 Thread Eric Wong
Ævar Arnfjörð Bjarmason wrote: > On Fri, Apr 06 2018, Eric Wong wrote: > > Ævar Arnfjörð Bjarmason wrote: > > > >> --- a/perl/Git.pm > >> +++ b/perl/Git.pm > >> @@ -554,7 +554,7 @@ sub get_record { > >>my ($fh, $rs) = @_; > >>local $/ = $rs; > >>my

Re: [PATCH 3/7] diff.c: do not pass diff options as keydata to hashmap

2018-04-06 Thread Stefan Beller
Hi Jeff, On Fri, Apr 6, 2018 at 1:04 PM, Jeff King wrote: > On Mon, Apr 02, 2018 at 03:48:50PM -0700, Stefan Beller wrote: > >> The diff options are passed to the compare function as >> 'hashmap_cmp_fn_data', which are given when the hashmaps >> are initialized. >> >> A later

Re: [PATCH] t5404: relax overzealous test

2018-04-06 Thread Ævar Arnfjörð Bjarmason
On Fri, Apr 06 2018, Jeff King wrote: > On Fri, Apr 06, 2018 at 09:31:22PM +0200, Johannes Schindelin wrote: >> This patch chooses instead to look for the prefix "error:" at the >> beginning of the line, so that there can be no ambiguity that any catch >> was indeed a message generated by Git's

Re: Self-inflicted "abort" in a newbie attempt at read-only exploration of a cloned repository?

2018-04-06 Thread Thierry Moreau
On 06/04/18 07:56 PM, Jeff King wrote: On Thu, Apr 05, 2018 at 04:18:23PM -0700, Bryan Turner wrote: The documentation for --work-tree says: --work-tree= Set the path to the working tree. It can be an absolute path or a path relative to the current working directory. This can also be

[PATCH] Documentation/git-bisect.txt: git bisect term → git bisect terms

2018-04-06 Thread Anders Kaseorg
Signed-off-by: Anders Kaseorg --- Documentation/git-bisect.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt index 4a1417bdcd..4b45d837a7 100644 --- a/Documentation/git-bisect.txt +++

Re: [PATCH] t5404: relax overzealous test

2018-04-06 Thread Jeff King
On Fri, Apr 06, 2018 at 10:13:46PM +0200, Johannes Schindelin wrote: > On Fri, 6 Apr 2018, Jeff King wrote: > > > On Fri, Apr 06, 2018 at 09:31:22PM +0200, Johannes Schindelin wrote: > > > > > Suppose, however, that you are a big fan of whales. Or even better: your > > > IT administrator has a

Re: [PATCH] t5404: relax overzealous test

2018-04-06 Thread Johannes Schindelin
Hi Peff, On Fri, 6 Apr 2018, Jeff King wrote: > On Fri, Apr 06, 2018 at 09:31:22PM +0200, Johannes Schindelin wrote: > > > Suppose, however, that you are a big fan of whales. Or even better: your > > IT administrator has a whale of a time picking cute user names, e.g. > > referring to you (due

Re: [PATCH 3/7] diff.c: do not pass diff options as keydata to hashmap

2018-04-06 Thread Jeff King
On Mon, Apr 02, 2018 at 03:48:50PM -0700, Stefan Beller wrote: > The diff options are passed to the compare function as > 'hashmap_cmp_fn_data', which are given when the hashmaps > are initialized. > > A later patch will make use of the keydata to signal > different settings for comparision. I

Re: Self-inflicted "abort" in a newbie attempt at read-only exploration of a cloned repository?

2018-04-06 Thread Jeff King
On Thu, Apr 05, 2018 at 04:18:23PM -0700, Bryan Turner wrote: > The documentation for --work-tree says: > > --work-tree= > > Set the path to the working tree. It can be an absolute path or a path > relative to the current working directory. This can also be controlled > by setting the

Re: [PATCH] t5404: relax overzealous test

2018-04-06 Thread Jeff King
On Fri, Apr 06, 2018 at 09:31:22PM +0200, Johannes Schindelin wrote: > In 0b294c0abf0 (make deleting a missing ref more quiet, 2008-07-08), we > added a test to verify that deleting an already-deleted ref does not > show an error. Amazing that it took this long to come up. > Suppose, however,

Re: reg. fatal: The remote end hung up unexpectedly on NFS

2018-04-06 Thread Jeff King
On Fri, Apr 06, 2018 at 11:55:51PM +0530, Satya Prakash GS wrote: > We have a distributed filesystem with NFS access. On the NFS mount, I > was doing a git-clone and if NFS server crashed and came back up while > the clone is going on, clone fails with the below message: > > git clone

Re: [PATCH v2 0/4] Lazy-load trees when reading commit-graph

2018-04-06 Thread Stefan Beller
On Fri, Apr 6, 2018 at 12:21 PM, Jeff King wrote: > On Fri, Apr 06, 2018 at 07:09:30PM +, Derrick Stolee wrote: > >> Derrick Stolee (4): >> treewide: rename tree to maybe_tree >> commit: create get_commit_tree() method >> treewide: replace maybe_tree with accessor methods

Re: [PATCH v2 0/4] Lazy-load trees when reading commit-graph

2018-04-06 Thread Derrick Stolee
On 4/6/2018 3:21 PM, Jeff King wrote: On Fri, Apr 06, 2018 at 07:09:30PM +, Derrick Stolee wrote: Derrick Stolee (4): treewide: rename tree to maybe_tree commit: create get_commit_tree() method treewide: replace maybe_tree with accessor methods commit-graph: lazy-load trees for

Re: FREAD_READS_DIRECTORIES test fails for the wrong reasons

2018-04-06 Thread Jeff King
On Fri, Apr 06, 2018 at 02:06:50PM -0400, Jonathan Primrose wrote: > A while ago, the configure test for FREAD_READS_DIRECTORIES was changed > to (attempt to) check for a NULL result from fopen. Unfortunately, the > test will always fail - because it won't compile. The code snippet in >

[PATCH] t5404: relax overzealous test

2018-04-06 Thread Johannes Schindelin
In 0b294c0abf0 (make deleting a missing ref more quiet, 2008-07-08), we added a test to verify that deleting an already-deleted ref does not show an error. Our test simply looks for the substring 'error' in the output of the `git push`, which might look innocuous on the face of it. Suppose,

Git send-email not sending email patches as subsequent replies

2018-04-06 Thread David Davis
Hello, I have the following git send-email command: git send-email -5 --quiet --thread --no-chain-reply-to --compose --subject='Recent Base Prototype Changes Summary' --to=davisda...@google.com --from=davisda...@google.com It's sending emails but as 5 individual emails and not as subsequent

Re: [PATCH 3/3] ref-filter: factor ref_array pushing into its own function

2018-04-06 Thread Derrick Stolee
On 4/6/2018 2:59 PM, Jeff King wrote: In preparation for callers constructing their own ref_array structs, let's move our own internal push operation into its own function. While we're at it, we can replace REALLOC_ARRAY() with ALLOC_GROW(), which should give the growth operation amortized

Re: [PATCH v2 0/4] Lazy-load trees when reading commit-graph

2018-04-06 Thread Jeff King
On Fri, Apr 06, 2018 at 07:09:30PM +, Derrick Stolee wrote: > Derrick Stolee (4): > treewide: rename tree to maybe_tree > commit: create get_commit_tree() method > treewide: replace maybe_tree with accessor methods > commit-graph: lazy-load trees for commits I gave this only a

[PATCH v2 2/4] commit: create get_commit_tree() method

2018-04-06 Thread Derrick Stolee
While walking the commit graph, we load struct commit objects into the object cache. During this process, we also load struct tree objects for the root tree of each of these commits. We load these objects even if we are only computing commit reachability information, such as a merge base or

[PATCH v2 4/4] commit-graph: lazy-load trees for commits

2018-04-06 Thread Derrick Stolee
The commit-graph file provides quick access to commit data, including the OID of the root tree for each commit in the graph. When performing a deep commit-graph walk, we may not need to load most of the trees for these commits. Delay loading the tree object for a commit loaded from the graph

[PATCH v2 1/4] treewide: rename tree to maybe_tree

2018-04-06 Thread Derrick Stolee
Using the commit-graph file to walk commit history removes the large cost of parsing commits during the walk. This exposes a performance issue: lookup_tree() takes a large portion of the computation time, even when Git never uses those trees. In anticipation of lazy-loading these trees, rename

[PATCH v2 0/4] Lazy-load trees when reading commit-graph

2018-04-06 Thread Derrick Stolee
There are several commit-graph walks that require loading many commits but never walk the trees reachable from those commits. However, the current logic in parse_commit() requires the root tree to be loaded. This only uses lookup_tree(), but when reading commits from the commit- graph file, the

[PATCH 3/3] ref-filter: factor ref_array pushing into its own function

2018-04-06 Thread Jeff King
In preparation for callers constructing their own ref_array structs, let's move our own internal push operation into its own function. While we're at it, we can replace REALLOC_ARRAY() with ALLOC_GROW(), which should give the growth operation amortized linear complexity (as opposed to growing by

[PATCH 2/3] ref-filter: make ref_array_item allocation more consistent

2018-04-06 Thread Jeff King
We have a helper function to allocate ref_array_item structs, but it only takes a subset of the possible fields in the struct as initializers. We could have it accept an argument for _every_ field, but that becomes a pain for the fields which some callers don't want to set initially. Instead,

[PATCH 1/3] ref-filter: use "struct object_id" consistently

2018-04-06 Thread Jeff King
Internally we store a "struct object_id", and all of our callers have one to pass us. But we insist that they peel it to its bare-sha1 hash, which we then hashcpy() into place. Let's pass it around as an object_id, which future-proofs us for a post-sha1 world. Signed-off-by: Jeff King

Re: [PATCH v8] ls-remote: create '--sort' option

2018-04-06 Thread Jeff King
On Thu, Apr 05, 2018 at 01:11:34AM +0200, Harald Nordgren wrote: > Without digging to much into the `ref-filter` code itself, it seems > like there is an opportunity to generalize and unfify the logic > between these two cases. As well as using `ALLOC_GROW`. But maybe that > is best left as a

Re: [PATCH 0/1] Colorize some errors on stderr

2018-04-06 Thread Ævar Arnfjörð Bjarmason
On Fri, Feb 16 2018, Johannes Schindelin wrote: > This is an RFC because it tries to introduce a fundamental new color feature: > Coloring messages *on stderr*. I missed this the first time around, and don't have anything to add that others haven't covered. Just wanted to say I'd love to get

Re: reg. fatal: The remote end hung up unexpectedly on NFS

2018-04-06 Thread Ævar Arnfjörð Bjarmason
On Fri, Apr 06 2018, Satya Prakash wrote: > Hi, > > We have a distributed filesystem with NFS access. On the NFS mount, I > was doing a git-clone and if NFS server crashed and came back up while > the clone is going on, clone fails with the below message: > > git clone

reg. fatal: The remote end hung up unexpectedly on NFS

2018-04-06 Thread Satya Prakash GS
Hi, We have a distributed filesystem with NFS access. On the NFS mount, I was doing a git-clone and if NFS server crashed and came back up while the clone is going on, clone fails with the below message: git clone https://sa...@github.com/fs/private-qa.git remote: Counting objects: 139419,

Re: [PATCH] git-svn: avoid warning on undef readline()

2018-04-06 Thread Ævar Arnfjörð Bjarmason
On Fri, Apr 06 2018, Eric Wong wrote: > Ævar Arnfjörð Bjarmason wrote: >> See https://public-inbox.org/git/86h8oobl36@phe.ftfl.ca/ for the >> original report. > > Thanks for taking a look at this. Also https://bugs.debian.org/894997 > >> --- a/perl/Git.pm >> +++

FREAD_READS_DIRECTORIES test fails for the wrong reasons

2018-04-06 Thread Jonathan Primrose
A while ago, the configure test for FREAD_READS_DIRECTORIES was changed to (attempt to) check for a NULL result from fopen. Unfortunately, the test will always fail - because it won't compile. The code snippet in configure.ac translates to: return f); Either there's an extra ) or a missing (. A

Re: [RFC PATCH 2/7] dir.c: fix off-by-one error in match_pathspec_item

2018-04-06 Thread Jeff King
On Thu, Apr 05, 2018 at 01:06:30PM -0700, Elijah Newren wrote: > > There are other similar trailing-slash matches in that function, but I'm > > not sure of all the cases in which they're used. I don't know if any of > > those would need similar treatment (sorry for being vague; I expect I'd > >

Re: How to undo previously set configuration?

2018-04-06 Thread Jeff King
On Fri, Apr 06, 2018 at 05:57:39PM +0100, Rafael Ascensao wrote: > On Fri, Apr 6, 2018 at 4:55 PM, Olaf Hering wrote: > > > > This does not work. Initially I copied the global config into the > > repo and set all unwanted values to , like 'smtpuser='. > > Perhaps the config

Re: How to undo previously set configuration?

2018-04-06 Thread Rafael Ascensao
On Fri, Apr 6, 2018 at 4:55 PM, Olaf Hering wrote: > > This does not work. Initially I copied the global config into the repo and > set all unwanted values to , like 'smtpuser='. Perhaps the config > parser recognized that fact, but the consumer does not? > Today someone asked

Re: [PATCH] git-svn: avoid warning on undef readline()

2018-04-06 Thread Eric Wong
Ævar Arnfjörð Bjarmason wrote: > See https://public-inbox.org/git/86h8oobl36@phe.ftfl.ca/ for the > original report. Thanks for taking a look at this. Also https://bugs.debian.org/894997 > --- a/perl/Git.pm > +++ b/perl/Git.pm > @@ -554,7 +554,7 @@ sub get_record { >

Re: [PATCH v5 0/5] Convert some stash functionality to a builtin

2018-04-06 Thread Johannes Schindelin
Hi Joel, On Wed, 4 Apr 2018, Joel Teichroeb wrote: > I've been working on converting all of git stash to be a > builtin, however it's hard to get it all working at once with > limited time, so I've moved around half of it to a new > stash--helper builtin and called these functions from the

Re: How to undo previously set configuration?

2018-04-06 Thread Jeff King
On Fri, Apr 06, 2018 at 05:55:56PM +0200, Olaf Hering wrote: > > The general strategy in Git's config is that instead of "unsetting", > > you > > should overwrite with whatever value you _do_ want. So a config option > > like sendemail.smtpauth should accept some kind of empty or "none" value > >

Re: [PATCH v5 5/5] stash: convert pop to builtin

2018-04-06 Thread Johannes Schindelin
Hi Joel, On Wed, 4 Apr 2018, Joel Teichroeb wrote: > diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c > index 486796bb6a..7c8950bc90 100644 > --- a/builtin/stash--helper.c > +++ b/builtin/stash--helper.c > @@ -13,6 +13,7 @@ > > static const char * const git_stash_helper_usage[]

Re: How to undo previously set configuration?

2018-04-06 Thread Olaf Hering
Am Thu, 5 Apr 2018 12:32:27 -0400 schrieb Jeff King : > The general strategy in Git's config is that instead of "unsetting", you > should overwrite with whatever value you _do_ want. So a config option > like sendemail.smtpauth should accept some kind of empty or "none" value > to

Re: [PATCH v5 4/5] stash: convert branch to builtin

2018-04-06 Thread Johannes Schindelin
Hi Joel, On Wed, 4 Apr 2018, Joel Teichroeb wrote: > diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c > index 520cd746c4..486796bb6a 100644 > --- a/builtin/stash--helper.c > +++ b/builtin/stash--helper.c > @@ -502,6 +508,49 @@ static int drop_stash(int argc, const char **argv,

Re: [PATCH v5 3/5] stash: convert drop and clear to builtin

2018-04-06 Thread Johannes Schindelin
Hi Joel, On Wed, 4 Apr 2018, Joel Teichroeb wrote: > Add the drop and clear commands to the builtin helper. These two > are each simple, but are being added together as they are quite > related. Makes sense. > We have to unfortunately keep the drop and clear functions in the > shell script as

Re: [PATCH v5 2/5] stash: convert apply to builtin

2018-04-06 Thread Johannes Schindelin
Hi Joel, completely forgot to reiterate this (my reply to Christian was probably buried in the thread): On Wed, 4 Apr 2018, Joel Teichroeb wrote: > +int cmd_stash__helper(int argc, const char **argv, const char *prefix) > +{ > + int result = 0; > + pid_t pid = getpid(); > + const

Re: [PATCH v5 2/5] stash: convert apply to builtin

2018-04-06 Thread Johannes Schindelin
Hi Joel, On Wed, 4 Apr 2018, Joel Teichroeb wrote: > Add a bulitin helper for performing stash commands. Converting > all at once proved hard to review, so starting with just apply > let conversion get started without the other command being s/let/lets the/ s/command/commands/ > finished. > >

Re: [PATCH v5 2/2] builtin/config.c: prefer `--type=bool` over `--bool`, etc.

2018-04-06 Thread Jeff King
On Fri, Apr 06, 2018 at 02:14:34AM -0400, Eric Sunshine wrote: > > diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt > > @@ -9,13 +9,13 @@ git-config - Get and set repository or global options > > SYNOPSIS > > > > [verse] > > -'git config' [] [type]

Re: [PATCH] git-svn: avoid warning on undef readline()

2018-04-06 Thread Johannes Schindelin
Hi Ævar, On Fri, 6 Apr 2018, Ævar Arnfjörð Bjarmason wrote: > Change code in Git.pm that sometimes calls chomp() on undef to only do > so the value is defined. > > This code has been chomping undef values ever since it was added in > b26098fc2f ("git-svn: reduce scope of input record separator

[PATCH] git-svn: avoid warning on undef readline()

2018-04-06 Thread Ævar Arnfjörð Bjarmason
Change code in Git.pm that sometimes calls chomp() on undef to only do so the value is defined. This code has been chomping undef values ever since it was added in b26098fc2f ("git-svn: reduce scope of input record separator change", 2016-10-14), but started warning due to the introduction of

Re: [PATCH v5 1/5] stash: improve option parsing test coverage

2018-04-06 Thread Johannes Schindelin
Hi Joel, On Wed, 4 Apr 2018, Joel Teichroeb wrote: > In preparation for converting the stash command incrementally to > a builtin command, this patch improves test coverage of the option > parsing. Both for having too many parameters, or too few. Very good. > Signed-off-by: Joel Teichroeb

Re: git 2.17.0: uninitialized value $rec in scalar chomp at ...Git.pm line 557

2018-04-06 Thread Joseph Mingrone
Johannes Schindelin writes: > Hi Joseph, > On Fri, 6 Apr 2018, Joseph Mingrone wrote: >> After upgrading to version 2.17.0, this message appears repeatedly when >> running `git svn rebase`: >> Use of uninitialized value $rec in scalar chomp at >>

Re: git 2.17.0: uninitialized value $rec in scalar chomp at ...Git.pm line 557

2018-04-06 Thread Johannes Schindelin
Hi Joseph, On Fri, 6 Apr 2018, Joseph Mingrone wrote: > After upgrading to version 2.17.0, this message appears repeatedly when > running `git svn rebase`: > > Use of uninitialized value $rec in scalar chomp at > /usr/local/lib/perl5/site_perl/Git.pm line 557, <$fh> chunk 1. > > The value of

Re: [PATCH v2 4/4] Document the new color.* settings to colorize push errors/hints

2018-04-06 Thread Johannes Schindelin
Hi Eric, On Fri, 6 Apr 2018, Eric Sunshine wrote: > On Thu, Apr 5, 2018 at 6:48 PM, Johannes Schindelin > wrote: > > Let's make it easier for users to find out how to customize these colors. > > > > Signed-off-by: Johannes Schindelin > >

Re: [PATCH v2 3/4] Add a test to verify that push errors are colorful

2018-04-06 Thread Johannes Schindelin
Hi Eric, On Fri, 6 Apr 2018, Eric Sunshine wrote: > On Thu, Apr 5, 2018 at 6:48 PM, Johannes Schindelin > wrote: > > This actually only tests whether the push errors/hints are colored if > > the respective color.* config settings are `always`, but in the regular > >

git 2.17.0: uninitialized value $rec in scalar chomp at ...Git.pm line 557

2018-04-06 Thread Joseph Mingrone
Hello, After upgrading to version 2.17.0, this message appears repeatedly when running `git svn rebase`: Use of uninitialized value $rec in scalar chomp at /usr/local/lib/perl5/site_perl/Git.pm line 557, <$fh> chunk 1. The value of chunk varies. For example the message above may end with

HELLO!!

2018-04-06 Thread Kabiru Wahid
I have a business proposal for you which involves a huge amount of money that run into millions of US dollars that i want to move or transfer to your country for safe keeping and investment,Please try as much as possible to get back to me on this, i will explain more to you when you finally

Re: [PATCH 0/1] Colorize some errors on stderr

2018-04-06 Thread Johannes Schindelin
Hi Junio, [and welcome back, at least I hope you only read this after a good and relaxing vacation] On Fri, 16 Feb 2018, Junio C Hamano wrote: > Johannes Schindelin writes: > > > Now, what would be possible solutions for this? > > > > - introduce `int fd` in

Re: [PATCH v2 2/4] push: colorize errors

2018-04-06 Thread Johannes Schindelin
Hi Jake, On Thu, 5 Apr 2018, Jacob Keller wrote: > On Thu, Apr 5, 2018 at 3:48 PM, Johannes Schindelin > wrote: > > From: Ryan Dammrose > > > > This is an attempt to resolve an issue I experience with people that are > > new to Git --

Re: [PATCH v2 4/4] Document the new color.* settings to colorize push errors/hints

2018-04-06 Thread Eric Sunshine
On Thu, Apr 5, 2018 at 6:48 PM, Johannes Schindelin wrote: > Let's make it easier for users to find out how to customize these colors. > > Signed-off-by: Johannes Schindelin > --- > diff --git a/Documentation/config.txt

  1   2   >