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

2017-11-20 Thread Jonathan Nieder
The git_connect function is growing long. Split the PROTO_GIT-specific portion to a separate function to make it easier to read. No functional change intended. Signed-off-by: Jonathan Nieder Reviewed-by: Stefan Beller --- As before. connect.c | 103 +++

[PATCH 1/8] 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

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

2017-11-20 Thread Jonathan Nieder
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 got two new notes to address the worries fro

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

2017-11-20 Thread Ævar Arnfjörð Bjarmason
On Sun, Nov 19 2017, Dan Jacques jotted: > [...] Firstly the promise of this is very neat. I'm happy to offer any help I can give. > Enable Git to resolve its own binary location using a variety of > OS-specific and generic methods, including: > > - procfs via "/proc/self/exe" (Linux) > - _NSGe

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

2017-11-20 Thread Jeff King
On Mon, Nov 20, 2017 at 12:47:53PM -0800, Stefan Beller wrote: > > 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" wi

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

2017-11-20 Thread Stefan Beller
On Mon, Nov 20, 2017 at 12:35 PM, Jeff King wrote: > In theory nobody should ever ask the low-level object code > for a null sha1. It's used as a sentinel for "no such > object" in lots of places, so leaking through to this level > is a sign that the higher-level code is not being careful > about

Re: [PATCH 6/6] grep: show non-empty lines before functions with -W

2017-11-20 Thread Stefan Beller
On Sat, Nov 18, 2017 at 10:08 AM, René Scharfe wrote: > Non-empty lines before a function definition are most likely comments > for that function and thus relevant. Include them in function context. > > Such a non-empty line might also belong to the preceding function if > there is no separating

Re: [PATCH V4] config: add --expiry-date

2017-11-20 Thread Jeff King
On Mon, Nov 20, 2017 at 12:28:11PM -0800, Stefan Beller wrote: > > +cc Stefan, who added the die(). It may be that we don't care that much > > these days about recovering from broken .gitmodules files. > > By that you mean commits like 37f52e9344 (submodule-config: > keep shallow recommendation a

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

2017-11-20 Thread Jeff King
In theory nobody should ever ask the low-level object code for a null sha1. It's used as a sentinel for "no such object" in lots of places, so leaking through to this level is a sign that the higher-level code is not being careful about its error-checking. In practice, though, quite a few code pat

[PATCH 4/5] everything_local: use "quick" object existence check

2017-11-20 Thread Jeff King
In b495697b82 (fetch-pack: avoid repeatedly re-scanning pack directory, 2013-01-26), we noticed that everything_local() could waste time trying to find and parse objects which we _expect_ to be missing. The solution was to put has_sha1_file() in front of parse_object() to skip the more-expensive pa

Re: [PATCH V4] config: add --expiry-date

2017-11-20 Thread Stefan Beller
On Mon, Nov 20, 2017 at 9:04 AM, Jeff King wrote: > On Sat, Nov 18, 2017 at 12:37:03PM +0900, Junio C Hamano wrote: > >> > +int git_config_expiry_date(timestamp_t *timestamp, const char *var, const >> > char *value) >> > +{ >> > + if (!value) >> > + return config_error_nonbool(var); >

[PATCH 3/5] p5551: add a script to test fetch pack-dir rescans

2017-11-20 Thread Jeff King
Since fetch often deals with object-ids we don't have (yet), it's an easy mistake for it to use a function like parse_object() that gives the correct result (e.g., NULL) but does so very slowly (because after failing to find the object, we re-scan the pack directory looking for new packs). The reg

[PATCH] sequencer: make sign_off_header a file local symbol

2017-11-20 Thread Ramsay Jones
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). [noticed by sparse]. Thanks! ATB, Ramsay Jones sequencer.c | 2

[PATCH 2/5] t/perf/lib-pack: use fast-import checkpoint to create packs

2017-11-20 Thread Jeff King
We currently use fast-import only to create a large number of objects, and then run O(n) invocations of pack-objects to turn them into packs. We can do this faster by just asking fast-import to checkpoint and create a pack for each (after telling it not to turn loose tiny packs). Signed-off-by: J

[PATCH 0/5] avoiding pointless pack-directory re-scans

2017-11-20 Thread Jeff King
I recently dug into a performance problem running "git fetch" in a repository with 5000 packs. Now obviously that's a silly number of packs to have, but I did find some pretty low-hanging fruit. Most of the time was spent in pointlessly re-scanning the objects/pack directory. This series has two

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

2017-11-20 Thread Jeff King
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: Jeff King --- t/perf/lib-pack.sh | 29 + t/perf/p5550-fetch-tags.sh | 25 ++--

t3512 & t3513 'unexpected passes'

