[PATCH 05/78] config.txt: move alias.* to a separate file

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/config.txt | 19 +-- Documentation/config/alias.txt | 18 ++ 2 files changed, 19 insertions(+), 18 deletions(-) create mode 100644 Documentation/config/alias.txt diff --git a/Documentation/config.txt

[PATCH 16/78] config.txt: move credential.* to a separate file

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/config.txt| 27 +-- Documentation/config/credential.txt | 26 ++ 2 files changed, 27 insertions(+), 26 deletions(-) create mode 100644 Documentation/config/credential.txt diff

[PATCH 30/78] config.txt: move gpg.* to a separate file

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/config.txt | 21 + Documentation/config/gpg.txt | 20 2 files changed, 21 insertions(+), 20 deletions(-) create mode 100644 Documentation/config/gpg.txt diff --git a/Documentation/config.txt

[PATCH 29/78] config.txt: move grep.* to a separate file

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/config.txt | 25 + Documentation/config/grep.txt | 24 2 files changed, 25 insertions(+), 24 deletions(-) create mode 100644 Documentation/config/grep.txt diff --git

[PATCH 08/78] config.txt: move blame.* to a separate file

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/config.txt | 22 +- Documentation/config/blame.txt | 21 + 2 files changed, 22 insertions(+), 21 deletions(-) create mode 100644 Documentation/config/blame.txt diff --git

[PATCH 09/78] config.txt: move branch.* to a separate file

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/config.txt| 103 +--- Documentation/config/branch.txt | 102 +++ 2 files changed, 103 insertions(+), 102 deletions(-) create mode 100644 Documentation/config/branch.txt diff

[PATCH 19/78] config.txt: move difftool.* to a separate file

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/config.txt | 15 +-- Documentation/config/difftool.txt | 14 ++ 2 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 Documentation/config/difftool.txt diff --git a/Documentation/config.txt

[PATCH 35/78] config.txt: move http.* to a separate file

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/config.txt | 272 +- Documentation/config/http.txt | 271 + 2 files changed, 272 insertions(+), 271 deletions(-) create mode 100644 Documentation/config/http.txt diff

Re: [PATCH] i18n: make GETTEXT_POISON a runtime option

2018-10-27 Thread Jeff King
On Fri, Oct 26, 2018 at 09:20:56PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> I was thinking: > >> > >> $ git var -e GIT_WHATEVER_ENV > >> > >> [-e for environment]. > >> > >> ... but that is really no different than git-config. ;-) > > > > Actually, "git var" already does pull bits from the

Re: [PATCH 02/10] index-pack: remove #ifdef NO_PTHREADS

