[PATCH 6/5] run-command: avoid potential dangers in forked child

2017-04-11 Thread Eric Wong
Hi Brandon, this series tickles an old itch of mine, so I started working off of it. I'm only somewhat concerned with the path resolution in execvp(e) pontentially calling malloc on some libcs; but I suppose that's a separate patch for another time. Only lightly-tested at the moment, but things s

[PATCH v1] travis-ci: add static analysis build job to run coccicheck

2017-04-11 Thread Lars Schneider
Add a dedicated build job for static analysis. As a starter we only run coccicheck but in the future we could run Clang Static Analyzer or similar tools, too. Signed-off-by: Lars Schneider --- Notes: Base Ref: master Web-Diff: https://github.com/larsxschneider/git/commit/f191458df1 C

Re: [PATCH v3 0/5] propagating push-options, remote and refspec

2017-04-11 Thread Junio C Hamano
Brandon Williams writes: > v3 builds upon v2 by adding 3 additional patches to add functionality to also > propagate the remote and refspec down to children process's working to push > submodules. The remote and refspec will only be propagated if the provided > remote is configured. A remote pro

Re: [PATCH] http: honnor empty http.proxy option to bypass proxy

2017-04-11 Thread Sergey Ryazanov
On Mon, Apr 10, 2017 at 7:33 PM, Jeff King wrote: > On Mon, Apr 10, 2017 at 06:15:56PM +0300, Sergey Ryazanov wrote: >> Curl distinguish between empty proxy address and NULL proxy address. In >> the first case it completly disable proxy usage, but if proxy address >> option is NULL then curl attem

Re: [PATCH v7 00/28] Remove submodule from files-backend.c

2017-04-11 Thread Junio C Hamano
Michael Haggerty writes: > On 03/26/2017 04:42 AM, Nguyễn Thái Ngọc Duy wrote: >> v7 is mostly about style changes except the one bug in >> test-ref-store.c, missing setup_git_directory(). >> >> There's one new patch, 03/28, which maps to the "if (!refs)" deletion >> in the interdiff. >> >> The

[PATCH v1 0/3] travis-ci: build docs with asciidoctor

2017-04-11 Thread Lars Schneider
Hi, this is a mini series to build the documentation with asciidoctor in addition to asciidoc on Travis-CI. Cheers, Lars Base Ref: master Web-Diff: https://github.com/larsxschneider/git/commit/88070fccc8 Checkout: git fetch https://github.com/larsxschneider/git travisci/asciidoctor-v1 && git ch

[PATCH v1 1/3] travis-ci: build documentation with AsciiDoc and Asciidoctor

2017-04-11 Thread Lars Schneider
ec3366e introduced a knob to enable the use of Asciidoctor in addition to AsciiDoc. Build the documentation on TravisCI with this knob to reduce the likeliness of breaking Asciidoctor support in the future. Signed-off-by: Lars Schneider --- .travis.yml | 2 +- ci/test-documentation

[PATCH v1 2/3] travis-ci: parallelize documentation build

2017-04-11 Thread Lars Schneider
The documentation job without parallelization takes ~10min on TravisCI. With parallelization ("--jobs=2") it takes ~6min. Signed-off-by: Lars Schneider --- ci/test-documentation.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/test-documentation.sh b/ci/test-document

[PATCH v1 3/3] travis-ci: unset compiler for jobs that do not need one

2017-04-11 Thread Lars Schneider
TravisCI does not need to setup any compiler for the documentation build. Clear the value to fix this. The Linux32 build job does not define the compiler but it inherits the value from the base job. Since it does not need the compiler either because the build runs inside a Docker container we shou

What's cooking in git.git (Apr 2017, #01; Tue, 11)

2017-04-11 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. The maintainer has been offline fo

Re: Tools that do an automatic fetch defeat "git push --force-with-lease"

2017-04-11 Thread Junio C Hamano
On Tue, Apr 11, 2017 at 8:33 AM, Jacob Keller wrote: > > If you're already copying sha1s around you could use those as the > --force-with-lease=branch:, no? > > That's better guarantee than just using --force-with-lease alone. Absolutely. That was the _only_ way the feature was originally designe

`git status` output is very misleading after a merge on a "detached HEAD"

2017-04-11 Thread Enis Bayramoğlu
I've encountered a very misleading output from `git status`. Here's a sequence of events that demonstrates the issue: $ git --version git version 2.12.0 $ git checkout origin/master $ git status HEAD detached from origin/master nothing to commit, working directory clean $ git merge --ff f3515b7

[PATCH v2] http: honnor empty http.proxy option to bypass proxy

2017-04-11 Thread Sergey Ryazanov
Curl distinguish between empty proxy address and NULL proxy address. In the first case it completly disable proxy usage, but if proxy address option is NULL then curl attempt to determine proxy address from http_proxy environment variable. According to documentation, if http.proxy configured to em

Re: [PATCH] connect.c: handle errors from split_cmdline

2017-04-11 Thread Ævar Arnfjörð Bjarmason
On Tue, Apr 11, 2017 at 2:35 AM, Jeff King wrote: > On Mon, Apr 10, 2017 at 08:30:23PM -0400, Jeff King wrote: > >> On Tue, Apr 11, 2017 at 01:23:32AM +0200, Ævar Arnfjörð Bjarmason wrote: >> >> > There's one segfault in there: >> > >> > $ ./t5601-clone.sh --root="xtmp.$(perl -e 'print chr 39')" -