2017-11-20 Thread Ramsay Jones
Hi Junio, For several days, I have been staring at some 'unexpected passes' in the t3512-cherry-pick-submodule.sh and t3513-revert-submodule.sh test files (tests #11-13 in both cases). I finally found time tonight to 'git bisect' the 'problem', and found that bisect fingered commit b5a812b298 ("s

Re:

2017-11-20 Thread Stefan Beller
did you mean majord...@kernel.org instead? On Mon, Nov 20, 2017 at 7:10 AM, Viet Nguyen wrote: > unsubscribe git

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

2017-11-20 Thread Jonathan Nieder
Jeff King wrote: > 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 > individual components should be the ones g

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

2017-11-20 Thread Jeff King
On Mon, Nov 20, 2017 at 12:05:36AM +0100, Beat Bolli wrote: > Add the configuration option "jump.grepCmd" that allows to configure the > command that is used to search in grep mode. This allows the users of > git-jump to use ag(1) or ack(1) as search engines. This patch looks good to me. The user

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

2017-11-20 Thread Jonathan Nieder
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 > sub-projects. > > When Tcl/Tk is not installed, the above will succee

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

2017-11-20 Thread Jeff King
On Mon, Nov 20, 2017 at 12:11:13PM +0900, Junio C Hamano wrote: > Beat Bolli writes: > > > Add the configuration option "jump.grepCmd" that allows to configure the > > command that is used to search in grep mode. This allows the users of > > git-jump to use ag(1) or ack(1) as search engines. > >

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

2017-11-20 Thread 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="$(pwd)/exp

[RFC PATCH v2 2/2] bisect: add "edit" command

2017-11-20 Thread Adam Dinwoodie
Add an "edit" command to git bisect, which will save the current bisection log to a file, open an editor to allow the user to replay the bisection log, then replay the edited log file. This can already be done as separate steps, and doing so is described in the bisect documentation; this commit me

[RFC PATCH v2 0/2] bisect: add a single command for editing logs

2017-11-20 Thread Adam Dinwoodie
When I'm bisecting, I sometimes want to edit the bisection log, e.g. to remove the "skip" marker by a commit I've now found a way to avoid skipping. Rather than requiring users to save off the log, edit it, then replay the edited log as separate commands, this patch series adds support for a "git

[RFC PATCH v2 1/2] bisect: split out replay file parsing

2017-11-20 Thread Adam Dinwoodie
In order to allow a git bisect log file to be replayed without using all the surrounding code to do things like clean the repository state, split out the file-parsing part of bisect_replay into a separate function. Signed-off-by: Adam Dinwoodie --- git-bisect.sh | 9 - 1 file changed, 8

Re: [PATCH 6/7] builtin/describe.c: describe a blob

2017-11-20 Thread Philip Oakley
From: "Philip Oakley" s/with/without/ ... From: "Junio C Hamano" : Friday, November 10, 2017 1:24 AM [catch up] "Philip Oakley" writes: From: "Stefan Beller" Rereading this discussion, there is currently no urgent thing to address? True. Then the state as announced by the last coo

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

2017-11-20 Thread Christian Couder
On Fri, Nov 17, 2017 at 6:42 PM, Todd Zullinger wrote: > Christian Couder wrote: >> >> On Thu, Nov 16, 2017 at 2:35 AM, Junio C Hamano wrote: >>> >>> I suspect that this change will hurt those who package Git for other >>> people. >> >> >> Maybe a little bit, but in my opinion it should not be a

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

2017-11-20 Thread René Scharfe
Am 20.11.2017 um 01:36 schrieb Junio C Hamano: > René Scharfe writes: > >> your suggested full-comment metric, i.e. more than nothing. But more >> importantly it's the actual comment payload. The leading "/*" line is >> included as a consequence of the employed heuristic, but a more >> refined

Re: [PATCH 6/7] builtin/describe.c: describe a blob

2017-11-20 Thread Philip Oakley
From: "Junio C Hamano" : Friday, November 10, 2017 1:24 AM [catch up] "Philip Oakley" writes: From: "Stefan Beller" Rereading this discussion, there is currently no urgent thing to address? True. Then the state as announced by the last cooking email, to just cook it, seems about right

Re: [PATCHv5 7/7] builtin/describe.c: describe a blob

2017-11-20 Thread Philip Oakley
From: "Stefan Beller" Sent: Thursday, November 16, 2017 2:00 AM [in catch up mode..] 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]) When describing commits, we try to anchor them t

Re: [PATCH v3 5/5] Testing: provide tests requiring them with ellipses after SHA-1 values

2017-11-20 Thread Philip Oakley
From: "Junio C Hamano" Ann T Ropea writes: *1* We are being overly generous in t4013-diff-various.sh because we do not want to destroy/take apart the here-document. Given that all this a temporary measure, we should get away with it. So, the need to reformat the test for the future post-de

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

2017-11-20 Thread Christian Couder
On Fri, Nov 17, 2017 at 11:02 PM, Jeff King wrote: > > I'm actually tempted to say that we should not be building the tcl parts > by default. IOW, instead of NO_TCLTK we should have USE_TCLTK. That > would also require an adjustment by package builders, but it would > hopefully be a really obvious

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

2017-11-20 Thread Christian Couder
(Sorry I forgot to mark this as v2.) On Mon, Nov 20, 2017 at 6:15 PM, 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 > sub

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

2017-11-20 Thread Christian Couder
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 sub-projects. When Tcl/Tk is not installed, the above will succeed if gettext is installed, as Tcl/Tk is o