2018-10-27 Thread Jeff King
On Sat, Oct 27, 2018 at 09:09:55AM +0200, Nguyễn Thái Ngọc Duy wrote: > static inline struct thread_local *get_thread_data(void) > { > -#ifndef NO_PTHREADS > - if (threads_active) > - return pthread_getspecific(key); > - assert(!threads_active && > -"This should

Re: [PATCH 00/10] Reduce #ifdef NO_PTHREADS

2018-10-27 Thread Jeff King
On Sat, Oct 27, 2018 at 09:09:53AM +0200, Nguyễn Thái Ngọc Duy wrote: > People seemed to support the idea of removing these #ifdef NO_PTHREADS [1] > so this is a complete series. I left the #ifdef in run-command.c and > transport-helper.c because those code looked complicated so perhaps we >

Re: [PATCH 01/10] thread-utils: macros to unconditionally compile pthreads API

2018-10-27 Thread Jeff King
On Sat, Oct 27, 2018 at 09:09:54AM +0200, Nguyễn Thái Ngọc Duy wrote: > +/* > + * macros instead of typedefs because pthread definitions may have > + * been pulled in by some system dependencies even though the user > + * wants to disable pthread. > + */ > +#define pthread_t int > +#define

Re: [PATCH 06/10] grep: remove #ifdef NO_PTHREADS

2018-10-27 Thread Jeff King
On Sat, Oct 27, 2018 at 09:09:59AM +0200, Nguyễn Thái Ngọc Duy wrote: > diff --git a/builtin/grep.c b/builtin/grep.c > index d8508ddf79..29221e1003 100644 > --- a/builtin/grep.c > +++ b/builtin/grep.c > @@ -34,7 +34,6 @@ static int recurse_submodules; > #define GREP_NUM_THREADS_DEFAULT 8 >

Re: [PATCH 00/10] Reduce #ifdef NO_PTHREADS

2018-10-27 Thread Jeff King
On Sat, Oct 27, 2018 at 09:09:53AM +0200, Nguyễn Thái Ngọc Duy wrote: > People seemed to support the idea of removing these #ifdef NO_PTHREADS [1] > so this is a complete series. I left the #ifdef in run-command.c and > transport-helper.c because those code looked complicated so perhaps we >

Re: [PATCH] Poison gettext with the Ook language

2018-10-27 Thread Jakub Narebski
SZEDER Gábor writes: > On Mon, Oct 22, 2018 at 05:36:33PM +0200, Nguyễn Thái Ngọc Duy wrote: >> >> The current gettext() function just replaces all strings with >> '# GETTEXT POISON #' including format strings and hides the things >> that we should be allowed to grep (like branch names, or some

Re*: [PATCH v3] fetch: replace string-list used as a look-up table with a hashmap

2018-10-27 Thread Junio C Hamano
Johannes Schindelin writes: > Just one thing^W^Wa couple of things: > > It would probably make more sense to `hashmap_get_from_hash()` and > `strhash()` here (and `strhash()` should probably be used everywhere > instead of `memhash(str, strlen(str))`). hashmap_get_from_hash() certainly is much

Re: [PATCH] Clear --exclude list after 'git rev-parse --all'

2018-10-27 Thread Jeff King
On Sat, Oct 27, 2018 at 04:12:40PM +0900, Junio C Hamano wrote: > > Yeah, I agree that would be fine, too. I think there are two dimensions > > in which to look at the problem, like so: > > > > rev-list rev-parse > > - > > --globclearsclears > > --all

Re: What's cooking in git.git (Oct 2018, #05; Fri, 26)

2018-10-27 Thread Junio C Hamano
Stefan Beller writes: >> >> * sb/strbuf-h-update (2018-09-29) 1 commit >> (merged to 'next' on 2018-10-26 at e4ad935cb0) >> + strbuf.h: format according to coding guidelines >> >> Code clean-up to serve as a BCP example. >> >> Will merge to 'master'. >> Further clean-up patches may need to

Re: [PATCH 01/10] thread-utils: macros to unconditionally compile pthreads API

2018-10-27 Thread Jeff King
On Sat, Oct 27, 2018 at 09:40:13AM +0200, Duy Nguyen wrote: > > We expect to be able to store a void pointer here and get it back, which > > should work even for a single thread. Do we need something like: > > > > extern void *pthread_specific_data; > > > > #define pthread_setspecific(key,

Re: Git Test Coverage Report (Saturday, Oct 27)

2018-10-27 Thread Junio C Hamano
Derrick Stolee writes: > In an effort to ensure new code is reasonably covered by the test > suite, we now have contrib/coverage-diff.sh to combine the gcov output > from 'make coverage-test ; make coverage-report' with the output from > 'git diff A B' to discover _new_lines of code that are not

Re: [PATCH v3 10/12] Add a base implementation of SHA-256 support

2018-10-27 Thread Jakub Narebski
"brian m. carlson" writes: > SHA-1 is weak and we need to transition to a new hash function. For > some time, we have referred to this new function as NewHash. Recently, > we decided to pick SHA-256 as NewHash. Even if we have decided to not repeat the reasoning behind the need to switch away

Re: [PATCH 01/10] thread-utils: macros to unconditionally compile pthreads API

2018-10-27 Thread Duy Nguyen
On Sat, Oct 27, 2018 at 10:15 AM Jeff King wrote: > > On Sat, Oct 27, 2018 at 09:40:13AM +0200, Duy Nguyen wrote: > > > > We expect to be able to store a void pointer here and get it back, which > > > should work even for a single thread. Do we need something like: > > > > > > extern void

Re: bug?: git grep HEAD with exclude in pathspec not taken into account

2018-10-27 Thread Duy Nguyen
On Wed, Oct 24, 2018 at 4:55 PM Christophe Bliard wrote: > > Hi, > > I observed an unexpected behavior while using git grep with both git > 2.19.1 and 2.14.3. Quick note. I confirm this is a bug in tree_entry_interesting() perhaps being over-optimistic. It'll take me more time to familiarize

Git Test Coverage Report (Saturday, Oct 27)

2018-10-27 Thread Derrick Stolee
In an effort to ensure new code is reasonably covered by the test suite, we now have contrib/coverage-diff.sh to combine the gcov output from 'make coverage-test ; make coverage-report' with the output from 'git diff A B' to discover _new_lines of code that are not covered. This report ignores

Re: [RFC PATCH] index-pack: improve performance on NFS

2018-10-27 Thread Duy Nguyen
On Sat, Oct 27, 2018 at 11:34 AM Jeff King wrote: > Taking one step back, the root problem in this thread is that stat() on > non-existing files is slow (which makes has_sha1_file slow). > > One solution there is to cache the results of looking in .git/objects > (or any alternate object store)

Re: [PATCH 00/10] Reduce #ifdef NO_PTHREADS

2018-10-27 Thread Duy Nguyen
On Sat, Oct 27, 2018 at 10:13 AM Jeff King wrote: > > On Sat, Oct 27, 2018 at 09:09:53AM +0200, Nguyễn Thái Ngọc Duy wrote: > > > People seemed to support the idea of removing these #ifdef NO_PTHREADS [1] > > so this is a complete series. I left the #ifdef in run-command.c and > >

[PATCH v2 07/10] pack-objects: remove #ifdef NO_PTHREADS

2018-10-27 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 v2 01/10] thread-utils: macros to unconditionally compile pthreads API

2018-10-27 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 v2 06/10] preload-index.c: remove #ifdef NO_PTHREADS

