[PATCH v2] tree-walk.c: fix overoptimistic inclusion in :(exclude) matching

2018-11-03 Thread Nguyễn Thái Ngọc Duy
tree_entry_interesting() is used for matching pathspec on a tree. The interesting thing about this function is that, because the tree entries are known to be sorted, this function can return more than just "yes, matched" and "no, not matched". It can also say "yes, this entry is matched and so is

Re: [PATCH v4 2/5] am: improve author-script error reporting

2018-11-03 Thread Eric Sunshine
On Wed, Oct 31, 2018 at 6:16 AM Phillip Wood wrote: > diff --git a/builtin/am.c b/builtin/am.c > @@ -308,6 +312,7 @@ static int read_author_script(struct am_state *state) > + int i, name_i = -2, email_i = -2, date_i = -2, err = 0; > @@ -326,14 +331,38 @@ static int read_author_script(struct

Re: [PATCH] multi-pack-index: make code -Wunused-parameter clean

2018-11-03 Thread Jeff King
On Sat, Nov 03, 2018 at 05:49:57PM -0700, Carlo Marcelo Arenas Belón wrote: > introduced in 662148c435 ("midx: write object offsets", 2018-07-12) > but included on all previous versions as well. > > midx.c:713:54: warning: unused parameter 'nr_objects' [-Wunused-parameter] > > likely an

Re: [RFC/PATCH 1/5] Makefile: move long inline shell loops in "install" into helper

2018-11-03 Thread Eric Sunshine
'sb/filenames-with-dashes'On Fri, Nov 2, 2018 at 6:38 PM Ævar Arnfjörð Bjarmason wrote: > Move a 37 line for-loop mess out of "install" and into a helper > script. This started out fairly innocent but over the years has grown > into a hard-to-maintain monster, and my recent ad874608d8 ("Makefile:

Re: [RFC/PATCH 5/5] Makefile: Add a NO_INSTALL_BUILTIN_EXECDIR_ALIASES flag

2018-11-03 Thread Eric Sunshine
On Fri, Nov 2, 2018 at 6:38 PM Ævar Arnfjörð Bjarmason wrote: > Let's add an option to break this backwards compatibility. Now with > NO_INSTALL_BUILTIN_EXECDIR_ALIASES=YesPlease there's only 3 programs > in the bindir that are hardlinked to "git" (receive-pack, > upload-archive & upload-pack),

Re: [RFC/PATCH 4/5] Makefile: add NO_INSTALL_SYMLINKS_FALLBACK switch

2018-11-03 Thread Eric Sunshine
On Fri, Nov 2, 2018 at 6:38 PM Ævar Arnfjörð Bjarmason wrote: > Add a switch for use in conjunction with the INSTALL_SYMLINKS flag > added in ad874608d8 ("Makefile: optionally symlink libexec/git-core > binaries to bin/git", 2018-03-13). > [...] > Signed-off-by: Ævar Arnfjörð Bjarmason > --- >

Hello

2018-11-03 Thread Joshua Mene
Good day I am Dr. Joshua Mene a banker here in Cotonu Benin Republic, I have a lucrative business transaction for you and it is profitable and risk free. kindly reach me via my private email: me...@rediffmail.com for more details. Thanks Dr. Joshua Mene

[PATCH] multi-pack-index: make code -Wunused-parameter clean

2018-11-03 Thread Carlo Marcelo Arenas Belón
introduced in 662148c435 ("midx: write object offsets", 2018-07-12) but included on all previous versions as well. midx.c:713:54: warning: unused parameter 'nr_objects' [-Wunused-parameter] likely an oversight as the information needed to iterate over is embedded in nr_large_offset

Re: [PATCH] tree-walk.c: fix overoptimistic inclusion in :(exclude) matching

2018-11-03 Thread Eric Sunshine
On Sat, Nov 3, 2018 at 11:31 AM Nguyễn Thái Ngọc Duy wrote: > Rules 8 and 18 are now updated to be less eager. We conclude that the > current entry is positively matched and included. But we say nothing > about remaining entries. tree_entry_interesting() will be called again > for those entries

Re: Git Slowness on Windows w/o Internet

2018-11-03 Thread Philip Oakley
On 03/11/2018 16:44, brian m. carlson wrote: On Fri, Nov 02, 2018 at 11:10:51AM -0500, Peter Kostyukov wrote: Wanted to bring to your attention an issue that we discovered on our Windows Jenkins nodes with git scm installed (git.exe). Our Jenkins servers don't have Internet access. It appears

[RFC PATCH] checkout: add synonym of -b

2018-11-03 Thread Mikkel Kjeldsen
Add --new-branch as a long-form synonym of -b. I occasionally encounter some confusion in new users having interpreted "checkout -b" to mean "checkout branch", or internalized it as "the way to create a new branch" rather than merely a convenience for "branch && checkout". I think an explicit

Re: [PATCH v3] commit: add a commit.allowEmpty config variable

2018-11-03 Thread Ævar Arnfjörð Bjarmason
On Sat, Nov 03 2018, tanushree27 wrote: > +commit.allowEmpty:: > + A boolean to specify whether empty commits are allowed with `git > + commit`. See linkgit:git-commit[1]. > + Defaults to false. > + Good. > + if (config_commit_allow_empty >= 0) /* if allowEmpty is allowed in

Re: git appears to ignore GIT_CONFIG environment variable

2018-11-03 Thread Sirio Balmelli
Thank you very much, I appreciate the answer :) best, Sirio > On Nov 2, 2018, at 04:07, Junio C Hamano wrote: > > Sirio Balmelli writes: > >> It appears that git ignores the GIT_CONFIG environment variable, >> while git-config *does* consider it. > > Yup, that is exactly how it is designed

Re: [RFC] Generation Number v2

2018-11-03 Thread Jakub Narebski
Jakub Narebski writes: > Jakub Narebski writes: >> Stefan Beller writes: > [...] >>> How would this impact creation of a commit? >>> >>> The current generation numbers can be lazily updated or not >>> updated at all. In my understanding of the maximum generation >>> numbers, a new commit would

Re: Git Slowness on Windows w/o Internet

2018-11-03 Thread brian m. carlson
On Fri, Nov 02, 2018 at 11:10:51AM -0500, Peter Kostyukov wrote: > Wanted to bring to your attention an issue that we discovered on our > Windows Jenkins nodes with git scm installed (git.exe). Our Jenkins > servers don't have Internet access. It appears that git.exe is trying > to connect to

Re: Git Test Coverage Report (Friday, Nov 2)

2018-11-03 Thread Michał Górny
On Sat, 2018-11-03 at 19:03 +0900, Junio C Hamano wrote: > Michał Górny writes: > > > As for how involved... we'd just have to use a key that has split > > signing subkey. Would it be fine to add the subkey to the existing key? > > It would imply updating keyids/fingerprints everywhere. > >

Re: [PATCH v4] gpg-interface.c: detect and reject multiple signatures on commits

2018-11-03 Thread Michał Górny
On Sat, 2018-11-03 at 16:36 +0100, Duy Nguyen wrote: > On Sat, Nov 3, 2018 at 4:32 PM Michał Górny wrote: > > > Perhaps my gpg is too old? > > > > > > $ gpg --version > > > gpg (GnuPG) 2.1.15 > > > libgcrypt 1.7.3 > > > Copyright (C) 2016 Free Software Foundation, Inc. > > > License GPLv3+: GNU

Change your password callgsm01 immediately. Your account has been hacked.

2018-11-03 Thread git
I greet you! I have bad news for you. 27/08/2018 - on this day I hacked your operating system and got full access to your account git@vger.kernel.org On that day your account (git@vger.kernel.org) password was: callgsm01 It is useless to change the password, my malware intercepts it every

Re: [PATCH v4] gpg-interface.c: detect and reject multiple signatures on commits

2018-11-03 Thread Duy Nguyen
On Sat, Nov 3, 2018 at 4:32 PM Michał Górny wrote: > Perhaps this is indeed specific to this version of GnuPG. The tests > pass for me with both 1.4.21 and 2.2.10. We don't have 2.1* in Gentoo > anymore. Updated to 2.2.8 and the test is passed. -- Duy

Re: [PATCH v4] gpg-interface.c: detect and reject multiple signatures on commits

2018-11-03 Thread Duy Nguyen
On Sat, Nov 3, 2018 at 4:32 PM Michał Górny wrote: > > Perhaps my gpg is too old? > > > > $ gpg --version > > gpg (GnuPG) 2.1.15 > > libgcrypt 1.7.3 > > Copyright (C) 2016 Free Software Foundation, Inc. > > License GPLv3+: GNU GPL version 3 or later > > > >

Re: Failed stash caused untracked changes to be lost

2018-11-03 Thread Thomas Gummerer
On 10/23, Quinn, David wrote: > > Issue: While running a git stash command including the '-u' flag to include > untracked files, the command failed due to arguments in the incorrect order. > After this untracked files the were present had been removed and permanently > lost. Thanks for your

Re: [PATCH v4] gpg-interface.c: detect and reject multiple signatures on commits

2018-11-03 Thread Michał Górny
On Sat, 2018-11-03 at 16:17 +0100, Duy Nguyen wrote: > On Sat, Oct 20, 2018 at 9:31 PM Michał Górny wrote: > > +test_expect_success GPG 'detect fudged commit with double signature' ' > > + sed -e "/gpgsig/,/END PGP/d" forged1 >double-base && > > + sed -n -e "/gpgsig/,/END PGP/p"

[PATCH] tree-walk.c: fix overoptimistic inclusion in :(exclude) matching

2018-11-03 Thread Nguyễn Thái Ngọc Duy
tree_entry_interesting() is used for matching pathspec on a tree. The interesting thing about this function is that, because the tree entries are known to be sorted, this function can return more than just "yes, matched" and "no, not matched". It can also say "yes, this entry is matched and so is

Re: [PATCH v4] gpg-interface.c: detect and reject multiple signatures on commits

2018-11-03 Thread Duy Nguyen
On Sat, Oct 20, 2018 at 9:31 PM Michał Górny wrote: > +test_expect_success GPG 'detect fudged commit with double signature' ' > + sed -e "/gpgsig/,/END PGP/d" forged1 >double-base && > + sed -n -e "/gpgsig/,/END PGP/p" forged1 | \ > + sed -e "s/^gpgsig//;s/^ //" | gpg

[PATCH v3] commit: add a commit.allowEmpty config variable

2018-11-03 Thread tanushree27
Add commit.allowEmpty configuration variable as a convenience for those who always prefer --allow-empty. Add tests to check the behavior introduced by this commit. This closes https://github.com/git-for-windows/git/issues/1854 Signed-off-by: tanushree27 --- Documentation/config.txt | 5

Re: [[PATCH v2]] commit: add a commit.allowempty config variable

2018-11-03 Thread Duy Nguyen
On Sat, Nov 3, 2018 at 12:55 PM tanushree27 wrote: > > Add commit.allowempty configuration variable as a convenience for those > who always prefer --allow-empty. > > Add tests to check the behavior introduced by this commit. > > This closes https://github.com/git-for-windows/git/issues/1854 > >

[PATCH] sequencer.c: remove a stray semicolon

2018-11-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- On top of ag/rebase-i-in-c sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index 9e1ab3a2a7..92dca06462 100644 --- a/sequencer.c +++ b/sequencer.c @@ -4846,7 +4846,7 @@ int complete_action(struct

Re: [PATCH 1/1] poll: use GetTickCount64() to avoid wrap-around issues

2018-11-03 Thread Johannes Sixt
Am 03.11.18 um 09:14 schrieb Carlo Arenas: On Fri, Nov 2, 2018 at 9:44 AM Johannes Sixt wrote: + timeout = elapsed >= orig_timeout ? 0 : (int)(orig_timeout - elapsed); nitpick: cast to DWORD instead of int No; timeout is of type int; after an explicit type cast we don't want to have

Re: [RFC] Generation Number v2

2018-11-03 Thread Jakub Narebski
Derrick Stolee writes: > On 11/1/2018 8:27 AM, Jakub Narebski wrote: >> Derrick Stolee writes: >> >>> Please also let me know about any additional tests that I could >>> run. Now that I've got a lot of test scripts built up, I can re-run >>> the test suite pretty quickly. >> >> I would add

Update

2018-11-03 Thread Bruce Blake
Hello Dear how are you doing today? my name is Bruce Blake, the manager foreign affairs in City Finance Bank, we have a customer here in bank that has not accessed his account for the past 18 years, after some research made about him we found out he was a victim of the crashed mining company

[[PATCH v2]] commit: add a commit.allowempty config variable

2018-11-03 Thread tanushree27
Add commit.allowempty configuration variable as a convenience for those who always prefer --allow-empty. Add tests to check the behavior introduced by this commit. This closes https://github.com/git-for-windows/git/issues/1854 Signed-off-by: tanushree27 --- Documentation/config.txt | 5

Re: Git Test Coverage Report (Friday, Nov 2)

2018-11-03 Thread SZEDER Gábor
On Fri, Nov 02, 2018 at 10:16:48PM -0400, Derrick Stolee wrote: > Here is the coverage report for today. Some builds were timing out, so I > removed the tests with number 9000 or more from the build [1]. Hopefully > this is a temporary measure. I think it's the Azure CI patch series, see:

[PATCH] commit: add a commit.allowEmpty config variable

2018-11-03 Thread tanushree27
Add commit.allowEmpty configuration variable as a convenience for those who always prefer --allow-empty. Add tests to check the behavior introduced by this commit. This closes https://github.com/git-for-windows/git/issues/1854 Signed-off-by: tanushree27 --- Documentation/config.txt | 5

Re: [PATCH v2] completion: use builtin completion for format-patch

2018-11-03 Thread Junio C Hamano
Duy Nguyen writes: >> Would it make sense to make send-email's completion helper print these >> out directly? That way, if someone were to modify send-email in the >> future, they'd only have to look through one file instead of both >> send-email and the completions script. > > I did think about

Re: Git Test Coverage Report (Friday, Nov 2)

2018-11-03 Thread Junio C Hamano
Michał Górny writes: > As for how involved... we'd just have to use a key that has split > signing subkey. Would it be fine to add the subkey to the existing key? > It would imply updating keyids/fingerprints everywhere. Yes, that "everywhere" is exactly what I meant by "how involved", and

[PATCH v3 00/14] Reduce #ifdef NO_PTHREADS

2018-11-03 Thread Nguyễn Thái Ngọc Duy
Changes since v2 - more cleanups in grep.c, read-cache.c and index-pack.c - the send-pack.c changes are back, but this time I just add async_with_fork() to move NO_PTHREADS back in run-command.c For grep.c and read-cache.c, changes are split in two patches. The first one is a dumb, mechanical

[PATCH v3 14/14] Clean up pthread_create() error handling

2018-11-03 Thread Nguyễn Thái Ngọc Duy
Normally pthread_create() rarely fails. But with new pthreads wrapper, pthread_create() will return ENOSYS on a system without thread support. Threaded code _is_ protected by HAVE_THREADS and pthread_create() should never run in the first place. But the situation could change in the future and

[PATCH v3 05/14] name-hash.c: remove #ifdef NO_PTHREADS

2018-11-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- name-hash.c | 22 -- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/name-hash.c b/name-hash.c index 1fcda73cb3..b3c9ac791d 100644 --- a/name-hash.c +++ b/name-hash.c @@ -7,6 +7,7 @@ */ #define

[PATCH v3 03/14] send-pack.c: move async's #ifdef NO_PTHREADS back to run-command.c

2018-11-03 Thread Nguyễn Thái Ngọc Duy
On systems that do not support multithread, start_async() is implemented with fork(). This implementation details unfortunately leak out at least in send-pack.c [1]. To keep the code base clean of NO_PTHREADS, move the this #ifdef back to run-command.c. The new wrapper function async_with_fork()

[PATCH v3 12/14] read-cache.c: reduce branching based on HAVE_THREADS

2018-11-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- read-cache.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/read-cache.c b/read-cache.c index 40fc0cb65f..00cd416816 100644 --- a/read-cache.c +++ b/read-cache.c @@ -2172,7 +2172,6 @@ int do_read_index(struct

[PATCH v3 13/14] read-cache.c: initialize copy_len to shut up gcc 8

2018-11-03 Thread Nguyễn Thái Ngọc Duy
It was reported that when building with NO_PTHREADS=1, -Wmaybe-uninitialized is triggered. Just initialize the variable from the beginning to shut the compiler up (because this warning is enabled in config.dev) Signed-off-by: Nguyễn Thái Ngọc Duy --- read-cache.c | 4 +--- 1 file changed, 1

[PATCH v3 10/14] pack-objects: remove #ifdef NO_PTHREADS

2018-11-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/pack-objects.c | 26 ++ pack-objects.h | 6 -- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index b059b86aee..12edd6da16 100644 ---

[PATCH v3 07/14] grep: remove #ifdef NO_PTHREADS

2018-11-03 Thread Nguyễn Thái Ngọc Duy
This is a faithful conversion without attempting to improve anything. That comes later. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/grep.c | 59 +++--- grep.c | 6 - grep.h | 6 - 3 files changed, 22 insertions(+), 49

[PATCH v3 01/14] thread-utils: macros to unconditionally compile pthreads API

2018-11-03 Thread Nguyễn Thái Ngọc Duy
When built with NO_PTHREADS, the macros are used make the code build even though pthreads header and library may be missing. The code can still have different code paths for no threads support with HAVE_THREADS variable. There are of course impacts on no-pthreads builds: - data structure may get

[PATCH v3 04/14] index-pack: remove #ifdef NO_PTHREADS

2018-11-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/index-pack.c | 63 ++-- 1 file changed, 14 insertions(+), 49 deletions(-) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 2004e25da2..682042579b 100644 --- a/builtin/index-pack.c +++

[PATCH v3 11/14] read-cache.c: remove #ifdef NO_PTHREADS

2018-11-03 Thread Nguyễn Thái Ngọc Duy
This is a faithful conversion with no attempt to clean up whatsoever. Code indentation is left broken. There will be another commit to clean it up and un-indent if we just indent now. It's just more code noise. Signed-off-by: Nguyễn Thái Ngọc Duy --- read-cache.c | 34

[PATCH v3 09/14] preload-index.c: remove #ifdef NO_PTHREADS

2018-11-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- preload-index.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/preload-index.c b/preload-index.c index 9e7152ab14..0e24886aca 100644 --- a/preload-index.c +++ b/preload-index.c @@ -7,17 +7,7 @@ #include "fsmonitor.h"

[PATCH v3 06/14] attr.c: remove #ifdef NO_PTHREADS

2018-11-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- attr.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/attr.c b/attr.c index 60d284796d..eaece6658d 100644 --- a/attr.c +++ b/attr.c @@ -41,23 +41,17 @@ const char *git_attr_name(const struct git_attr *attr) struct attr_hashmap {

[PATCH v3 08/14] grep: clean up num_threads handling

2018-11-03 Thread Nguyễn Thái Ngọc Duy
When NO_PTHREADS is still used in this file, we have two separate code paths for thread and no thread support. The latter will always have num_threads remain zero while the former uses num_threads zero as "default number of threads". With recent changes blur the line between thread and no-thread

[PATCH v3 02/14] run-command.h: include thread-utils.h instead of pthread.h

2018-11-03 Thread Nguyễn Thái Ngọc Duy
run-command.c may use threads for its async support. But instead of including pthread.h directly, let's include thread-utils.h. run-command.c probably never needs the dummy bits in thread-utils.h when NO_PTHREADS is defined. But this makes sure we have consistent HAVE_THREADS behavior everywhere.

Re: [PATCH v2] completion: use builtin completion for format-patch

2018-11-03 Thread Duy Nguyen
On Sat, Nov 3, 2018 at 8:59 AM Denton Liu wrote: > > @@ -2081,7 +2077,7 @@ _git_send_email () > > return > > ;; > > --*) > > - __gitcomp "--annotate --bcc --cc --cc-cmd --chain-reply-to > > + __gitcomp_builtin send-email "--annotate --bcc

Re: [PATCH 1/1] poll: use GetTickCount64() to avoid wrap-around issues

2018-11-03 Thread Carlo Arenas
On Fri, Nov 2, 2018 at 9:44 AM Johannes Sixt wrote: > > + timeout = elapsed >= orig_timeout ? 0 : (int)(orig_timeout - elapsed); nitpick: cast to DWORD instead of int Carlo

Re: [PATCH v2] completion: use builtin completion for format-patch

2018-11-03 Thread Denton Liu
On Sat, Nov 03, 2018 at 07:03:18AM +0100, Duy Nguyen wrote: > Subject: [PATCH] completion: use __gitcomp_builtin for format-patch > > This helps format-patch gain completion for a couple new options, > notably --range-diff. > > Since send-email completion relies on $__git_format_patch_options >

Re: Git Test Coverage Report (Friday, Nov 2)

2018-11-03 Thread Michał Górny
On Sat, 2018-11-03 at 12:38 +0900, Junio C Hamano wrote: > Derrick Stolee writes: > > > Uncovered code in 'next' not in 'master' > > > > > > pretty.c > > 4de9394dcb 1264) if (c->signature_check.primary_key_fingerprint) > > 4de9394dcb 1265)

Re: [PATCH v2] completion: use builtin completion for format-patch

2018-11-03 Thread Duy Nguyen
On Fri, Nov 02, 2018 at 08:52:30AM +0900, Junio C Hamano wrote: > Duy Nguyen writes: > > >> > I have no comment about this. In an ideal world, sendemail.perl could > >> > be taught to support --git-completion-helper but I don't think my > >> > little remaining Perl knowledge (or time) is enough