Re: Add feature to stop tracking files while keeping them in the index

2017-11-20 Thread Igor Djordjevic
Hi Viet, On 20/11/2017 10:52, Viet Nguyen wrote: > Currently, a file can be either tracked or untracked. So, I propose we > add a feature to stop tracking files while keeping them in the index. > > Example scenario: > - A developer would like to add some configuration files with example > values,

Re: [PATCH V4] config: add --expiry-date

2017-11-20 Thread Jeff King
On Sat, Nov 18, 2017 at 12:37:03PM +0900, Junio C Hamano wrote: > > +int git_config_expiry_date(timestamp_t *timestamp, const char *var, const > > char *value) > > +{ > > + if (!value) > > + return config_error_nonbool(var); > > + if (parse_expiry_date(value, timestamp)) > > +

Re: [PATCH v4 07/10] introduce fetch-object: fetch one promisor object

2017-11-20 Thread Jeff Hostetler
On 11/17/2017 3:17 PM, Stefan Beller wrote: On Fri, Nov 17, 2017 at 11:49 AM, Jeff Hostetler wrote: On 11/16/2017 2:57 PM, Ramsay Jones wrote: On 16/11/17 18:12, Jeff Hostetler wrote: From: Jonathan Tan Introduce fetch-object, providing the ability to fetch one object from a promiso

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

2017-11-20 Thread Jeff King
On Mon, Nov 20, 2017 at 09:20:35AM -0500, Jeff King wrote: > Out of curiosity, have you tried experimenting with any high-performance > 3rd-party allocator libraries? I've often wondered if we could get a > performance improvement from dropping in a new allocator, but was never > able to measure a

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

2017-11-20 Thread Kaartic Sivaraam
Signed-off-by: Kaartic Sivaraam --- 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/git-rebase.sh +++ b/git-rebase.sh @@ -9,7 +9,7 @@ OPTIONS_STUCKLONG=t OPTIONS_SPEC="\ git rebase [-i] [

Re: [PATCH] docs: checking out using @{-N} can lead to detached state

2017-11-20 Thread Kaartic Sivaraam
On Monday 20 November 2017 07:39 AM, Junio C Hamano wrote: Kaartic Sivaraam writes: After the first paragraph explains what happens during "checkout " and goes from the normal case where is really a branch name to an arbitrary commit (where "detaching" needs to be mentioned), a commit before 7

[no subject]

2017-11-20 Thread Viet Nguyen
unsubscribe git

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

2017-11-20 Thread Albert Astals Cid
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 good enough --- contrib/completion/git-completion.bash | 1 + 1 file c

Re: Bug/Wish: bash completion for git pull --rebase doesn't include --autostash

2017-11-20 Thread Albert Astals Cid
Patch sent, please still CC me as i'm not on the list. Cheers, Albert El dimarts, 31 d’octubre de 2017, a les 18:56:22 CET, Stefan Beller va escriure: > On Tue, Oct 31, 2017 at 8:21 AM, Albert Astals Cid > > wrote: > > git pull --rebase --autostash > > > > is a valid command but the --autos

Re: [PATCH V4] config: add --expiry-date

2017-11-20 Thread hsed
On 2017-11-18 03:37, Junio C Hamano wrote: I think this is more correct even within the context of this function than dying, which suggests the need for a slightly related (which is not within the scope of this change) clean-up within this file as a #leftoverbits task. I think dying in these va

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

2017-11-20 Thread Jeff King
On Mon, Nov 20, 2017 at 09:01:45AM -0500, 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 simila

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

2017-11-20 Thread Ben Peart
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 be pursuing that path. Combining the two pat

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

2017-11-20 Thread Ben Peart
> -Original Message- > From: Junio C Hamano [mailto:gits...@pobox.com] > Sent: Friday, November 17, 2017 1:35 AM > To: Ben Peart ; Alex Vandiver > > Cc: git@vger.kernel.org > Subject: Re: What's cooking in git.git (Nov 2017, #05; Fri, 17) > > Junio C Hamano writes: > > > * av/fsmonitor

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

2017-11-20 Thread Alex Bennée
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 parenthesis fail. For example from the Linux kernel MAINTAINERS

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

2017-11-20 Thread Alex Bennée
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 parenthesis fail. For example from the Linux kernel MAINTAINERS

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

2017-11-20 Thread Alex Bennée
Eric Sunshine writes: > On Thu, Nov 16, 2017 at 10:48 AM, Alex Bennée wrote: >> Getting rid of Mail::Address regressed behaviour with common >> get_maintainer scripts such as the Linux kernel. Fix the missed corner >> case and add a test for it. > > It is not at all clear, based upon this text,

Add feature to stop tracking files while keeping them in the index

2017-11-20 Thread Viet Nguyen
Hello everyone, Currently, a file can be either tracked or untracked. So, I propose we add a feature to stop tracking files while keeping them in the index. Example scenario: - A developer would like to add some configuration files with example values, e.g. DB_PASSWORD=changeme. But in the future

Draft of Git Rev News edition 33

2017-11-20 Thread 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 and sending a pull request, or by commenting on this GitHub is

<    1   2