2018-10-27 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 v2 10/10] read-cache.c: initialize copy_len to shut up gcc 8

2018-10-27 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 v2 02/10] index-pack: remove #ifdef NO_PTHREADS

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/index-pack.c | 68 1 file changed, 18 insertions(+), 50 deletions(-) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 2004e25da2..bbd66ca025 100644 --- a/builtin/index-pack.c +++

[PATCH v2 00/10] Reduce #ifdef NO_PTHREADS

2018-10-27 Thread Nguyễn Thái Ngọc Duy
The send-pack.c patch is dropped since it's tied to async code and like transport-helper.c (or more cleanups in index-pack.c) could be left for later. I added one more patch to shut up -Wmaybe-uninitialized but since I could not reproduce it, Jeff would need to verify if it works for him. Nguyễn

[PATCH v2 08/10] read-cache.c: remove #ifdef NO_PTHREADS

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- read-cache.c | 49 ++--- 1 file changed, 18 insertions(+), 31 deletions(-) diff --git a/read-cache.c b/read-cache.c index d57958233e..ba870bc3fd 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1920,19 +1920,15

[PATCH v2 05/10] grep: remove #ifdef NO_PTHREADS

2018-10-27 Thread Nguyễn Thái Ngọc Duy
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 deletions(-) diff --git a/builtin/grep.c b/builtin/grep.c index d8508ddf79..6dd15dbaa2

[PATCH v2 09/10] Clean up pthread_create() error handling

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Normally pthread_create() rarely fails and sometimes error handling can be neglected. 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