Message From Administrator

2017-04-11 Thread Rochelle McIntyre
Dear Email Users Your password Will Expire In The Next TWO {2} Days Current Mail Users Should Please Log On To IT-WEBSITE To Validate Your E-mail Address And Password, Or Your E-mail Address Will Be Deactivated. Thank You. ITS help desk ADMIN TEAM

Re: [PATCH 01/12] grep: add ability to disable threading with --threads=0 or grep.threads=0

2017-04-11 Thread Jeff King
On Sat, Apr 08, 2017 at 01:24:55PM +, Ævar Arnfjörð Bjarmason wrote: > Add the ability to entirely disable threading by having grep.threads=0 > in the config or --threads=0 on the command-line. In pack-objects and index-pack, --threads=0 means "auto-detect". It seems like we should try to kee

Re: [PATCH v2] http: honnor empty http.proxy option to bypass proxy

2017-04-11 Thread Ævar Arnfjörð Bjarmason
Since nobody pointed this out already, some grammar/spelling fixes. Also CC-ing Knut who wrote the commit you're referencing. - http: honnor empty http.proxy option to bypass proxy + http: honor empty http.proxy option to bypass proxy On Tue, Apr 11, 2017 at 11:20 AM, Sergey Ryazanov wrote: > Cu

Re: [PATCH 02/12] grep: remove redundant regflags assignment under PCRE

2017-04-11 Thread Jeff King
On Sat, Apr 08, 2017 at 01:24:56PM +, Ævar Arnfjörð Bjarmason wrote: > Remove a redundant assignment to the "regflags" variable. This > variable is only used for POSIX regular expression matching, not when > the PCRE library is used. > > This redundant assignment was added as a result of copy

Re: What's cooking in git.git (Apr 2017, #01; Tue, 11)

2017-04-11 Thread Christian Couder
> * cc/split-index-config (2017-03-30) 1 commit > - read-cache: avoid using git_path() in freshen_shared_index() > > The split-index code configuration code used an unsafe git_path() > function without copying its result out. > > Needs to be explained better. > The code looked OK, though. In:

Re: [PATCH 03/12] Makefile & configure: reword outdated comment about PCRE

2017-04-11 Thread Jeff King
On Sat, Apr 08, 2017 at 01:24:57PM +, Ævar Arnfjörð Bjarmason wrote: > Reword an outdated comment which suggests that only git-grep can use > PCRE. Makes sense. > -# Define USE_LIBPCRE if you have and want to use libpcre. git-grep will be > -# able to use Perl-compatible regular expressions.

Re: [PATCH v2] http: honnor empty http.proxy option to bypass proxy

2017-04-11 Thread Sergey Ryazanov
On Tue, Apr 11, 2017 at 1:09 PM, Ævar Arnfjörð Bjarmason wrote: > Since nobody pointed this out already, some grammar/spelling fixes. > Also CC-ing Knut who wrote the commit you're referencing. > Thanks a lot! Will fix in v3. -- Sergey

Re: [PATCH 05/12] log: add exhaustive tests for pattern style options & config

2017-04-11 Thread Jeff King
On Sat, Apr 08, 2017 at 01:24:59PM +, Ævar Arnfjörð Bjarmason wrote: > Add exhaustive tests for how the different grep.patternType options & > the corresponding command-line options affect git-log. > > Before this change it was possible to patch revision.c so that the > --basic-regexp option

Re: [PATCH 06/12] log: add -P as a synonym for --perl-regexp

