Re: [PATCH 4/8] connect: split ssh command line options into separate function

2017-11-20 Thread Jonathan Nieder
Hi, Brandon Williams wrote: > On 11/20, Jonathan Nieder wrote: [long stream of quoted context snipped; please cut down the quoted text to what you are replying to in the future] >> @@ -972,16 +1031,13 @@ struct child_process *git_connect(int fd[2], const >> char *url, >> conn->use_s

Re: [PATCH] git-send-email: fix get_maintainer.pl regression

2017-11-20 Thread Eric Sunshine
A few more comments/observations... On Thu, Nov 16, 2017 at 10:48 AM, Alex Bennée wrote: > diff --git a/perl/Git.pm b/perl/Git.pm > @@ -936,6 +936,9 @@ sub parse_mailboxes { > $end_of_addr_seen = 0; > } elsif ($token =~ /^\(/) { > pu

[RFC PATCH v2 0/9] Improve merge recursive performance

2017-11-20 Thread Elijah Newren
You probably want to wait to review this series until my rename detection series lands so that I can clean up any more conflicts, but I'm posting this new series in case anyone wants to take an early look. It includes fixes identified by the reviews of my other patch series, and has been rebased o

[RFC PATCH v2 2/9] merge-recursive: avoid unnecessary string list lookups

2017-11-20 Thread Elijah Newren
Since we're taking entries from active_cache, which is already in sorted order with same-named entries adjacent, we can skip a lookup. Also, we can just use append instead of insert (avoiding the need to find where to put the new item) and still end up with a sorted list. Signed-off-by: Elijah Ne

[RFC PATCH v2 3/9] merge-recursive: new function for better colliding conflict resolutions

2017-11-20 Thread Elijah Newren
There are three conflict types that represent two (possibly entirely unrelated) files colliding at the same location: * add/add * rename/add * rename/rename(2to1) These three conflict types already share more similarity than might be immediately apparent from their description: (1) the handl

[RFC PATCH v2 1/9] diffcore-rename: no point trying to find a match better than exact

2017-11-20 Thread Elijah Newren
diffcore_rename() had some code to avoid having destination paths that already had an exact rename detected from being re-checked for other renames. Source paths, however, were re-checked because we wanted to allow the possibility of detecting copies. But if copy detection isn't turned on, then t

[RFC PATCH v2 5/9] merge-recursive: fix rename/add conflict handling

2017-11-20 Thread Elijah Newren
This makes the rename/add conflict handling make use of the new handle_file_collision() function, which fixes several bugs and improves things for the rename/add case significantly. Previously, rename/add would: * Not leave any higher order stage entries in the index, making it appear as if

[PATCH v4 4/8] connect: split ssh command line options into separate function

2017-11-20 Thread Jonathan Nieder
The git_connect function is growing long. Split the portion that discovers an ssh command and options it accepts before the service name and path to a separate function to make it easier to read. No functional change intended. Signed-off-by: Jonathan Nieder Reviewed-by: Stefan Beller --- Brand

[RFC PATCH v2 9/9] diffcore-rename: filter rename_src list when possible

2017-11-20 Thread Elijah Newren
We have to look at each entry in rename_src a total of rename_dst_nr times. When we're not detecting copies, any exact renames or ignorable rename paths will just be skipped over. While checking that these can be skipped over is a relatively cheap check, it's still a waste of time to do that chec

[RFC PATCH v2 8/9] merge-recursive: accelerate rename detection

2017-11-20 Thread Elijah Newren
If a file is unmodified on one side of history (no content changes, no name change, and no mode change) and is renamed on the other side, then the correct merge result is to take both the file name and the file contents (and file mode) of the renamed file. merge-recursive detects this rename and g

[RFC PATCH v2 6/9] merge-recursive: improve handling for rename/rename(2to1) conflicts

2017-11-20 Thread Elijah Newren
This makes the rename/rename(2to1) conflicts use the new handle_file_collision() function. Since that function was based originally on the rename/rename(2to1) handling code, the main differences here are in what was added. In particular: * If the two colliding files are similar, instead of bei

[RFC PATCH v2 7/9] merge-recursive: improve handling for add/add conflicts

2017-11-20 Thread Elijah Newren
This makes add/add conflicts use the new handle_file_collision() function. This leaves the handling of the index the same, but modifies how the working tree is handled: instead of always doing a two-way merge of the file contents and recording them at the collision path name, we instead first esti

[RFC PATCH v2 4/9] Add testcases for improved file collision conflict handling

2017-11-20 Thread Elijah Newren
Adds testcases dealing with file collisions for the following types of conflicts: * add/add * rename/add * rename/rename(2to1) These tests include expectations for new, smarter behavior provided by handle_file_collision(). Since that function is not in use yet, the tests are currently expect

Re: [PATCH 6/8] ssh: 'auto' variant to select between 'ssh' and 'simple'

2017-11-20 Thread Brandon Williams
On 11/20, Jonathan Nieder wrote: > Android's "repo" tool is a tool for managing a large codebase > consisting of multiple smaller repositories, similar to Git's > submodule feature. Starting with Git 94b8ae5a (ssh: introduce a > 'simple' ssh variant, 2017-10-16), users noticed that it stopped > ha

[PATCH 1/1] diffcore: add a filter to find a specific blob

2017-11-20 Thread Stefan Beller
Sometimes users are given a hash of an object and they want to identify it further (ex.: Use verify-pack to find the largest blobs, but what are these? or [1]) One might be tempted to extend git-describe to also work with blobs, such that `git describe ` gives a description as ':'. This was imple

[PATCH 0/1] Teaching the diff machinery about blobfind [WAS: git describe ]

2017-11-20 Thread Stefan Beller
This seems to be an easier approach; thanks Junio for hinting at it. This certainly solves our immediate needs, we may want to build 'git describe ' on top of it or defer it until later. Thanks, Stefan previous descussion https://public-inbox.org/git/20171028004419.10139-1-sbel...@google.com/ St

Re: [PATCH 4/8] connect: split ssh command line options into separate function

2017-11-20 Thread Brandon Williams
On 11/20, Jonathan Nieder wrote: > Hi, > > Brandon Williams wrote: > > On 11/20, Jonathan Nieder wrote: > [long stream of quoted context snipped; please cut down the quoted > text to what you are replying to in the future] > >> @@ -972,16 +1031,13 @@ struct child_process *git_connect(int fd[2], c

Re: [PATCH 3/8] connect: split git:// setup into a separate function

2017-11-20 Thread Brandon Williams
On 11/20, Jonathan Nieder wrote: > Brandon Williams wrote: > > On 11/20, Jonathan Nieder wrote: > > >> + /* These underlying connection commands die() if they > >> + * cannot connect. > >> + */ > > > > I know this is really just code motion but maybe we can fix the style of > > the comment he

Re: [PATCH v3 0/8] Coping with unrecognized ssh wrapper scripts in GIT_SSH

2017-11-20 Thread Brandon Williams
On 11/20, Jonathan Nieder wrote: > Previously: [1]. > > This version should be essentially identical to v2. Changes: > - patch 1 is new and should fix the test failure on Windows > - patch 2 is new, discussed at [2] > - patch 5 split off from patch 6 as suggested at [3] > - patch 6 commit message

Re: [PATCH] git-send-email: fix get_maintainer.pl regression

2017-11-20 Thread Eric Sunshine
On Mon, Nov 20, 2017 at 5:44 AM, Alex Bennée wrote: > Eric Sunshine writes: >> It is not at all clear, based upon this text, what this is fixing. >> When you re-roll, please provide a description of the regression in >> sufficient detail for readers to easily understand the problem and the >> sol

Re: Re(2): [PATCH 1/1] exec_cmd: RUNTIME_PREFIX on some POSIX systems

2017-11-20 Thread Ævar Arnfjörð Bjarmason
On Mon, Nov 20 2017, Dan Jacques jotted: > On Mon, 20 Nov 2017 22:00:10, Ævar Arnfjörð Bjarmason replied: > >> [...] > > Thanks for responding. I'll readily confess that PERL and the PERL > ecosystem are not areas I'm very familiar with, so I'm really grateful > for your feedback here. > >> You n

Re: [PATCH] git-send-email: fix --cc-cmd get_maintainer.pl regression

2017-11-20 Thread Eric Sunshine
On Mon, Nov 20, 2017 at 6:41 AM, Alex Bennée wrote: > Since the removal of Mail::Address from git-send-email certain address > patterns returned by common get_maintainer.pl scripts now fail to get > correctly parsed by the built-in Git::parse_mailboxes. Specifically > the patterns with embedded pa

Re: [PATCH] bash completion: Add --autostash and --no-autostash to pull

2017-11-20 Thread Eric Sunshine
On Mon, Nov 20, 2017 at 10:07 AM, Albert Astals Cid wrote: > Ideally we should only autocomplete if pull has --rebase since > they only work with it but could not figure out how to do that > and the error message of doing git pull --autostash points out > that you need --rebase so i guess it's goo

[PATCH] list-objects-filter-options: fix up some sparse warnings

2017-11-20 Thread Ramsay Jones
In particular, sparse complains that the armor_{en,de}code_arg() functions are 'not declared - should they be static?'. Since the armor_decode_arg() symbol does not require more than file visibility, we can simply mark the declaration with static. The armor_encode_arg() function has no callers, so

Re: [PATCH v1 1/4] fastindex: speed up index load through parallelization

2017-11-20 Thread Ramsay Jones
On 20/11/17 14:01, Ben Peart wrote: > Further testing has revealed that switching from the regular heap to a > refactored version of the mem_pool in fast-import.c produces similar gains as > parallelizing do_index_load().  This appears to be a much simpler patch for > similar gains so we will

Re: [PATCH 1/5] p5550: factor our nonsense-pack creation

2017-11-20 Thread Eric Sunshine
On Mon, Nov 20, 2017 at 3:26 PM, Jeff King wrote: > p5550: factor our nonsense-pack creation s/our/out/, I guess. > We have a function to create a bunch of irrelevant packs to > measure the expense of reprepare_packed_git(). Let's make > that available to other perf scripts. > > Signed-off-by: J

Re: [PATCH] Makefile: check that tcl/tk is installed

2017-11-20 Thread Christian Couder
Hi, On Mon, Nov 20, 2017 at 8:19 PM, Jonathan Nieder wrote: > Hi, > > Christian Couder wrote: > >> By default running `make install` in the root directory of the >> project will set TCLTK_PATH to `wish` and then go into the "git-gui" >> and "gitk-git" sub-directories to build and install these 2

Bad interaction between git clean, gitignore, and deleted submodules

2017-11-20 Thread Craig Silverstein
We have the following situation: 1) A .gitignore file that contains '*.pyc' 2) A repo with a submodule named jinja2 In normal use, clients of our repo have it checked out and run things in it, creating files like jinja2/run.pyc. I deleted the jinja2 submodule (by running `git rm jinja2` and pushi

Re: [PATCH] git-send-email: fix get_maintainer.pl regression

2017-11-20 Thread Philip Oakley
From: "Eric Sunshine" On Sat, Nov 18, 2017 at 9:54 PM, Eric Sunshine wrote: On Thu, Nov 16, 2017 at 10:48 AM, Alex Bennée wrote: +test_expect_success $PREREQ 'cc trailer with get_maintainer output' ' + [...] + git send-email -1 --to=recipi...@example.com \ + --cc-cmd

Re: What's cooking in git.git (Nov 2017, #05; Fri, 17)

2017-11-20 Thread Junio C Hamano
Ben Peart writes: > As far as I can tell, the patches are good. I'm not aware of > anything else that should hold it up. Great; thanks.

Re: [PATCH] git-send-email: fix get_maintainer.pl regression

2017-11-20 Thread Eric Sunshine
On Mon, Nov 20, 2017 at 7:07 PM, Philip Oakley wrote: > From: "Eric Sunshine" > On Sat, Nov 18, 2017 at 9:54 PM, Eric Sunshine > wrote: >> > --- 8< --- >> > diff --git a/git-send-email.perl b/git-send-email.perl >> > @@ -1724,7 +1724,7 @@ sub recipients_cmd { >> > -open my $fh, "-|", "$cmd \

Re: [PATCH] git-send-email: fix get_maintainer.pl regression

2017-11-20 Thread Junio C Hamano
Eric Sunshine writes: > The more I think about this, the less I consider this a bug in > git-send-email. As noted, people might legitimately use a complex > command (--cc-cmd="myscript--option arg"), so changing git-send-email > to treat cc-cmd as an atomic string seems like a bad idea. I concur

Re: [PATCH] git-rebase: clean up dashed-usages in messages

2017-11-20 Thread Junio C Hamano
Kaartic Sivaraam writes: > Signed-off-by: Kaartic Sivaraam > --- Thanks. Two fewer git-foo exposed to the end user. Good ;-) > git-rebase.sh | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/git-rebase.sh b/git-rebase.sh > index 6344e8d5e..2f5d138a0 100755 > --- a

Re: [PATCH 1/6] t4051: add test for comments preceding function lines

2017-11-20 Thread Junio C Hamano
René Scharfe writes: >> I am slightly in favor of than against the above reasoning, but it >> probably deserves to be recorded somewhere more readily accessible >> than the mailing list archive... >> >> perhaps? > > That's fine with me. As there seems to be no other reason for updating the seri

Re: Draft of Git Rev News edition 33

2017-11-20 Thread Yubin Ruan
2017-11-20 16:33 GMT+08:00 Christian Couder : > Hi, > > A draft of a new Git Rev News edition is available here: > > > https://github.com/git/git.github.io/blob/master/rev_news/drafts/edition-33.md > > Everyone is welcome to contribute in any section either by editing the > above page on GitHub

Re: [PATCH v1 1/4] fastindex: speed up index load through parallelization

2017-11-20 Thread Ben Peart
On 11/20/2017 6:51 PM, Ramsay Jones wrote: On 20/11/17 14:01, Ben Peart wrote: Further testing has revealed that switching from the regular heap to a refactored version of the mem_pool in fast-import.c produces similar gains as parallelizing do_index_load().  This appears to be a much simp

Re: [PATCH] sequencer: make sign_off_header a file local symbol

2017-11-20 Thread Junio C Hamano
Ramsay Jones writes: > Signed-off-by: Ramsay Jones > --- > > Hi Miklos, > > If you need to re-roll your 'mv/cherry-pick-s' branch, could you > please squash this into the relevant patch (commit 5ed75e2a3f, > "cherry-pick: don't forget -s on failure", 14-09-2017). What automated procedure are yo

Re: Draft of Git Rev News edition 33

2017-11-20 Thread Jonathan Nieder
Hi, Yubin Ruan wrote: > 2017-11-20 16:33 GMT+08:00 Christian Couder : >> A draft of a new Git Rev News edition is available here: >> >> >> https://github.com/git/git.github.io/blob/master/rev_news/drafts/edition-33.md >> >> Everyone is welcome to contribute in any section either by editing the

Re: [PATCH] list-objects-filter-options: fix up some sparse warnings

2017-11-20 Thread Jonathan Nieder
Hi, Ramsay Jones wrote: > If you need to re-roll your 'jh/object-filtering' branch, could you > please squash this (or something like it) into the relevant patch > (commit bf0aedcbe1, "list-objects: filter objects in traverse_commit_list", > 16-11-2017). Micronit: can these messages use the ISO

Re: [PATCH 1/8] ssh test: make copy_ssh_wrapper_as clean up after itself

2017-11-20 Thread Junio C Hamano
Jonathan Nieder writes: > +test_expect_success 'set up ssh wrapper' ' > + cp "$GIT_BUILD_DIR/t/helper/test-fake-ssh$X" \ > + "$TRASH_DIRECTORY/ssh$X" && > + GIT_SSH="$TRASH_DIRECTORY/ssh$X" && > + export GIT_SSH && > + export TRASH_DIRECTORY && > + >"$TRASH_DIRECTO

Re: [PATCH 5/8] connect: split ssh option computation to its own function

2017-11-20 Thread Junio C Hamano
Jonathan Nieder writes: > This puts the determination of options to pass to each ssh variant > (see ssh.variant in git-config(1)) in one place. > > A follow-up patch will use this in an initial dry run to detect which > variant to use when the ssh command is ambiguous. > > No functional change in

Re: [PATCH 6/8] ssh: 'auto' variant to select between 'ssh' and 'simple'

2017-11-20 Thread Junio C Hamano
Jonathan Nieder writes: > Android's "repo" tool is a tool for managing a large codebase > consisting of multiple smaller repositories, similar to Git's > submodule feature. Starting with Git 94b8ae5a (ssh: introduce a > 'simple' ssh variant, 2017-10-16), users noticed that it stopped > handling

[PATCH 1/8 v2] ssh test: make copy_ssh_wrapper_as clean up after itself

2017-11-20 Thread Jonathan Nieder
Simplify by not allowing the copied ssh wrapper to persist between tests. This way, tests can be safely reordered, added, and removed with less fear of hidden side effects. This also avoids having to call setup_ssh_wrapper to restore the value of GIT_SSH after this battery of tests, since it mean

Re: [PATCH] contrib/git-jump: allow to configure the grep command

2017-11-20 Thread Junio C Hamano
Jeff King writes: > How about this? > > -- >8 -- > Subject: [PATCH] git-jump: give contact instructions in the README > > Let's make it clear how patches should flow into > contrib/git-jump. The normal Git maintainer does not > necessarily care about things in contrib/, and authors of > individua

Re: [PATCH 6/8] ssh: 'auto' variant to select between 'ssh' and 'simple'

2017-11-20 Thread Jonathan Nieder
Junio C Hamano wrote: > Jonathan Nieder writes: >> Android's "repo" tool is a tool for managing a large codebase >> consisting of multiple smaller repositories, similar to Git's >> submodule feature. Starting with Git 94b8ae5a (ssh: introduce a >> 'simple' ssh variant, 2017-10-16), users noticed

Re: [PATCH 5/5] sha1_file: don't re-scan pack directory for null sha1

2017-11-20 Thread Junio C Hamano
Jeff King writes: > In an ideal world, we'd simply fix all of the callers to > notice the null sha1 and avoid passing it to us. But a > simple experiment to catch this with a BUG() shows that > there are a large number of code paths. Well, we can view this (or the alternative you sent later that

Re [PATCH 1/1] exec_cmd: RUNTIME_PREFIX on some POSIX systems

2017-11-20 Thread Dan Jacques
Ævar Arnfjörð Bjarmason @ 2017-11-20 21:50 UTC suggested: > So LeonT over at #p5p helped me with this. He believes this'll work > (unless MakeMaker INSTALL_BASE is set, but that should break the Git > install anyway): I think that the problem with this approach is that it uses the local "Config"

Re: [PATCH] sequencer: make sign_off_header a file local symbol

2017-11-20 Thread Junio C Hamano
Junio C Hamano writes: > Ramsay Jones writes: > >> Signed-off-by: Ramsay Jones >> --- >> >> Hi Miklos, >> >> If you need to re-roll your 'mv/cherry-pick-s' branch, could you >> please squash this into the relevant patch (commit 5ed75e2a3f, >> "cherry-pick: don't forget -s on failure", 14-09-201

core.safecrlf warning is confusing[improvement suggestion?]

2017-11-20 Thread Vladimir Nikishkin
Hello, everyone. I have the following question. So I have a fresh git repository after git init, on Windows. core.autocrlf is true explicitly, and core.safecrlf is true implicitly. I want to have LF line endings in the repository and CRLF endings in the working copy. (Because I use windows-excl

Re: [PATCH 5/5] sha1_file: don't re-scan pack directory for null sha1

2017-11-20 Thread Junio C Hamano
Jeff King writes: > This is the minimal fix that addresses the performance issues. > I'd actually have no problem at all declaring that looking up a null > sha1 is insane, and having the object-lookup routines simply return "no > such object" without even doing the loose/pack lookup first. > > di

What's cooking in git.git (Nov 2017, #06; Tue, 21)

2017-11-20 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. Quite a few "fixes" have been accu

Re: core.safecrlf warning is confusing[improvement suggestion?]

2017-11-20 Thread Junio C Hamano
Vladimir Nikishkin writes: > So I put the source in the working directory and tell git to make > > git diff --stat > > and I see the (ambiguous) warnings: > > 'warning: LF will be replaced by CRLF in filename.m. > The file will have its original line endings in you working directory.' > > How I r

Re: core.safecrlf warning is confusing[improvement suggestion?]

2017-11-20 Thread Junio C Hamano
Vladimir Nikishkin writes: > I want to have LF line endings in the repository and CRLF endings in > the working copy. (Because I use windows-exclusive tools to develop.) > > But for start I have my code with LF endings, because I got it from a > fellow developer, who develops on UNIX, with LF lin

<    1   2