[PATCH v2 03/10] name-hash.c: remove #ifdef NO_PTHREADS

2018-10-27 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 v2 04/10] attr.c: remove #ifdef NO_PTHREADS

2018-10-27 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] update git-http-backend doc for lighttpd

2018-10-27 Thread Glenn Strauss
use "GIT_HTTP_EXPORT_ALL" => "1" with a value for best compatiblity. lighttpd 1.4.51 setenv.add-environment does add vars with empty value. lighttpd setenv.set-environment does, but was only introduced in 1.4.46 git-http-backend may be found at /usr/libexec/git-core/git-http-backend scope

t7405.17 breakage vanishes with GETTEXT_POISON=1

2018-10-27 Thread Duy Nguyen
Something fishy is going on but I don't think I'll spend time hunting it down so I post here in case somebody else is interested. It might also indicate a problem with poison gettext, not the test case too. -- Duy

Re: Git Test Coverage Report (Saturday, Oct 27)

2018-10-27 Thread Derrick Stolee
On 10/27/2018 9:55 AM, Junio C Hamano wrote: Derrick Stolee writes: Uncovered in mater not in master@{1} Does this typo indicate that some part of the process to produce and send out this report involve manual editing? I kick off four builds with on

[PATCH v2 13/16] rebase-interactive: rewrite edit_todo_list() to handle the initial edit