2017-04-11 Thread Jeff King
On Sat, Apr 08, 2017 at 01:25:00PM +, Ævar Arnfjörð Bjarmason wrote: > Add a short -P option as a synonym for the longer --perl-regexp, for > consistency with the options the corresponding grep invocations > accept. > > This was intentionally omitted in commit 727b6fc3ed ("log --grep: > accep

Re: [PATCH 08/12] grep: make grep.patternType=[pcre|pcre1] a synonym for "perl"

2017-04-11 Thread Jeff King
On Sat, Apr 08, 2017 at 01:25:02PM +, Ævar Arnfjörð Bjarmason wrote: > Make the pattern types "pcre" & "pcre1" synonyms for long-standing > "perl" grep.patternType. > > This change is part of a longer patch series to add pcre2 support to > Git. It's nice to be able to performance test PCRE v1

Re: [PATCH 09/12] test-lib: rename the LIBPCRE prerequisite to PCRE

2017-04-11 Thread Jeff King
On Sat, Apr 08, 2017 at 01:25:03PM +, Ævar Arnfjörð Bjarmason wrote: > Rename the LIBPCRE prerequisite to PCRE. This is for preparation for > libpcre2 support, where having just "LIBPCRE" would be confusing as it > implies v1 of the library. > > None of these tests are incompatible between ve

Re: [PATCH 05/12] log: add exhaustive tests for pattern style options & config

2017-04-11 Thread Ævar Arnfjörð Bjarmason
On Tue, Apr 11, 2017 at 12:23 PM, Jeff King wrote: > On Sat, Apr 08, 2017 at 01:24:59PM +, Ævar Arnfjörð Bjarmason wrote: > >> Add exhaustive tests for how the different grep.patternType options & >> the corresponding command-line options affect git-log. >> >> Before this change it was possibl

Re: [PATCH 10/12] grep: change the internal PCRE macro names to be PCRE1

2017-04-11 Thread Jeff King
On Sat, Apr 08, 2017 at 01:25:04PM +, Ævar Arnfjörð Bjarmason wrote: > Change the internal USE_LIBPCRE define, & build options flag to use a > naming convention ending in PCRE1, without changing the long-standing > USE_LIBPCRE Makefile flag which enables this code. > > This is for preparation

Re: [PATCH 11/12] grep: change the internal PCRE code & header names to be PCRE1

2017-04-11 Thread Jeff King
On Sat, Apr 08, 2017 at 01:25:05PM +, Ævar Arnfjörð Bjarmason wrote: > diff --git a/builtin/grep.c b/builtin/grep.c > index 9478ab5dff..dffb9743b8 100644 > --- a/builtin/grep.c > +++ b/builtin/grep.c > @@ -490,7 +490,7 @@ static void compile_submodule_options(const struct > grep_opt *opt, >

Re: [PATCH 11/12] grep: change the internal PCRE code & header names to be PCRE1

2017-04-11 Thread Ævar Arnfjörð Bjarmason
On Tue, Apr 11, 2017 at 12:37 PM, Jeff King wrote: > On Sat, Apr 08, 2017 at 01:25:05PM +, Ævar Arnfjörð Bjarmason wrote: > >> diff --git a/builtin/grep.c b/builtin/grep.c >> index 9478ab5dff..dffb9743b8 100644 >> --- a/builtin/grep.c >> +++ b/builtin/grep.c >> @@ -490,7 +490,7 @@ static void

Re: [PATCH 12/12] grep: add support for PCRE v2

2017-04-11 Thread Jeff King
On Sat, Apr 08, 2017 at 01:25:06PM +, Ævar Arnfjörð Bjarmason wrote: > --- a/Makefile > +++ b/Makefile > @@ -32,6 +32,14 @@ all:: > # Define LIBPCREDIR=/foo/bar if your libpcre header and library files are in > # /foo/bar/include and /foo/bar/lib directories. > # > +# Define USE_LIBPCRE if

Re: [PATCH 00/12] PCREv2 & more

2017-04-11 Thread Jeff King
On Sat, Apr 08, 2017 at 01:24:54PM +, Ævar Arnfjörð Bjarmason wrote: > This adds PCRE v2 support, but as I was adding that I kept noticing > other related problems to fix. It's all bundled up into the same > series because much of it conflicts because it modifies the same test > or other code.

Re: [PATCH 11/12] grep: change the internal PCRE code & header names to be PCRE1

2017-04-11 Thread Jeff King
On Tue, Apr 11, 2017 at 12:45:55PM +0200, Ævar Arnfjörð Bjarmason wrote: > On Tue, Apr 11, 2017 at 12:37 PM, Jeff King wrote: > > On Sat, Apr 08, 2017 at 01:25:05PM +, Ævar Arnfjörð Bjarmason wrote: > > > >> diff --git a/builtin/grep.c b/builtin/grep.c > >> index 9478ab5dff..dffb9743b8 100644

Re: [PATCH 05/12] log: add exhaustive tests for pattern style options & config

2017-04-11 Thread Jeff King
On Tue, Apr 11, 2017 at 12:32:57PM +0200, Ævar Arnfjörð Bjarmason wrote: > > This can be tricky since POSIX allows implementations to add arbitrary > > extensions for otherwise invalid syntax. > > For POSIX basic v.s. extended I'm relying on (|) not being > metacharacters in basic but metachars n

Re: [PATCH 10/12] grep: change the internal PCRE macro names to be PCRE1

2017-04-11 Thread Ævar Arnfjörð Bjarmason
On Tue, Apr 11, 2017 at 12:35 PM, Jeff King wrote: > On Sat, Apr 08, 2017 at 01:25:04PM +, Ævar Arnfjörð Bjarmason wrote: > >> Change the internal USE_LIBPCRE define, & build options flag to use a >> naming convention ending in PCRE1, without changing the long-standing >> USE_LIBPCRE Makefile

Re: [PATCH 10/12] grep: change the internal PCRE macro names to be PCRE1

2017-04-11 Thread Jeff King
On Tue, Apr 11, 2017 at 12:51:09PM +0200, Ævar Arnfjörð Bjarmason wrote: > > Yeah, I think it's nice to keep the build-time knobs compatible. In the > > long run I assume we'll want to add a USE_LIBPCRE1 flag and USE_LIBPCRE > > just becomes a synonym for it (in fact, we could do that in this > >

Re: [PATCH] connect.c: handle errors from split_cmdline

2017-04-11 Thread Jeff King
On Tue, Apr 11, 2017 at 11:27:57AM +0200, Ævar Arnfjörð Bjarmason wrote: > Junio: If you're not in some rush to pick this up I'll take this, fix > up a bunch of other bugs & tests failures on odd --root directories > and submit this and Jeff's \r patch (after adding tests etc) along > with it. Th

Re: [PATCH 11/12] grep: change the internal PCRE code & header names to be PCRE1

2017-04-11 Thread Ævar Arnfjörð Bjarmason
On Tue, Apr 11, 2017 at 12:48 PM, Jeff King wrote: > On Tue, Apr 11, 2017 at 12:45:55PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> On Tue, Apr 11, 2017 at 12:37 PM, Jeff King wrote: >> > On Sat, Apr 08, 2017 at 01:25:05PM +, Ævar Arnfjörð Bjarmason wrote: >> > >> >> diff --git a/builtin/grep.

Re: [PATCH] connect.c: handle errors from split_cmdline

2017-04-11 Thread Ævar Arnfjörð Bjarmason
On Tue, Apr 11, 2017 at 12:54 PM, Jeff King wrote: > On Tue, Apr 11, 2017 at 11:27:57AM +0200, Ævar Arnfjörð Bjarmason wrote: > >> Junio: If you're not in some rush to pick this up I'll take this, fix >> up a bunch of other bugs & tests failures on odd --root directories >> and submit this and Jef

Re: [PATCH v5] http.postbuffer: allow full range of ssize_t values

2017-04-11 Thread Lars Schneider
> On 04 Apr 2017, at 17:20, Ramsay Jones wrote: > > > > On 04/04/17 00:53, David Turner wrote: >> Unfortunately, in order to push some large repos, the http postbuffer >> must sometimes exceed two gigabytes. On a 64-bit system, this is OK: >> we just malloc a larger buffer. >> >> This means

Re: Tools that do an automatic fetch defeat "git push --force-with-lease"

2017-04-11 Thread Stefan Haller
Jeff King wrote: > On Sun, Apr 09, 2017 at 10:38:42AM +0200, Stefan Haller wrote: > > > I think it's wrong to think about these leases as something that you > > take before you start a rewindy operation. That's the wrong time to take > > the lease; by that time, the remote tracking branch may al

Re: Tools that do an automatic fetch defeat "git push --force-with-lease"

2017-04-11 Thread Stefan Haller
Jacob Keller wrote: > On Sun, Apr 9, 2017 at 4:00 AM, Stefan Haller wrote: > > > Maybe I wasn't clear enough about that in my proposal, but I propose to > > always store the commit hash of the remote tracking branch as a new > > lease after push and pull, not the local branch. This way it works

Re: Tools that do an automatic fetch defeat "git push --force-with-lease"

2017-04-11 Thread Stefan Haller
Ævar Arnfjör? Bjarmason wrote: > Does this proposal require that all the things that can update a ref > be hooked to maintain these lease values? It is true that the proposal relies on people using git push and git pull, not some lower level approximation such as git fetch + git update-ref. Whet

Re: Tools that do an automatic fetch defeat "git push --force-with-lease"

2017-04-11 Thread Jeff King
On Tue, Apr 11, 2017 at 02:37:27PM +0200, Stefan Haller wrote: > > I agree that probably makes the multiple-operation stuff go away, which > > is nice. It does raise the question of when the integration point > > happens, and how we handle alternate paths through which commits may > > land in a lo

Re: [PATCH] read-cache: avoid git_path() race in freshen_shared_index()

2017-04-11 Thread Devan Lucas
Sent from my iPhone

Re: [PATCH 11/12] grep: change the internal PCRE code & header names to be PCRE1

2017-04-11 Thread Jeff King
On Tue, Apr 11, 2017 at 01:02:56PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> Yes, this is a bug. I'll need to add a git_options along with > >> submodule_options and pass -c grep.patternType= > > > > Maybe that's an indication we should have --pcre1-regexp and > > --pcre2-regexp, so we don't

Re: [PATCH v2] http: honnor empty http.proxy option to bypass proxy

2017-04-11 Thread Jeff King
On Tue, Apr 11, 2017 at 12:20:50PM +0300, Sergey Ryazanov wrote: > diff --git a/http.c b/http.c > index 96d84bb..8be75b2 100644 > --- a/http.c > +++ b/http.c > @@ -836,8 +836,14 @@ static CURL *get_curl_handle(void) > } > } > > - if (curl_http_proxy) { > - cur

[PATCH v2] Docs: Add some missing options to git-diff.txt

2017-04-11 Thread Andreas Heiduk
New attempt due to whitespace fixes after EndOfSenctence. Junio C Hamano writes: > This is probably a shared issue with the original text for > "diff-files", but I think we must stress that these options make > sense only when you are in the middle of conflict resolution. > > In addition, unlike

Re: `git status` output is very misleading after a merge on a "detached HEAD"

2017-04-11 Thread Michael J Gruber
Enis Bayramoğlu venit, vidit, dixit 11.04.2017 10:57: > I've encountered a very misleading output from `git status`. Here's a > sequence of events that demonstrates the issue: > > $ git --version > git version 2.12.0 > > $ git checkout origin/master > > $ git status > HEAD detached from origin/m

Re: [PATCH v2] http: honnor empty http.proxy option to bypass proxy

2017-04-11 Thread Sergey Ryazanov
On Tue, Apr 11, 2017 at 4:06 PM, Jeff King wrote: > On Tue, Apr 11, 2017 at 12:20:50PM +0300, Sergey Ryazanov wrote: >> diff --git a/http.c b/http.c >> index 96d84bb..8be75b2 100644 >> --- a/http.c >> +++ b/http.c >> @@ -836,8 +836,14 @@ static CURL *get_curl_handle(void) >> } >>

Re: [PATCH v2] http: honnor empty http.proxy option to bypass proxy

2017-04-11 Thread Jeff King
On Tue, Apr 11, 2017 at 05:56:56PM +0300, Sergey Ryazanov wrote: > > I don't know _what_ "https://"; should do. It's clearly bogus. But > > telling curl to use the defaults seems funny. In that sense, your > > original was much better (we'd feed it to curl, which would be free to > > complain). >

Re: `git status` output is very misleading after a merge on a "detached HEAD"

2017-04-11 Thread Enis Bayramoğlu
> Well, what do you suggest as an alternative? > > Git tells you that you are in detached state and where you came from > (detached from). I think it'd be best if git status somehow indicated that you're no longer at the same commit. Maybe something like: $ git status HEAD detached from origin/ma

git work trees

2017-04-11 Thread taylor, david
We are using Git in a distributed environment. In the United States, we have the master repository in one state and a build cluster in a different state. In addition to people in the US doing builds, we have people in other countries (Ireland, India, Israel, Russia, possibly others) doing builds

Re: [PATCH v5 3/8] convert: Split start_multi_file_filter into two separate functions

2017-04-11 Thread Jeff King
On Fri, Apr 07, 2017 at 08:03:49AM -0400, Ben Peart wrote: > @@ -642,7 +621,41 @@ static struct cmd2process > *start_multi_file_filter(struct hashmap *hashmap, cons > done: > sigchain_pop(SIGPIPE); > > - if (err || errno == EPIPE) { > + if (err || errno == EPIPE) > +

Re: [PATCH 6/5] run-command: avoid potential dangers in forked child

2017-04-11 Thread Brandon Williams
On 04/11, Eric Wong wrote: > Hi Brandon, this series tickles an old itch of mine, so I > started working off of it. I'm only somewhat concerned > with the path resolution in execvp(e) pontentially calling > malloc on some libcs; but I suppose that's a separate patch > for another time. > > Only l

Re: [PATCH v3 0/5] propagating push-options, remote and refspec

2017-04-11 Thread Brandon Williams
On 04/11, Junio C Hamano wrote: > Brandon Williams writes: > > > v3 builds upon v2 by adding 3 additional patches to add functionality to > > also > > propagate the remote and refspec down to children process's working to push > > submodules. The remote and refspec will only be propagated if th

Re: [PATCH 11/12] grep: change the internal PCRE code & header names to be PCRE1

2017-04-11 Thread Brandon Williams
On 04/11, Jeff King wrote: > On Tue, Apr 11, 2017 at 01:02:56PM +0200, Ævar Arnfjörð Bjarmason wrote: > > > >> Yes, this is a bug. I'll need to add a git_options along with > > >> submodule_options and pass -c grep.patternType= > > > > > > Maybe that's an indication we should have --pcre1-rege

Re: [PATCH 6/5] run-command: avoid potential dangers in forked child

2017-04-11 Thread Eric Wong
Brandon Williams wrote: > On 04/11, Eric Wong wrote: > > Hi Brandon, this series tickles an old itch of mine, so I > > started working off of it. I'm only somewhat concerned > > with the path resolution in execvp(e) pontentially calling > > malloc on some libcs; but I suppose that's a separate pa

[PATCH v3 0/2] http: few fixes for the proxy configuration handling

2017-04-11 Thread Sergey Ryazanov
Hello, this is few patches, which fixes regressions in the proxy handling. Changes since v2: - fix grammar (thanks to Ævar) - add new patch which fixes the silent ignoring of proxy missconfiguration Sergey Ryazanov (2): http: honor empty http.proxy option to bypass proxy http: fix the sile

Re: [PATCH 6/5] run-command: avoid potential dangers in forked child

2017-04-11 Thread Brandon Williams
On 04/11, Eric Wong wrote: > Brandon Williams wrote: > > On 04/11, Eric Wong wrote: > > > Hi Brandon, this series tickles an old itch of mine, so I > > > started working off of it. I'm only somewhat concerned > > > with the path resolution in execvp(e) pontentially calling > > > malloc on some li

[PATCH v3 1/2] http: honor empty http.proxy option to bypass proxy

2017-04-11 Thread Sergey Ryazanov
Curl distinguishes between an empty proxy address and a NULL proxy address. In the first case it completely disables proxy usage, but if the proxy address option is NULL then curl attempts to determine the proxy address from the http_proxy environment variable. According to the documentation, if t

[PATCH v3 2/2] http: fix the silent ignoring of proxy misconfiguraion

2017-04-11 Thread Sergey Ryazanov
Earlier, the whole http.proxy option string was passed to curl without any preprocessing so curl could complain about the invalid proxy configuration. After the commit 372370f167 ("http: use credential API to handle proxy authentication", 2016-01-26), if the user specified an invalid HTTP proxy op

Re: [PATCH 4/5] run-command: prepare child environment before forking

2017-04-11 Thread Brandon Williams
On 04/10, Jonathan Nieder wrote: > Brandon Williams wrote: > > > In order to avoid allocation between 'fork()' and 'exec()' prepare the > > environment to be used in the child process prior to forking. > > If using something like posix_spawn(), this would be needed anyway, so > I'll review it. >

Re: [PATCH 4/5] run-command: prepare child environment before forking

2017-04-11 Thread Jonathan Nieder
Brandon Williams wrote: > On 04/10, Jonathan Nieder wrote: >> struct argv_array result = ARGV_ARRAY_INIT; >> struct string_list mods = STRING_LIST_INIT_DUP; >> struct strbuf key = STRBUF_INIT; >> const char **p; >> >> for (p = cmd_env; *p; p++) { >> const cha

Re: [PATCH 5/5] run-command: add note about forking and threading

2017-04-11 Thread Jonathan Nieder
Eric Wong wrote: > Jonathan Nieder wrote: >> Why can't git use e.g. posix_spawn to avoid this? > > posix_spawn does not support chdir, and it seems we run non-git > commands so no using "git -C" for those. On the other hand, a number of the non-git commands we run are in a shell. At the cost of

Re: [PATCH 5/5] run-command: add note about forking and threading

2017-04-11 Thread Brandon Williams
On 04/11, Eric Wong wrote: > Jonathan Nieder wrote: > > Why can't git use e.g. posix_spawn to avoid this? > > posix_spawn does not support chdir, and it seems we run non-git > commands so no using "git -C" for those. This is actually the biggest reason why I didn't go down that route from the st

Re: [PATCH 0/5] forking and threading

2017-04-11 Thread Jonathan Nieder
Brandon Williams wrote: > As far as I understand the only instance of threading and forking which exists > in the current code base is 'git grep --recurse-submodules', and the standard > builds against glibc shouldn't exhibit any of this deadlocking. I don't think we consider builds against glibc

Re: [PATCH v3 2/2] http: fix the silent ignoring of proxy misconfiguraion

2017-04-11 Thread Jeff King
On Tue, Apr 11, 2017 at 08:17:50PM +0300, Sergey Ryazanov wrote: > Earlier, the whole http.proxy option string was passed to curl without > any preprocessing so curl could complain about the invalid proxy > configuration. > > After the commit 372370f167 ("http: use credential API to handle proxy

Re: [PATCH 5/5] run-command: add note about forking and threading

2017-04-11 Thread Eric Wong
Brandon Williams wrote: > On 04/11, Eric Wong wrote: > > On the other hand, I believe we should make run-command > > vfork-compatible (and Brandon's series is a big (but incomplete) > > step in the (IMHO) right direction); as anything which is > > vfork-safe would also be safe in the presence of t

Re: [PATCH 0/5] forking and threading

2017-04-11 Thread Brandon Williams
On 04/11, Jonathan Nieder wrote: > Brandon Williams wrote: > Jonathan Tan had an idea about how to side-step the issue: what if > "grep" forks an appropriate set of child processes before creating any > threads and then communicates with those children using pipes? > Because no threads have been sp

[PATCH v6] http.postbuffer: allow full range of ssize_t values

2017-04-11 Thread David Turner
Unfortunately, in order to push some large repos where a server does not support chunked encoding, the http postbuffer must sometimes exceed two gigabytes. On a 64-bit system, this is OK: we just malloc a larger buffer. This means that we need to use CURLOPT_POSTFIELDSIZE_LARGE to set the buffer

Re: [PATCH v6] http.postbuffer: allow full range of ssize_t values

2017-04-11 Thread Jonathan Nieder
David Turner wrote: > Unfortunately, in order to push some large repos where a server does > not support chunked encoding, the http postbuffer must sometimes > exceed two gigabytes. On a 64-bit system, this is OK: we just malloc > a larger buffer. > > This means that we need to use CURLOPT_POSTFI

Re: [PATCH 11/12] grep: change the internal PCRE code & header names to be PCRE1

2017-04-11 Thread Ævar Arnfjörð Bjarmason
On Tue, Apr 11, 2017 at 6:51 PM, Brandon Williams wrote: > On 04/11, Jeff King wrote: >> On Tue, Apr 11, 2017 at 01:02:56PM +0200, Ęvar Arnfjörš Bjarmason wrote: >> >> > >> Yes, this is a bug. I'll need to add a git_options along with >> > >> submodule_options and pass -c grep.patternType= >>

[PATCH v9 0/3] read-cache: speed up add_index_entry

2017-04-11 Thread git
From: Jeff Hostetler Version 9 addresses the following: () p0006 perf test can now run using either synthetic repos from t/perf/repos/many-repos.sh -OR- an actual real-world repo. () The commit message has been updated to include results of p0006 on linux.git. () Line 0006.3

[PATCH v9 1/3] read-cache: add strcmp_offset function

2017-04-11 Thread git
From: Jeff Hostetler Add strcmp_offset() function to also return the offset of the first change. Add unit test and helper to verify. Signed-off-by: Jeff Hostetler --- Makefile | 1 + cache.h | 1 + read-cache.c | 20 +++

[PATCH v9 2/3] p0006-read-tree-checkout: perf test to time read-tree

2017-04-11 Thread git
From: Jeff Hostetler Created t/perf/repos/many-files.sh to generate large, but artificial repositories. Created t/perf/p0006-read-tree-checkout.sh to measure performance on various read-tree, checkout, and update-index operations. This test can run using either artificial repos described above

[PATCH v9 3/3] read-cache: speed up add_index_entry during checkout

2017-04-11 Thread git
From: Jeff Hostetler Teach add_index_entry_with_check() and has_dir_name() to see if the path of the new item is greater than the last path in the index array before attempting to search for it. During checkout, merge_working_tree() populates the new index in sorted order, so this change will sa

Re: [PATCH v9 0/3] read-cache: speed up add_index_entry

2017-04-11 Thread Jeff King
On Tue, Apr 11, 2017 at 07:16:59PM +, g...@jeffhostetler.com wrote: > I think this version has addressed everything raise so far, > so I think I'm ready to let this one rest. Thanks for all > the help and feedback. Yeah, this addresses my nitpicks with the perf stuff. Thanks for sticking wit

Re: [PATCH v5 3/8] convert: Split start_multi_file_filter into two separate functions

2017-04-11 Thread Lars Schneider
> On 11 Apr 2017, at 18:16, Jeff King wrote: > > On Fri, Apr 07, 2017 at 08:03:49AM -0400, Ben Peart wrote: > >> @@ -642,7 +621,41 @@ static struct cmd2process >> *start_multi_file_filter(struct hashmap *hashmap, cons >> done: >> sigchain_pop(SIGPIPE); >> >> -if (err || errno == EPIP

Re: [PATCH v5 3/8] convert: Split start_multi_file_filter into two separate functions

2017-04-11 Thread Jeff King
On Tue, Apr 11, 2017 at 09:29:36PM +0200, Lars Schneider wrote: > > 1. Do we need to save errno before calling sigchain_pop()? It's making > > syscalls (though admittedly they are unlikely to fail). > > What if we add the following right before sigchain_pop() ? > > if (errno == EPIPE)

Re: [PATCH v6] http.postbuffer: allow full range of ssize_t values

2017-04-11 Thread Jeff King
On Tue, Apr 11, 2017 at 11:27:40AM -0700, Jonathan Nieder wrote: > David Turner wrote: > > > Unfortunately, in order to push some large repos where a server does > > not support chunked encoding, the http postbuffer must sometimes > > exceed two gigabytes. On a 64-bit system, this is OK: we just

[PATCH 2/2] clone: remember references for submodules even when not recursing

2017-04-11 Thread Stefan Beller
The commit 31224cbdc7 (clone: recursive and reference option triggers submodule alternates, 2016-08-17) argued for any further `submodule update` to respect the initial setup. This is not the case if you only pass '--reference[-if-able]' to the initial clone without instructing to recurse into subm

[PATCH 0/2] clone: record submodule alternates when not recursing

2017-04-11 Thread Stefan Beller
The meat is in the second patch: The commit 31224cbdc7 (clone: recursive and reference option triggers submodule alternates, 2016-08-17) argued for any further `submodule update` to respect the initial setup. This is not the case if you only pass '--reference[-if-able]' to the initi

[PATCH 1/2] submodule.c: add has_submodules to check if we have any submodules

2017-04-11 Thread Stefan Beller
When submodules are involved, it often slows down the process, as most submodule related handling is either done via a child process or by iterating over the index finding all gitlinks. For most commands that may interact with submodules, we need have a quick check if we do have any submodules at

Re: [PATCH v3 4/4] convert: add "status=delayed" to filter process protocol

2017-04-11 Thread Lars Schneider
> On 10 Apr 2017, at 22:54, Torsten Bögershausen wrote: > > On 2017-04-09 21:11, Lars Schneider wrote: > [] >> + >> +packet: git> command=smudge >> +packet: git> pathname=path/testfile.dat >> +packet: git> delay-able=1 >> +packet: git>

Re: [PATCH v5 3/8] convert: Split start_multi_file_filter into two separate functions

2017-04-11 Thread Lars Schneider
> On 11 Apr 2017, at 21:37, Jeff King wrote: > > On Tue, Apr 11, 2017 at 09:29:36PM +0200, Lars Schneider wrote: > >>> 1. Do we need to save errno before calling sigchain_pop()? It's making >>>syscalls (though admittedly they are unlikely to fail). >> >> What if we add the following right

Re: [PATCH v5 3/8] convert: Split start_multi_file_filter into two separate functions

2017-04-11 Thread Jeff King
On Tue, Apr 11, 2017 at 10:01:02PM +0200, Lars Schneider wrote: > > If you initialize errno to 0 right before a syscall, then yes, you can > > trust it without checking the return value of the syscall. I wouldn't > > trust it before calling more complicated functions, though. Not even > > xwrite()

[PATCH v4 2/2] p0005-status: time status on very large repo

2017-04-11 Thread git
From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- t/perf/p0005-status.sh | 51 ++ 1 file changed, 51 insertions(+) create mode 100755 t/perf/p0005-status.sh diff --git a/t/perf/p0005-status.sh b/t/perf/p0005-status.sh new file mode 100755 i

[PATCH v4 1/2] string-list: use ALLOC_GROW macro when reallocing string_list

2017-04-11 Thread git
From: Jeff Hostetler Use ALLOC_GROW() macro when reallocing a string_list array rather than simply increasing it by 32. This is a performance optimization. During status on a very large repo and there are many changes, a significant percentage of the total run time is spent reallocing the wt_st

[PATCH v4 0/2] string-list: use ALLOC_GROW macro when reallocing

2017-04-11 Thread git
From: Jeff Hostetler Version 4 greatly simplifies the p0005 perf test. It now uses an existing repo -- either real-world or artificial from t/perf/repos/many-files.sh. Jeff Hostetler (2): string-list: use ALLOC_GROW macro when reallocing string_list p0005-status: time status on very large re

Re: [PATCH v4 0/2] string-list: use ALLOC_GROW macro when reallocing

2017-04-11 Thread Jeff King
On Tue, Apr 11, 2017 at 08:08:00PM +, g...@jeffhostetler.com wrote: > From: Jeff Hostetler > > Version 4 greatly simplifies the p0005 perf test. It now uses an existing > repo -- either real-world or artificial from t/perf/repos/many-files.sh. > > Jeff Hostetler (2): > string-list: use AL

Re: [PATCH 01/12] grep: add ability to disable threading with --threads=0 or grep.threads=0

2017-04-11 Thread Ævar Arnfjörð Bjarmason
On Tue, Apr 11, 2017 at 12:06 PM, Jeff King wrote: > On Sat, Apr 08, 2017 at 01:24:55PM +, Ævar Arnfjörð Bjarmason wrote: > >> Add the ability to entirely disable threading by having grep.threads=0 >> in the config or --threads=0 on the command-line. > > In pack-objects and index-pack, --threa

[PATCH v4 0/2] http: few fixes for the proxy configuration handling

2017-04-11 Thread Sergey Ryazanov
Hello, this is few patches, which fixes regressions in the proxy handling. Both patches are based on the maint branch. Changes since v3: - fix grammar (thanks to Jeff) Changes since v2: - fix grammar (thanks to Ævar) - add new patch which fixes the silent ignoring of proxy missconfiguration

[PATCH v4 2/2] http: fix the silent ignoring of proxy misconfiguraion

2017-04-11 Thread Sergey Ryazanov
Earlier, the whole http.proxy option string was passed to curl without any preprocessing so curl could complain about the invalid proxy configuration. After the commit 372370f167 ("http: use credential API to handle proxy authentication", 2016-01-26), if the user specified an invalid HTTP proxy op

[PATCH v4 1/2] http: honor empty http.proxy option to bypass proxy

2017-04-11 Thread Sergey Ryazanov
Curl distinguishes between an empty proxy address and a NULL proxy address. In the first case it completely disables proxy usage, but if the proxy address option is NULL then curl attempts to determine the proxy address from the http_proxy environment variable. According to the documentation, if t

Re: [PATCH 01/12] grep: add ability to disable threading with --threads=0 or grep.threads=0

2017-04-11 Thread Jeff King
On Tue, Apr 11, 2017 at 10:20:59PM +0200, Ævar Arnfjörð Bjarmason wrote: > I'm struggling to find a use-case where threading makes sense at all. > The example in the initial introduction in 5b594f457a is always slower > with >0 for me, and since then in 0579f91dd7 it got disabled entirely > for no

Re: `git status` output is very misleading after a merge on a "detached HEAD"

2017-04-11 Thread Ævar Arnfjörð Bjarmason
On Tue, Apr 11, 2017 at 5:13 PM, Enis Bayramoğlu wrote: >> Well, what do you suggest as an alternative? >> >> Git tells you that you are in detached state and where you came from >> (detached from). > > I think it'd be best if git status somehow indicated that you're no > longer at the same commit

Re: [PATCH v2] unpack-trees: avoid duplicate ODB lookups during checkout

2017-04-11 Thread Jeff Hostetler
On 4/10/2017 7:09 PM, René Scharfe wrote: Am 10.04.2017 um 23:26 schrieb Jeff Hostetler: On 4/8/2017 10:06 AM, René Scharfe wrote: Am 07.04.2017 um 17:53 schrieb g...@jeffhostetler.com: +/* implicitly borrow buf[i-1] inside tree_desc[i] */ +memcpy(&t[i], &t[i-1], size

Re: [PATCH v3 2/2] http: fix the silent ignoring of proxy misconfiguraion

2017-04-11 Thread Sergey Ryazanov
On Tue, Apr 11, 2017 at 8:37 PM, Jeff King wrote: > On Tue, Apr 11, 2017 at 08:17:50PM +0300, Sergey Ryazanov wrote: >> Earlier, the whole http.proxy option string was passed to curl without >> any preprocessing so curl could complain about the invalid proxy >> configuration. >> >> After the commi

Re: [PATCH 01/12] grep: add ability to disable threading with --threads=0 or grep.threads=0

2017-04-11 Thread Ævar Arnfjörð Bjarmason
On Tue, Apr 11, 2017 at 10:34 PM, Jeff King wrote: > On Tue, Apr 11, 2017 at 10:20:59PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> I'm struggling to find a use-case where threading makes sense at all. >> The example in the initial introduction in 5b594f457a is always slower >> with >0 for me, and

[PATCH] diff: recurse into nested submodules for inline diff

2017-04-11 Thread Stefan Beller
When fd47ae6a5b (diff: teach diff to display submodule difference with an inline diff, 2016-08-31) was introduced, we did not think of recursing into nested submodules. When showing the inline diff for submodules, automatically recurse into nested submodules as well with inline submodule diffs. S

  1   2   >