[PATCH v2 15/22] delta-islands.c: remove the_repository references

2018-11-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/pack-objects.c | 4 ++-- delta-islands.c| 24 ++-- delta-islands.h| 9 ++--- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index c99ee79c31

[PATCH v2 04/22] list-objects.c: reduce the_repository references

2018-11-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- list-objects.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/list-objects.c b/list-objects.c index 0cfd646026..cf7f25bed3 100644 --- a/list-objects.c +++ b/list-objects.c @@ -123,7 +123,7 @@ static void process_tree_contents

[PATCH v2 17/22] line-log.c: remove the_repository reference

2018-11-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- line-log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/line-log.c b/line-log.c index d1d429d738..24e21731c4 100644 --- a/line-log.c +++ b/line-log.c @@ -479,7 +479,7 @@ static struct commit *check_single_commit(struct rev_info

[PATCH v2 14/22] cache-tree.c: remove the_repository references

2018-11-09 Thread Nguyễn Thái Ngọc Duy
t database to lookup_tree() but that ship has sailed. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/read-tree.c | 4 +++- builtin/rebase.c| 2 +- builtin/reset.c | 2 +- cache-tree.c| 26 +++--- cache-tree.h| 4 ++-- read-cache.c| 2 +-

[PATCH v2 08/22] sequencer.c: remove implicit dependency on the_index

2018-11-09 Thread Nguyễn Thái Ngọc Duy
the_repository is still present in this file, but total clean up will be done later. It's not the main focus of this patch. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/commit.c | 3 +- builtin/merge.c | 2 +- builtin/rebase--interactive.c | 4

[PATCH v2 22/22] rebase-interactive.c: remove the_repository references

2018-11-09 Thread Nguyễn Thái Ngọc Duy
While at there add a forward declaration for struct strbuf. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/rebase--interactive.c | 2 +- rebase-interactive.c | 6 +++--- rebase-interactive.h | 5 - 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/builtin

[PATCH v3 08/16] reflog: mark strings for translation

2018-11-09 Thread Nguyễn Thái Ngọc Duy
One string "nothing to delete?" is rephrased to be more helpful. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/reflog.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/builtin/reflog.c b/builtin/reflog.c index b5941c1ff3..

[PATCH v2] format-patch: respect --stat in cover letter's diffstat

2018-11-09 Thread Nguyễn Thái Ngọc Duy
to do here is drop the assignment. Reported-by: Laszlo Ersek Helped-by: Leif Lindholm Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/log.c | 2 -- t/t4052-stat-output.sh | 48 +- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a

[PATCH 03/22] list-objects-filter.c: remove implicit dependency on the_index

2018-11-09 Thread Nguyễn Thái Ngọc Duy
While at there, since we have access to struct repository now, eliminate the only the_repository reference in this file. Signed-off-by: Nguyễn Thái Ngọc Duy --- list-objects-filter.c | 10 +++--- list-objects-filter.h | 2 ++ list-objects.c| 9 ++--- 3 files changed, 15

[PATCH 00/22] Kill the_index part 5

2018-11-09 Thread Nguyễn Thái Ngọc Duy
blic-inbox.org/git/20181019145237.16079-1-pclo...@gmail.com/ Nguyễn Thái Ngọc Duy (22): wt-status.c: remove implicit dependency on the_index wt-status.c: remove implicit dependency the_repository list-objects-filter.c: remove implicit dependency on the_index list-objects.c: reduce the_repository referenc

[PATCH 01/22] wt-status.c: remove implicit dependency on the_index

2018-11-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/commit.c | 2 +- builtin/pull.c | 3 +- builtin/rebase.c | 7 +++-- sequencer.c | 8 ++--- wt-status.c | 76 +++- wt-status.h | 17 +++ 6 files changed, 66 insertions(+), 47

[PATCH v3 13/16] parse-options.c: turn some die() to BUG()

2018-11-09 Thread Nguyễn Thái Ngọc Duy
These two strings are clearly not for the user to see. Reduce the violence in one string while at there. Signed-off-by: Nguyễn Thái Ngọc Duy --- parse-options.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parse-options.c b/parse-options.c index 0bf817193d..3f5f985c1e

[PATCH 02/22] wt-status.c: remove implicit dependency the_repository

2018-11-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- ref-filter.c | 2 +- wt-status.c | 18 ++ wt-status.h | 4 +++- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index 0c45ed9d94..c4eaf30313 100644 --- a/ref-filter.c +++ b/ref-filter.c

[PATCH v3 11/16] repack: mark more strings for translation

2018-11-09 Thread Nguyễn Thái Ngọc Duy
Two strings are slightly updated to be consistent with the rest: die() starts with lowercase. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/repack.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/builtin/repack.c b/builtin/repack.c index

[PATCH v3 15/16] fsck: reduce word legos to help i18n

2018-11-09 Thread Nguyễn Thái Ngọc Duy
Thái Ngọc Duy --- builtin/fsck.c | 65 +++--- 1 file changed, 40 insertions(+), 25 deletions(-) diff --git a/builtin/fsck.c b/builtin/fsck.c index 06eb421720..1feb6142f4 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -52,16 +52,24 @@ static int

[PATCH v3 10/16] remote.c: mark messages for translation

2018-11-09 Thread Nguyễn Thái Ngọc Duy
The two strings are slightly modified to be consistent with the rest: die() and error() start with a lowercase. Signed-off-by: Nguyễn Thái Ngọc Duy --- remote.c | 43 ++- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/remote.c b/remote.c

[PATCH v3 12/16] parse-options: replace opterror() with optname()

2018-11-09 Thread Nguyễn Thái Ngọc Duy
if needed. But it has limitations, if the subject part has to change based on the rest of the sentence, that language is screwed. This is also why I try to avoid calling optname() when 'flags' is known in advance. Mark of these strings for translation as well while at there. Signed-off

[PATCH v3 05/16] read-cache.c: turn die("internal error") to BUG()

2018-11-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- read-cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/read-cache.c b/read-cache.c index d57958233e..0c37f4885e 100644 --- a/read-cache.c +++ b/read-cache.c @@ -316,7 +316,7 @@ static int ce_match_stat_basic(const struct

[PATCH v3 09/16] remote.c: turn some error() or die() to BUG()

2018-11-09 Thread Nguyễn Thái Ngọc Duy
The first error, "internal error", is clearly a BUG(). The second two are meant to catch calls with invalid parameters and should never happen outside the test suite. Signed-off-by: Nguyễn Thái Ngọc Duy --- remote.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) di

[PATCH v3 01/16] git.c: mark more strings for translation

2018-11-09 Thread Nguyễn Thái Ngọc Duy
One string is slightly updated to keep consistency with the rest: die() should begin with lowercase. Signed-off-by: Nguyễn Thái Ngọc Duy --- git.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/git.c b/git.c index adac132956..5fd30da093

[PATCH v3 14/16] parse-options.c: mark more strings for translation

2018-11-09 Thread Nguyễn Thái Ngọc Duy
One error is updated to start with lowercase to be consistent with the rest. Signed-off-by: Nguyễn Thái Ngọc Duy --- parse-options.c | 14 +++--- t/t0040-parse-options.sh | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/parse-options.c b/parse-options.c

[PATCH v3 07/16] read-cache.c: add missing colon separators

2018-11-09 Thread Nguyễn Thái Ngọc Duy
typechange_fmt and added_fmt should have a colon before "needs update". Align the statements to make it easier to read and see. Also drop the unnecessary (). Signed-off-by: Nguyễn Thái Ngọc Duy --- read-cache.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --

[PATCH v3 04/16] attr.c: mark more string for translation

2018-11-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- attr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/attr.c b/attr.c index 60d284796d..3770bc1a11 100644 --- a/attr.c +++ b/attr.c @@ -372,8 +372,8 @@ static struct match_attr *parse_attr_line(const char *line, const char *src

[PATCH v3 06/16] read-cache.c: mark more strings for translation

2018-11-09 Thread Nguyễn Thái Ngọc Duy
There are a couple other improvements on these strings as well: - add missing colon (as separator) - quote paths - provide more information on error messages - keep first word in lowercase Signed-off-by: Nguyễn Thái Ngọc Duy --- read-cache.c| 57

[PATCH v3 02/16] alias.c: mark split_cmdline_strerror() strings for translation

2018-11-09 Thread Nguyễn Thái Ngọc Duy
This function can be part of translated messages. To make sure we don't have a sentence with mixed languages, mark the strings for translation, but only use translated strings in places we know we will output translated strings. Signed-off-by: Nguyễn Thái Ngọc Duy --- alias.c

[PATCH v3 03/16] archive.c: mark more strings for translation

2018-11-09 Thread Nguyễn Thái Ngọc Duy
Two messages also print extra information to be more useful Signed-off-by: Nguyễn Thái Ngọc Duy --- archive.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/archive.c b/archive.c index 9d16b7fadf..d8f6e1ce30 100644 --- a/archive.c +++ b/archive.c @@ -385,12 +385,12

[PATCH v3 00/16] Mark more strings for translation

2018-11-09 Thread Nguyễn Thái Ngọc Duy
%s %s: %s"), + printable_type(obj), describe_object(obj), message); + return 1; + default: @@ */ if (!obj) { Nguyễn Thái Ngọc Duy (16): git.c: mark more strings for translation alias.c: mark split_cmdline_strerror(

[PATCH v3 16/16] fsck: mark strings for translation

2018-11-09 Thread Nguyễn Thái Ngọc Duy
Two die() are updated to start with lowercase to be consistent with the rest. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/fsck.c | 106 - t/t1410-reflog.sh | 6 +-- t/t1450-fsck.sh| 50 - t/t6050

[PATCH v2] format-patch: respect --stat in cover letter's diffstat

2018-11-07 Thread Nguyễn Thái Ngọc Duy
to do here is drop the assignment. Reported-by: Laszlo Ersek Helped-by: Leif Lindholm Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/log.c | 2 -- t/t4052-stat-output.sh | 48 +- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a

[PATCH/RFC] Support --append-trailer in cherry-pick and revert

2018-11-06 Thread Nguyễn Thái Ngọc Duy
re weights than just "machine generated tags". Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-cherry-pick.txt | 6 + Documentation/git-revert.txt | 6 + builtin/revert.c | 7 ++ sequencer.c | 39 ++

[PATCH v2 13/16] parse-options.c: turn some die() to BUG()

2018-11-05 Thread Nguyễn Thái Ngọc Duy
These two strings are clearly not for the user to see. Reduce the violence in one string while at there. Signed-off-by: Nguyễn Thái Ngọc Duy --- parse-options.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parse-options.c b/parse-options.c index 0bf817193d..3f5f985c1e

[PATCH v2 16/16] fsck: mark strings for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
Two die() are updated to start with lowercase to be consistent with the rest. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/fsck.c | 106 - t/t1410-reflog.sh | 6 +-- t/t1450-fsck.sh| 50 - t/t6050

[PATCH v2 12/16] parse-options: replace opterror() with optname()

2018-11-05 Thread Nguyễn Thái Ngọc Duy
#x27; is known in advance. Mark of these strings for translation as well while at there. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/merge.c | 2 +- builtin/revert.c| 3 ++- parse-options-cb.c | 7 --- parse-options.c | 46 +

[PATCH v2 15/16] fsck: reduce word legos to help i18n

2018-11-05 Thread Nguyễn Thái Ngọc Duy
Thái Ngọc Duy --- builtin/fsck.c | 62 ++ 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/builtin/fsck.c b/builtin/fsck.c index 06eb421720..504f47d7a4 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -52,16 +52,24 @@ static int

[PATCH v2 14/16] parse-options.c: mark more strings for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
One error is updated to start with lowercase to be consistent with the rest. Signed-off-by: Nguyễn Thái Ngọc Duy --- parse-options.c | 14 +++--- t/t0040-parse-options.sh | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/parse-options.c b/parse-options.c

[PATCH v2 09/16] remote.c: turn some error() or die() to BUG()

2018-11-05 Thread Nguyễn Thái Ngọc Duy
The first error, "internal error", is clearly a BUG(). The second two are meant to catch calls with invalid parameters and should never happen outside the test suite. Signed-off-by: Nguyễn Thái Ngọc Duy --- remote.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) di

[PATCH v2 10/16] remote.c: mark messages for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
The two strings are slightly modified to be consistent with the rest: die() and error() start with a lowercase. Signed-off-by: Nguyễn Thái Ngọc Duy --- remote.c | 43 ++- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/remote.c b/remote.c

[PATCH v2 06/16] read-cache.c: mark more strings for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
There are a couple other improvements on these strings as well: - add missing colon (as separator) - quote paths - provide more information on error messages - keep first word in lowercase Signed-off-by: Nguyễn Thái Ngọc Duy --- read-cache.c| 57

[PATCH v2 11/16] repack: mark more strings for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
Two strings are slightly updated to be consistent with the rest: die() starts with lowercase. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/repack.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/builtin/repack.c b/builtin/repack.c index

[PATCH v2 00/16] Mark more strings for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
v2 splits non-trivial changes out to keep i18n patches simpler. A few more word legos in fsck are removed. v2 also fixes a bug in fsck that makes it print object id incorrectly. Nguyễn Thái Ngọc Duy (16): git.c: mark more strings for translation alias.c: mark split_cmdline_strerror() strings

[PATCH v2 01/16] git.c: mark more strings for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
One string is slightly updated to keep consistency with the rest: die() should with lowercase. Signed-off-by: Nguyễn Thái Ngọc Duy --- git.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/git.c b/git.c index adac132956..5fd30da093 100644

[PATCH v2 07/16] read-cache.c: add missing colon separators

2018-11-05 Thread Nguyễn Thái Ngọc Duy
typechange_fmt and added_fmt should have a colon before "needs update". Align the statements to make it easier to read and see. Also drop the unnecessary (). Signed-off-by: Nguyễn Thái Ngọc Duy --- read-cache.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --

[PATCH v2 08/16] reflog: mark strings for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
One string "nothing to delete?" is rephrased to be more helpful. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/reflog.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/builtin/reflog.c b/builtin/reflog.c index b5941c1ff3..

[PATCH v2 04/16] attr.c: mark more string for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- attr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/attr.c b/attr.c index 60d284796d..3770bc1a11 100644 --- a/attr.c +++ b/attr.c @@ -372,8 +372,8 @@ static struct match_attr *parse_attr_line(const char *line, const char *src

[PATCH v2 05/16] read-cache.c: turn die("internal error") to BUG()

2018-11-05 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- read-cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/read-cache.c b/read-cache.c index d57958233e..0c37f4885e 100644 --- a/read-cache.c +++ b/read-cache.c @@ -316,7 +316,7 @@ static int ce_match_stat_basic(const struct

[PATCH v2 02/16] alias.c: mark split_cmdline_strerror() strings for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
This function can be part of translated messages. To make sure we don't have a sentence with mixed languages, mark the strings for translation, but only use translated strings in places we know we will output translated strings. Signed-off-by: Nguyễn Thái Ngọc Duy --- alias.c

[PATCH v2 03/16] archive.c: mark more strings for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
Two messages also print extra information to be more useful Signed-off-by: Nguyễn Thái Ngọc Duy --- archive.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/archive.c b/archive.c index 9d16b7fadf..d8f6e1ce30 100644 --- a/archive.c +++ b/archive.c @@ -385,12 +385,12

[PATCH/RFC v2] sequencer.c: record revert/cherry-pick commit with trailer lines

2018-11-04 Thread Nguyễn Thái Ngọc Duy
erts commit ..." and "(cherry picked from commit .." anymore, scripts that look for these lines will need to be updated to handle both. Fresh new history could just rely on git-interpret-trailers instead. Signed-off-by: Nguyễn Thái Ngọc Duy --- v2 adds the third syntax "~2&quo

[PATCH/RFC] sequencer.c: record revert/cherry-pick commit with trailer lines

2018-11-04 Thread Nguyễn Thái Ngọc Duy
ew trailer Revert: Similarly a cherry-picked commit with -x will have Cherry-Pick: Signed-off-by: Nguyễn Thái Ngọc Duy --- I think standardizing how we record commit ids in the commit message is a good idea. Though to be honest this started because of my irk of an English string &quo

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

2018-11-03 Thread Nguyễn Thái Ngọc Duy
and can be included. 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 where we will determine entries individually

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

2018-11-03 Thread Nguyễn Thái Ngọc Duy
and can be included. 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 where we will determine entries individually

[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

[PATCH v3 00/14] Reduce #ifdef NO_PTHREADS

2018-11-03 Thread Nguyễn Thái Ngọc Duy
ead-utils.h" #include "argv-array.h" @@ -143,6 +141,7 @@ struct async { int start_async(struct async *async); int finish_async(struct async *async); int in_async(void); +int async_with_fork(void); void check_pipe(int err); /** diff --git a/send-pack.c b/send-pack.c index e920ca57

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

2018-11-03 Thread Nguyễn Thái Ngọc Duy
bugs may sneak in. Make sure that all pthread_create() reports the error cause. While at there, mark these strings for translation if they aren't. Signed-off-by: Nguyễn Thái Ngọc Duy --- name-hash.c | 16 ++-- preload-index.c | 8 ++-- run-command.c | 2 +- 3 files ch

[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
() at least helps suggest that this special "close()" is related to async in fork mode. [1] 09c9957cf7 (send-pack: avoid deadlock when pack-object dies early - 2011-04-25) Signed-off-by: Nguyễn Thái Ngọc Duy --- run-command.c | 9 + run-command.h | 1 + send-pack.c | 5 ++--

[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 --- a/builtin

[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
t; are the default and must pay zero cost" and more as "threaded > platforms are the default, and non-threaded ones are OK to pay a > small cost as long as they still work". Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- thread-utils.c | 48 +

[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 +++ b/builtin

[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

[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 "fsmoni

[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
ncompatible option is specified. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/grep.c | 58 +++--- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/builtin/grep.c b/builtin/grep.c index 6dd15dbaa2..de3f568cee 100644 --- a/builtin/grep.c

[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
where. From now on outside compat/, thread-utils.h is the only place that includes pthread.h Signed-off-by: Nguyễn Thái Ngọc Duy --- run-command.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/run-command.h b/run-command.h index 3932420ec8..9b7f38202c 100644 --- a/run-comm

[PATCH] git-worktree.txt: correct linkgit command name

2018-11-02 Thread Nguyễn Thái Ngọc Duy
Noticed-by: SZEDER Gábor Signed-off-by: Nguyễn Thái Ngọc Duy --- On top of nd/per-worktree-ref-iteration Documentation/git-worktree.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index 9117e4fb50

[PATCH 02/12] alias.c: mark split_cmdline_strerror() strings for translation

2018-10-27 Thread Nguyễn Thái Ngọc Duy
This function can be part of translated messages. To make sure we don't have a sentence with mixed languages, mark the strings for translation, but only use translated strings in places we know we will output translated strings. Signed-off-by: Nguyễn Thái Ngọc Duy --- alias.c

[PATCH 03/12] archive.c: mark more strings for translation

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- archive.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/archive.c b/archive.c index 9d16b7fadf..757519a9d6 100644 --- a/archive.c +++ b/archive.c @@ -385,12 +385,12 @@ static void parse_treeish_arg(const char **argv

[PATCH 05/12] read-cache.c: mark more strings for translation

2018-10-27 Thread Nguyễn Thái Ngọc Duy
There are a couple other improvements on these strings as well: - add missing colon (as separator) - quote paths - provide more information on error messages - keep first word in lowercase - some die() become BUG() Signed-off-by: Nguyễn Thái Ngọc Duy --- read-cache.c| 63

[PATCH 00/12] Mark more strings for translation

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Not much to write here. I make a note whenever I see unstranslated strings during review and this is the result. There are some more code changes than just adding _() though, e.g. 10/12. Nguyễn Thái Ngọc Duy (12): git.c: mark more strings for translation alias.c: mark split_cmdline_strerror

[PATCH 04/12] attr.c: mark more string for translation

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attr.c b/attr.c index 60d284796d..4ebc169abe 100644 --- a/attr.c +++ b/attr.c @@ -372,7 +372,7 @@ static struct match_attr *parse_attr_line(const char *line, const char *src

[PATCH 01/12] git.c: mark more strings for translation

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- git.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/git.c b/git.c index adac132956..1ad565c5c8 100644 --- a/git.c +++ b/git.c @@ -338,27 +338,27 @@ static int handle_alias(int *argcp, const char

[PATCH 11/12] parse-options.c: mark more strings for translation

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- parse-options.c | 18 +- t/t0040-parse-options.sh | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/parse-options.c b/parse-options.c index 0bf817193d..949aac287f 100644 --- a/parse-options.c +++ b/parse

[PATCH 12/12] fsck: mark strings for translation

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/fsck.c | 113 - t/t1410-reflog.sh | 6 +- t/t1450-fsck.sh| 50 t/t6050-replace.sh | 4 +- t/t7415-submodule-names.sh | 6 +- 5 files changed, 94

[PATCH 06/12] read-cache.c: add missing colon separators

2018-10-27 Thread Nguyễn Thái Ngọc Duy
typechange_fmt and added_fmt should have a colon before "needs update". Align the statements to make it easier to read and see. Also drop the unnecessary (). Signed-off-by: Nguyễn Thái Ngọc Duy --- read-cache.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --

[PATCH 07/12] reflog: mark strings for translation

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/reflog.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/builtin/reflog.c b/builtin/reflog.c index b5941c1ff3..33cb20b7d8 100644 --- a/builtin/reflog.c +++ b/builtin/reflog.c @@ -13,11 +13,15

[PATCH 10/12] parse-options: replace opterror() with optname()

2018-10-27 Thread Nguyễn Thái Ngọc Duy
#x27; is known in advance. Mark of these strings for translation as well while at there. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/merge.c | 2 +- builtin/revert.c| 3 ++- parse-options-cb.c | 7 --- parse-options.c | 46 +

[PATCH 08/12] remote.c: mark messages for translation

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- remote.c | 49 + 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/remote.c b/remote.c index 81f4f01b00..11b33d1625 100644 --- a/remote.c +++ b/remote.c @@ -359,7 +359,7 @@ static int

[PATCH 09/12] repack: mark more strings for translation

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/repack.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/builtin/repack.c b/builtin/repack.c index c6a7943d5c..0af20fa0fc 100644 --- a/builtin/repack.c +++ b/builtin/repack.c @@ -197,7 +197,7

[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 +++ b/builtin

[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 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
the situation could change in the future and bugs may sneak in. Make sure that all pthread_create() checks and handles the result. While at there, mark these strings for translation if they aren't. Signed-off-by: Nguyễn Thái Ngọc Duy --- name-hash.c | 16 ++-- preload-index.c

[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 --- a/builtin

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

2018-10-27 Thread Nguyễn Thái Ngọc Duy
t; are the default and must pay zero cost" and more as "threaded > platforms are the default, and non-threaded ones are OK to pay a > small cost as long as they still work". Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- thread-utils.c | 48 +

[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 "fsmoni

[PATCH v2 00/10] Reduce #ifdef NO_PTHREADS

2018-10-27 Thread Nguyễn Thái Ngọc Duy
guyễn Thái Ngọc Duy (10): thread-utils: macros to unconditionally compile pthreads API index-pack: remove #ifdef NO_PTHREADS name-hash.c: remove #ifdef NO_PTHREADS attr.c: remove #ifdef NO_PTHREADS grep: remove #ifdef NO_PTHREADS preload-index.c: remove #ifdef NO_PTHREADS pack-ob

[PATCH] wildmatch: change behavior of "foo**bar" in WM_PATHNAME mode

2018-10-27 Thread Nguyễn Thái Ngọc Duy
because we can't really tell the user their pattern is invalid so that they can fix it. So instead, tolerate it and make '**' act like two regular '*'s (which is essentially the same as a single asterisk). This behavior seems more predictable. Noticed-by: dana Signe

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

2018-10-27 Thread Nguyễn Thái Ngọc Duy
t; are the default and must pay zero cost" and more as "threaded > platforms are the default, and non-threaded ones are OK to pay a > small cost as long as they still work". Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- thread-utils.c | 48 +

[PATCH 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 +++ b/builtin

[PATCH 00/10] Reduce #ifdef NO_PTHREADS

2018-10-27 Thread Nguyễn Thái Ngọc Duy
, to reduce some code duplication, but I tried to keep the change here minimal. [1] https://public-inbox.org/git/20181018180522.17642-1-pclo...@gmail.com/ Nguyễn Thái Ngọc Duy (10): thread-utils: macros to unconditionally compile pthreads API index-pack: remove #ifdef NO_PTHREADS name-hash.c

[PATCH 08/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 --- a/builtin

[PATCH 07/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 "fsmoni

[PATCH 09/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 10/10] Clean up pthread_create() error handling

2018-10-27 Thread Nguyễn Thái Ngọc Duy
the situation could change in the future and bugs may sneak in. Make sure that all pthread_create() checks and handles the result. While at there, mark these strings for translation if they aren't. Signed-off-by: Nguyễn Thái Ngọc Duy --- name-hash.c | 16 ++-- preload-index.c

<    5   6   7   8   9   10   11   12   13   14   >