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

2018-04-06 Thread Eric Sunshine
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 > upcoming patch to support querying a color value with a default via > `--type=color --default=...`, without squandering `--

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

2018-04-06 Thread Eric Sunshine
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 subjective comments below... neither worth a re-roll. > Signed-off-by: Taylor Blau > --- > diff

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

2018-04-06 Thread Eric Sunshine
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 >expect && >> + git config --add core.foo bar && >> + git config --default baz core.foo >actual && >> +

This Noble project of mine.

2018-04-06 Thread Mr. Sonami
Kindly Assist Me In good faith from Mr.Sonami, actually could you please consider to help me to relocate this sum of five million, three hundred thousand dollars (US$5.3 m) to your country for establishing a medium industry in your country? The said 5.3 million dollars was deposited in our ba

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

2018-04-06 Thread Johannes Schindelin
Hi Elijah, On Thu, 5 Apr 2018, Elijah Newren wrote: > On Thu, Apr 5, 2018 at 12:57 PM, Johannes Schindelin > wrote: > > > I wonder whether a better approach would be to add an optional argument to > > that `debug` function (which is intended to have `git` as first argument, > > anyway, or at le

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

2018-04-06 Thread Eric Sunshine
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 > case they default to `auto` (in which case we color the messages when > stderr is connected

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 b/Documentation/config.txt > @@ -1088,6 +1088,16 @@ clean.requireForce:: > +c

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 -- especially colleagues in a team setting -- where they miss >

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 `want_color()` (and callees) so tha

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 res

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 '...<

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 > > case they default to `auto`

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 > > --- > > diff --git a/Documentation/config.txt b/Documenta

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 c

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 >> /usr/local/lib/perl5/site_perl/Git.pm line 557

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 > --

[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 "use

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 c

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] [--show-origi

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/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 cha

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 f

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, const

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 disable auth. >

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 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 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 shell

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 { > my ($fh, $rs) = @

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 on #git for a way

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 parser recognized that

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 > > ne

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: [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 >> +++ b/perl/Git.pm >> @@ -554,7 +

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, done.

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 https://sa...@github.com/fs

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 thi

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 foll

[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 --- builti

[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, let'

[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 o

[PATCH v2 3/4] treewide: replace maybe_tree with accessor methods

2018-04-06 Thread Derrick Stolee
In anticipation of making trees load lazily, create a Coccinelle script (contrib/coccinelle/commit.cocci) to ensure that all references to the 'maybe_tree' member of struct commit are either mutations or accesses through get_commit_tree() or get_commit_tree_oid(). Apply the Coccinelle script to cr

[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 has

[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 ahead/b

[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 the

[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 until

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 cursory

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 linea

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 repli

[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, howev

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 > configure.

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: [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 >> commit-gra

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 https://sa.

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, th

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 GIT_WORK_T

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 h

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 t

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 w

[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 +++ b/Documentation/git-bisect.

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 controll

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: [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 patch will make use

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 $rec = <$fh>; > >> - chomp $rec if

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 ($fh, $rs) = @_; >> >> local $/ = $rs;

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 t

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 { This

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 want to tack on new >> features, the enum would g

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 > bee

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 r

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 time"

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 d

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 is

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 buffered stdio, other

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 com

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 also

[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 equivale

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 > have implications such

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 seems like it's a >> full rewrite and your patch to submit (w

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

[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 --- Makefile

[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 b

[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 +++ b/replace-object.c @@ -12,12 +12,10 @@ s

[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 @@ static struct ref

[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 cat

[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 ca

[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 Signed-off-by: Jon

[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 --- a/replace-object.c +++ b/replace-obje

[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 const unsigned char *do

[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 catch

[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 Niede

[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 ca

[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 *refs, const char *p

[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 int register_replace_re

[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 catc

[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 b/object-store.h index da639b3184..be90c02db6 100644 ---

[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 cal

[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 assumption

[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 @@ -91,12 +91,13 @@ stati

[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 ca

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 > > upcoming patch to support querying a color value w

  1   2   >