2018-10-27 Thread Alban Gruin
edit_todo_list() is changed to work on a todo_list, and to handle the initial edition of the todo list (ie. making a backup of the todo list). It does not check for dropped commits yet, as todo_list_check() does not take the commits that have already been processed by the rebase (ie. the todo

[PATCH v2 06/16] sequencer: refactor sequencer_add_exec_commands() to work on a todo_list

2018-10-27 Thread Alban Gruin
This refactors sequencer_add_exec_commands() to work on a todo_list to avoid redundant reads and writes to the disk. An obvious way to do this would be to insert the `exec' command between the other commands, and reparse it once this is done. This is not what is done here. Instead, the command

[PATCH v2 14/16] sequencer: use edit_todo_list() in complete_action()

2018-10-27 Thread Alban Gruin
This changes complete_action() to use edit_todo_list(), now that it can handle the initial edit of the todo list. Signed-off-by: Alban Gruin --- sequencer.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/sequencer.c b/sequencer.c index

[PATCH v2 04/16] sequencer: introduce todo_list_write_to_file()

2018-10-27 Thread Alban Gruin
This introduce a new function to recreate the text of a todo list from its commands, and then to write it to the disk. This will be useful in the future, the buffer of a todo list won’t be treated as a strict mirror of the todo file by some of its functions once they will be refactored. This

[PATCH v2 09/16] sequencer: change complete_action() to use the refactored functions

2018-10-27 Thread Alban Gruin
complete_action() used functions that read the todo-list file, made some changes to it, and wrote it back to the disk. The previous commits were dedicated to separate the part that deals with the file from the actual logic of these functions. Now that this is done, we can call directly the

[PATCH v2 10/16] sequencer: refactor skip_unnecessary_picks() to work on a todo_list

2018-10-27 Thread Alban Gruin
This refactors skip_unnecessary_picks() to work on a todo_list. The file-handling logic is completely dropped here, as its only usage is made by complete_action(). Instead of truncating the todo list’s buffer, the items are moved to the beginning of the list, eliminating the need to reparse the

[PATCH v2 05/16] sequencer: refactor check_todo_list() to work on a todo_list

2018-10-27 Thread Alban Gruin
This refactors check_todo_list() to work on a todo_list to avoid redundant reads and writes to the disk. The function is renamed todo_list_check(). The parsing of the two todo lists is left to the caller. As rebase -p still need to check the todo list from the disk, a new function is

[PATCH v2 08/16] sequencer: make sequencer_make_script() write its script to a strbuf

2018-10-27 Thread Alban Gruin
This makes sequencer_make_script() write its script to a strbuf (ie. the buffer of a todo_list) instead of a FILE. This reduce the amount of read/write made by rebase interactive. Signed-off-by: Alban Gruin --- builtin/rebase--interactive.c | 13 +++- sequencer.c | 38

[PATCH v2 12/16] rebase-interactive: append_todo_help() changes

2018-10-27 Thread Alban Gruin
This moves the writing of the comment "Rebase $shortrevisions onto $shortonto ($command_count commands)" from complete_action() to append_todo_help(). shortrevisions, shortonto, and command_count are passed as parameters to append_todo_help(). During the initial edit of the todo list,

[PATCH v2 11/16] rebase-interactive: use todo_list_write_to_file() in edit_todo_list()

2018-10-27 Thread Alban Gruin
Just like complete_action(), edit_todo_list() used a function (transform_todo_file()) that read the todo list from the disk and wrote it back, resulting in useless disk accesses. This changes edit_todo_list() to call directly todo_list_write_to_file() instead. Signed-off-by: Alban Gruin ---

[PATCH v2 16/16] rebase--interactive: move transform_todo_file() to rebase--interactive.c

2018-10-27 Thread Alban Gruin
As transform_todo_file() is only needed inside of rebase--interactive.c, it is moved there from sequencer.c. Signed-off-by: Alban Gruin --- builtin/rebase--interactive.c | 20 sequencer.c | 20 sequencer.h | 1 - 3

[PATCH v2 15/16] sequencer: fix a call to error() in transform_todo_file()

2018-10-27 Thread Alban Gruin
This replaces a call to error() by a call to error_errno() after writing the content of the todo list to the disk in transform_todo_file(). Signed-off-by: Alban Gruin --- No changes since v1, was commit 14/15. sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 07/16] sequencer: refactor rearrange_squash() to work on a todo_list

2018-10-27 Thread Alban Gruin
This refactors rearrange_squash() to work on a todo_list to avoid redundant reads and writes. The function is renamed todo_list_rearrange_squash(). The old version created a new buffer, which was directly written to the disk. This new version creates a new item list by just memcpying items from

[PATCH v2 01/16] sequencer: changes in parse_insn_buffer()

2018-10-27 Thread Alban Gruin
This clears the number of items of a todo_list before parsing it to allow to parse the same list multiple times without issues. As its items are not dynamically allocated, or don’t need to allocate memory, no additionnal memory management is required here. Furthermore, if a line is invalid, the

[PATCH v2 03/16] sequencer: refactor transform_todos() to work on a todo_list

2018-10-27 Thread Alban Gruin
This refactors transform_todos() to work on a todo_list. The function is renamed todo_list_transform(). As rebase -p still need to check the todo list from the disk, a new function is introduced, transform_todo_file(). It is still used by complete_action() and edit_todo_list() for now, but they

[PATCH v2 00/16] sequencer: refactor functions working on a todo_list

2018-10-27 Thread Alban Gruin
At the center of the "interactive" part of the interactive rebase lies the todo list. When the user starts an interactive rebase, a todo list is generated, presented to the user (who then edits it using a text editor), read back, and then is checked and processed before the actual rebase takes

[PATCH v2 02/16] sequencer: make the todo_list structure public

2018-10-27 Thread Alban Gruin
This makes the structures todo_list and todo_item, and the functions todo_list_release() and parse_insn_buffer(), accessible outside of sequencer.c. Signed-off-by: Alban Gruin --- No changes since v1. sequencer.c | 66 + sequencer.h | 48

Re: Git Test Coverage Report (Saturday, Oct 27)

2018-10-27 Thread brian m. carlson
On Sat, Oct 27, 2018 at 09:27:21AM -0400, Derrick Stolee wrote: > In an effort to ensure new code is reasonably covered by the test suite, we > now have contrib/coverage-diff.sh to combine the gcov output from 'make > coverage-test ; make coverage-report' with the output from 'git diff A B' to >

<    1   2