[no subject]

2018-02-25 Thread Alfred Chow
Good Day, I am Mr. Alfred Cheuk Yu Chow, the Director for Credit & Marketing Chong Hing Bank, Hong Kong, Chong Hing Bank Center, 24 Des Voeux Road Central, Hong Kong. I have a business proposal of $ 38,980,369.00. All confirmable documents to back up the claims will be made available to you

[no subject]

2018-02-25 Thread Alfred Chow
Good Day, I am Mr. Alfred Cheuk Yu Chow, the Director for Credit & Marketing Chong Hing Bank, Hong Kong, Chong Hing Bank Centre, 24 Des Voeux Road Central, Hong Kong. I have a business proposal of $38,980,369.00. All confirmable documents to back up the claims will be made available to you

[no subject]

2018-02-25 Thread Alfred Chow
Good Day, I am Mr. Alfred Cheuk Yu Chow, the Director for Credit & Marketing Chong Hing Bank, Hong Kong, Chong Hing Bank Centre, 24 Des Voeux Road Central, Hong Kong. I have a business proposal of $38,980,369.00. All confirmable documents to back up the claims will be made available to you

Re: [PATCH v7 0/7] convert: add support for different encodings

2018-02-25 Thread Jeff King
On Sat, Feb 24, 2018 at 04:18:36PM +0100, Lars Schneider wrote: > > We always use the in-repo contents when generating 'diff'. I think > > by "attribute to be used in diff", what you are reallying after is > > to convert the in-repo contents to that encoding _BEFORE_ running > > 'diff' on it.

Re: [PATCH] revision.c: reduce object database queries

2018-02-25 Thread Jeff King
On Sun, Feb 25, 2018 at 08:30:48PM -0500, Jeff King wrote: > > diff --git a/revision.c b/revision.c > > index 5ce9b93..bc7def5 100644 > > --- a/revision.c > > +++ b/revision.c > > @@ -113,7 +113,8 @@ void mark_parents_uninteresting(struct commit *commit) > > * it is popped

Re: [PATCH] revision.c: reduce object database queries

2018-02-25 Thread Jeff King
On Sat, Feb 24, 2018 at 08:34:56PM -0500, Derrick Stolee wrote: > In mark_parents_uninteresting(), we check for the existence of an > object file to see if we should treat a commit as parsed. The result > is to set the "parsed" bit on the commit. > > Modify the condition to only check

[PATCH v2 33/36] sha1_file: convert read_sha1_file to struct object_id

2018-02-25 Thread brian m. carlson
Convert read_sha1_file to take a pointer to struct object_id and rename it read_object_file. Do the same for read_sha1_file_extended. Convert one use in grep.c to use the new function without any other code change, since the pointer being passed is a void pointer that is already initialized with

[PATCH v2 31/36] tree-walk: convert tree entry functions to object_id

2018-02-25 Thread brian m. carlson
Convert get_tree_entry and find_tree_entry to take pointers to struct object_id. Signed-off-by: brian m. carlson --- archive.c | 4 ++-- blame.c| 6 ++ builtin/rm.c | 2 +- builtin/update-index.c | 2 +- line-log.c

[PATCH v2 25/36] Convert remaining callers of sha1_object_info_extended to object_id

2018-02-25 Thread brian m. carlson
Convert the remaining caller of sha1_object_info_extended to use struct object_id. Introduce temporaries, which will be removed later, since there is a dependency loop between sha1_object_info_extended and lookup_replace_object_extended. This allows us to convert the code in a piecemeal fashion

[PATCH v2 21/36] builtin/mktree: convert to struct object_id

2018-02-25 Thread brian m. carlson
Convert this file to use struct object_id. Modify one use of get_sha1_hex into parse_oid_hex; this is safe since we get the data from a strbuf. Signed-off-by: brian m. carlson --- builtin/mktree.c | 24 1 file changed, 12 insertions(+), 12

[PATCH v2 05/36] resolve-undo: convert struct resolve_undo_info to object_id

2018-02-25 Thread brian m. carlson
Convert the sha1 member of this struct to be an array of struct object_id instead. This change is needed to convert find_unique_abbrev. Signed-off-by: brian m. carlson --- builtin/ls-files.c | 2 +- resolve-undo.c | 8 resolve-undo.h | 2 +- 3

[PATCH v2 28/36] builtin/notes: convert static functions to object_id

2018-02-25 Thread brian m. carlson
Convert the remaining static functions to take pointers to struct object_id. Signed-off-by: brian m. carlson --- builtin/notes.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/notes.c b/builtin/notes.c index

[PATCH v2 19/36] sha1_file: convert check_sha1_signature to struct object_id

2018-02-25 Thread brian m. carlson
Convert this function to take a pointer to struct object_id and rename it check_object_signature. Introduce temporaries to convert the return values of lookup_replace_object and lookup_replace_object_extended into struct object_id. The temporaries are needed because in order to convert

[PATCH v2 20/36] streaming: convert open_istream to use struct object_id

2018-02-25 Thread brian m. carlson
Signed-off-by: brian m. carlson --- archive-tar.c | 2 +- archive-zip.c | 2 +- builtin/index-pack.c | 2 +- builtin/pack-objects.c | 2 +- sha1_file.c| 2 +- streaming.c| 6 +++--- streaming.h| 2 +- 7 files

[PATCH v2 07/36] ref-filter: convert grab_objectname to struct object_id

2018-02-25 Thread brian m. carlson
This is necessary in order to convert find_unique_abbrev. Signed-off-by: brian m. carlson --- ref-filter.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index f9e25aea7a..9cbd92611c 100644 ---

[PATCH v2 26/36] sha1_file: convert sha1_object_info* to object_id

2018-02-25 Thread brian m. carlson
Convert sha1_object_info and sha1_object_info_extended to take pointers to struct object_id and rename them to use "oid" instead of "sha1" in their names. Update the declaration and definition and apply the following semantic patch, plus the standard object_id transforms: @@ expression E1, E2;

[PATCH v2 16/36] archive: convert sha1_file_to_archive to struct object_id

2018-02-25 Thread brian m. carlson
Convert this function to take a pointer to struct object_id and rename it object_file_to_archive. Signed-off-by: brian m. carlson --- archive-tar.c | 2 +- archive-zip.c | 4 ++-- archive.c | 10 +- archive.h | 8 4 files changed, 12

[PATCH v2 27/36] builtin/fmt-merge-msg: convert remaining code to object_id

2018-02-25 Thread brian m. carlson
We were using the util pointer, which is a pointer to void, as an unsigned char pointer. The pointer actually points to a struct origin_data, which has a struct object_id as its first member, which in turn has an unsigned char array as its first member, so this was valid. Since we want to convert

[PATCH v2 09/36] wt-status: convert struct wt_status_state to object_id

2018-02-25 Thread brian m. carlson
Convert the various *_sha1 members to use struct object_id instead. Signed-off-by: brian m. carlson --- wt-status.c | 12 ++-- wt-status.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/wt-status.c b/wt-status.c index

[PATCH v2 11/36] http-walker: convert struct object_request to use struct object_id

2018-02-25 Thread brian m. carlson
Convert struct object_request to use struct object_id by updating the definition and applying the following semantic patch, plus the standard object_id transforms: @@ struct object_request E1; @@ - E1.sha1 + E1.oid.hash @@ struct object_request *E1; @@ - E1->sha1 + E1->oid.hash Signed-off-by:

[PATCH v2 36/36] convert: convert to struct object_id

2018-02-25 Thread brian m. carlson
Convert convert.c to struct object_id. Add a use of the_hash_algo to replace hard-coded constants and change a strbuf_add to a strbuf_addstr to avoid another hard-coded constant. Note that a strict conversion using the hexsz constant would cause problems in the future if the internal and

[PATCH v2 08/36] strbuf: convert strbuf_add_unique_abbrev to use struct object_id

2018-02-25 Thread brian m. carlson
Convert the declaration and definition of strbuf_add_unique_abbrev to make it take a pointer to struct object_id. Predeclare the struct in strbuf.h, as cache.h includes strbuf.h before it declares the struct, and otherwise the struct declaration would have the wrong scope. Apply the following

[PATCH v2 10/36] Convert find_unique_abbrev* to struct object_id

2018-02-25 Thread brian m. carlson
Convert find_unique_abbrev and find_unique_abbrev_r to each take a pointer to struct object_id. Signed-off-by: brian m. carlson --- builtin/blame.c| 2 +- builtin/branch.c | 2 +- builtin/checkout.c | 6 +++--- builtin/describe.c | 4 ++--

[PATCH v2 24/36] packfile: convert unpack_entry to struct object_id

2018-02-25 Thread brian m. carlson
Convert unpack_entry and read_object to use struct object_id. --- packfile.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packfile.c b/packfile.c index 954e1fca11..e3b1db7dd5 100644 --- a/packfile.c +++ b/packfile.c @@ -1452,7 +1452,7 @@ struct

[PATCH v2 30/36] streaming: convert istream internals to struct object_id

2018-02-25 Thread brian m. carlson
Convert the various open_istream variants to take a pointer to struct object_id. Introduce a temporary, which will be removed later, to work around the fact that lookup_replace_object still returns a pointer to unsigned char. Signed-off-by: brian m. carlson ---

[PATCH v2 32/36] sha1_file: convert read_object_with_reference to object_id

2018-02-25 Thread brian m. carlson
Convert read_object_with_reference to take pointers to struct object_id. Update the internals of the function accordingly. Signed-off-by: brian m. carlson --- builtin/cat-file.c | 2 +- builtin/grep.c | 4 ++-- builtin/pack-objects.c | 2 +- cache.h

[PATCH v2 29/36] tree-walk: convert get_tree_entry_follow_symlinks internals to object_id

2018-02-25 Thread brian m. carlson
Convert the internals of this function to use struct object_id. This is one of the last remaining callers of read_sha1_file_extended that has not been converted yet. Signed-off-by: brian m. carlson --- tree-walk.c | 22 +++--- 1 file changed, 11

[PATCH v2 15/36] archive: convert write_archive_entry_fn_t to object_id

2018-02-25 Thread brian m. carlson
Convert the write_archive_entry_fn_t type to use a pointer to struct object_id. Convert various static functions in the tar and zip archivers also. Signed-off-by: brian m. carlson --- archive-tar.c | 28 ++-- archive-zip.c | 16

[PATCH v2 18/36] sha1_file: convert read_loose_object to use struct object_id

2018-02-25 Thread brian m. carlson
Signed-off-by: brian m. carlson --- builtin/fsck.c | 2 +- cache.h| 4 ++-- sha1_file.c| 10 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/builtin/fsck.c b/builtin/fsck.c index 9981db2263..57509a4eac 100644 ---

[PATCH v2 17/36] builtin/index-pack: convert struct ref_delta_entry to object_id

2018-02-25 Thread brian m. carlson
Convert this struct to use a member of type object_id. Convert various static functions as well. Signed-off-by: brian m. carlson --- builtin/index-pack.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git

[PATCH v2 14/36] builtin/mktag: convert to struct object_id

2018-02-25 Thread brian m. carlson
Signed-off-by: brian m. carlson --- builtin/mktag.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/builtin/mktag.c b/builtin/mktag.c index beb552847b..65bb41e3cd 100644 --- a/builtin/mktag.c +++ b/builtin/mktag.c @@ -18,13

[PATCH v2 23/36] sha1_file: convert retry_bad_packed_offset to struct object_id

2018-02-25 Thread brian m. carlson
Signed-off-by: brian m. carlson --- packfile.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packfile.c b/packfile.c index 7dbe8739d1..954e1fca11 100644 --- a/packfile.c +++ b/packfile.c @@ -1095,13 +1095,13 @@ static int

[PATCH v2 22/36] sha1_file: convert assert_sha1_type to object_id

2018-02-25 Thread brian m. carlson
Convert this function to take a pointer to struct object_id and rename it to assert_oid_type. Signed-off-by: brian m. carlson --- builtin/commit-tree.c | 2 +- cache.h | 2 +- commit.c | 2 +- sha1_file.c | 8 4 files

[PATCH v2 13/36] replace_object: convert struct replace_object to object_id

2018-02-25 Thread brian m. carlson
Convert the two members of this struct to be instances of struct object_id. Adjust the various functions in this file accordingly. Signed-off-by: brian m. carlson --- replace_object.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH v2 00/36] object_id part 12

2018-02-25 Thread brian m. carlson
This is the twelfth in a series of patches to convert various parts of the code to struct object_id. The primary changes here are to the sha1_file code, find_unique_abbrev, and lookup_replace_object. Due to the circular nature of converting the latter, there are several places where we briefly

[PATCH v2 06/36] tree: convert read_tree_recursive to struct object_id

2018-02-25 Thread brian m. carlson
Convert the callback functions for read_tree_recursive to take a pointer to struct object_id. Signed-off-by: brian m. carlson --- archive.c | 8 builtin/checkout.c | 4 ++-- builtin/log.c | 2 +- builtin/ls-tree.c | 8

[PATCH v2 02/36] builtin/write-tree: convert to struct object_id

2018-02-25 Thread brian m. carlson
This is needed to convert parts of the cache-tree code. Signed-off-by: brian m. carlson --- builtin/write-tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/write-tree.c b/builtin/write-tree.c index bd0a78aa3c..299a121531

[PATCH v2 04/36] cache-tree: convert remnants to struct object_id

2018-02-25 Thread brian m. carlson
Convert the remaining portions of cache-tree.c to use struct object_id. Convert several instances of 20 to use the_hash_algo instead. Signed-off-by: brian m. carlson --- cache-tree.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-)

[PATCH v2 12/36] send-pack: convert remaining functions to struct object_id

2018-02-25 Thread brian m. carlson
Convert the remaining function, feed_object, to use struct object_id. Signed-off-by: brian m. carlson --- send-pack.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/send-pack.c b/send-pack.c index 2112d3b27a..7350af8883 100644 ---

[PATCH v2 35/36] sha1_file: introduce a constant for max header length

2018-02-25 Thread brian m. carlson
There were several instances of 32 sprinkled throughout this file, all of which were used for allocating a buffer to store the header of an object. Introduce a constant, MAX_HEADER_LEN, for this purpose. Note that this constant is slightly larger than required; the longest possible header is 28

[PATCH v2 01/36] bulk-checkin: convert index_bulk_checkin to struct object_id

2018-02-25 Thread brian m. carlson
Convert the index_bulk_checkin function, and the static functions it calls, to use pointers to struct object_id. Signed-off-by: brian m. carlson --- bulk-checkin.c | 18 +- bulk-checkin.h | 2 +- sha1_file.c| 2 +- 3 files changed, 11

[PATCH v2 34/36] Convert lookup_replace_object to struct object_id

2018-02-25 Thread brian m. carlson
Convert both the argument and the return value to be pointers to struct object_id. Update the callers and their internals to deal with the new type. Remove several temporaries which are no longer needed. Signed-off-by: brian m. carlson --- builtin/mktag.c | 7

[PATCH v2 03/36] cache-tree: convert write_*_as_tree to object_id

2018-02-25 Thread brian m. carlson
Convert write_index_as_tree and write_cache_as_tree to use struct object_id. Signed-off-by: brian m. carlson --- builtin/am.c | 8 builtin/merge.c | 2 +- builtin/write-tree.c | 2 +- cache-tree.c | 10 +- cache-tree.h

[PATCH 1/2] wildmatch: add interface for precompiling wildmatch() patterns

2018-02-25 Thread Ævar Arnfjörð Bjarmason
Add the scaffolding necessary for precompiling wildmatch() patterns. There is currently no point in doing this with the wildmatch() function we have now, since it can't make any use of precompiling the pattern. But adding this interface and making use of it will make it easy to refactor the

[PATCH 2/2] wildmatch: use the new precompiling wildmatch()

2018-02-25 Thread Ævar Arnfjörð Bjarmason
Make some limited use of the wildmatch() interface for "precompiling" patterns, although the current implementation does not do this yet. The main hot codepath in dir.c is not being touched yet, but some other invocations where we repeatedly match the same glob against multiple strings have been

[PATCH 0/2] wildmatch precompilation interface

2018-02-25 Thread Ævar Arnfjörð Bjarmason
My recently landed wildmatch test series was in preperation for some more major wildmatch changes. Here's another series that prepares for bigger changes in wildmatch, it adds an interface to pre-compile the patterns. Right now there's no point in doing this, and it's harmless since none of the

Re: [PATCH v3 0/6] Fix initializing the_hash_algo

2018-02-25 Thread brian m. carlson
On Sun, Feb 25, 2018 at 06:18:34PM +0700, Nguyễn Thái Ngọc Duy wrote: > v3 refines v2 a bit more: > > - fix configure typo (and stray words in commit message) > - use repo_set_hash_algo() instead of reassigning the_hash_algo > - compare hash algos by format_id > - catch NULL hash algo, report

Re: [PATCH v2 5/5] Revert "repository: pre-initialize hash algo pointer"

2018-02-25 Thread brian m. carlson
On Sun, Feb 25, 2018 at 10:29:29AM +0700, Duy Nguyen wrote: > When I set unknown hash algo here, I think some test failed > mysteriously because it used rawsz field (which has value zero), it > didn't match some expectation, the code went to the error handling > path, which eventually failed with

Re: [PATCH v2 06/13] git-send-email: unconditionally use Net::{SMTP,Domain}

2018-02-25 Thread Eric Sunshine
On Sun, Feb 25, 2018 at 2:46 PM, Ævar Arnfjörð Bjarmason wrote: > The Net::SMTP and Net::Domain were both first released with perl > v5.7.3[1], since my d48b284183 ("perl: bump the required Perl version > to 5.8 from 5.6.[21]", 2010-09-24) we've depended on 5.8, so there's > no

Re: [PATCH v2 04/13] gitweb: hard-depend on the Digest::MD5 5.8 module

2018-02-25 Thread Eric Sunshine
On Sun, Feb 25, 2018 at 2:46 PM, Ævar Arnfjörð Bjarmason wrote: > Since my d48b284183 ("perl: bump the required Perl version to 5.8 from > 5.6.[21]", 2010-09-24), we've depended on 5.8, so there's no reason to > conditionally require Digest::MD5 anymore. It was released with

Re: [PATCH v8 7/7] convert: add round trip check based on 'core.checkRoundtripEncoding'

2018-02-25 Thread Eric Sunshine
On Sat, Feb 24, 2018 at 11:28 AM, wrote: > UTF supports lossless conversion round tripping and conversions between > UTF and other encodings are mostly round trip safe as Unicode aims to be > a superset of all other character encodings. However, certain encodings >

[PATCH v2 12/13] Makefile: add NO_PERL_CPAN_FALLBACKS knob

2018-02-25 Thread Ævar Arnfjörð Bjarmason
From: Todd Zullinger We include some perl modules which are not part of the core perl install, as a convenience. This allows us to rely on those modules in our perl-based tools and scripts without requiring users to install the modules from CPAN or their operating system

[PATCH v2 13/13] perl Git::LoadCPAN: emit better errors under NO_PERL_CPAN_FALLBACKS

2018-02-25 Thread Ævar Arnfjörð Bjarmason
Before my 20d2a30f8f ("Makefile: replace perl/Makefile.PL with simple make rules", 2017-12-10) on an OS package that removed the private-Error.pm copy we carried around manually removing the OS's Error.pm would yield: $ git add -p Can't locate Error.pm in @INC (you may need to install the

[PATCH v2 04/13] gitweb: hard-depend on the Digest::MD5 5.8 module

2018-02-25 Thread Ævar Arnfjörð Bjarmason
Since my d48b284183 ("perl: bump the required Perl version to 5.8 from 5.6.[21]", 2010-09-24), we've depended on 5.8, so there's no reason to conditionally require Digest::MD5 anymore. It was released with perl v5.7.3[1] The initial introduction of the dependency in e9fdd74e53 ("gitweb:

[PATCH v2 07/13] perl: update our ancient copy of Error.pm

2018-02-25 Thread Ævar Arnfjörð Bjarmason
The Error.pm shipped with Git as a fallback if there was no Error.pm on the system was released in April 2006. There's been dozens of releases since then, the latest at August 7, 2017. Let's update to that. I don't know of anything we need from this new release or which this fixes. This change is

[PATCH v2 11/13] perl: move the perl/Git/FromCPAN tree to perl/FromCPAN

2018-02-25 Thread Ævar Arnfjörð Bjarmason
Move the CPAN modules that have lived under perl/Git/FromCPAN since my 20d2a30f8f ("Makefile: replace perl/Makefile.PL with simple make rules", 2017-12-10) to perl/FromCPAN. A subsequent change will teach the Makefile to only install these copies of CPAN modules if a flag that distro packagers

[PATCH v2 08/13] perl: update our copy of Mail::Address

2018-02-25 Thread Ævar Arnfjörð Bjarmason
Update our copy of Mail::Address from 2.19 (Aug 22, 2017) to 2.20 (Jan 23, 2018). Like the preceding Error.pm update this is done simply to keep up-to-date with upstream, and as can be shown from the diff there's no functional changes. The updated source was retrieved from

[PATCH v2 10/13] perl: generalize the Git::LoadCPAN facility

2018-02-25 Thread Ævar Arnfjörð Bjarmason
Change the two wrappers that load from CPAN (local OS) or our own copy to do so via the same codepath. I added the Error.pm wrapper in 20d2a30f8f ("Makefile: replace perl/Makefile.PL with simple make rules", 2017-12-10), and shortly afterwards Matthieu Moy added a wrapper for Mail::Address in

[PATCH v2 05/13] Git.pm: hard-depend on the File::{Temp,Spec} modules

2018-02-25 Thread Ævar Arnfjörð Bjarmason
Since my d48b284183 ("perl: bump the required Perl version to 5.8 from 5.6.[21]", 2010-09-24), we've depended on 5.8, so there's no reason to conditionally require File::Temp and File::Spec anymore. They were first released with perl versions v5.6.1 and 5.00405, respectively. This code was

[PATCH v2 02/13] Git.pm: remove redundant "use strict" from sub-package

2018-02-25 Thread Ævar Arnfjörð Bjarmason
In Perl the "use strict/warnings" pragmas are lexical, thus there's no reason to do: package Foo; use strict; package Bar; use strict; $x = 5; To satisfy the desire that the undeclared $x variable will be spotted at compile-time. It's enough to include the first "use strict".

[PATCH v2 03/13] Git.pm: add the "use warnings" pragma

2018-02-25 Thread Ævar Arnfjörð Bjarmason
Amend Git.pm to load the "warnings" pragma like the rest of the code in perl/ in addition to the existing "strict" pragma. This is considered the bare minimum best practice in Perl. Ever since this code was introduced in b1edc53d06 ("Introduce Git.pm (v4)", 2006-06-24) it's only been using

[PATCH v2 09/13] perl: move CPAN loader wrappers to another namespace

2018-02-25 Thread Ævar Arnfjörð Bjarmason
Move the Git::Error and Git::Mail::Address wrappers to the Git::LoadCPAN::Loader::* namespace, e.g. Git::LoadCPAN::Error. That module will then either load Error from CPAN (if installed on the OS), or use Git::FromCPAN::Error. When I added the Error wrapper in 20d2a30f8f ("Makefile: replace

[PATCH v2 00/13] various perl fixes

2018-02-25 Thread Ævar Arnfjörð Bjarmason
Addresses comments against v1, and ships with a new NO_PERL_CPAN_FALLBACKS knob (thanks Todd!) which distributions can turn on to not get our FromCPAN copies. Details below. Todd Zullinger (1): Makefile: add NO_PERL_CPAN_FALLBACKS knob Some of this was split off into into my "perl: move the

[PATCH v2 01/13] perl: *.pm files should not have the executable bit

2018-02-25 Thread Ævar Arnfjörð Bjarmason
The Git::Mail::Address file added in bd869f67b9 ("send-email: add and use a local copy of Mail::Address", 2018-01-05) had the executable bit set. That bit should not be set for *.pm files. It breaks nothing but it is redundant and confusing as none of the other files have it and these files are

[PATCH v2 06/13] git-send-email: unconditionally use Net::{SMTP,Domain}

2018-02-25 Thread Ævar Arnfjörð Bjarmason
The Net::SMTP and Net::Domain were both first released with perl v5.7.3[1], since my d48b284183 ("perl: bump the required Perl version to 5.8 from 5.6.[21]", 2010-09-24) we've depended on 5.8, so there's no reason to conditionally require this anymore. This conditional loading was initially added

RE: [PATCH 3/8] perl: generalize the Git::LoadCPAN facility

2018-02-25 Thread Randall S. Becker
On February 25, 2018 1:57 PM, Ævar Arnfjörð Bjarmason wrote: > On Wed, Feb 14 2018, Jonathan Nieder jotted: > > > Ævar Arnfjörð Bjarmason wrote: > > > >> Change the two wrappers to load from CPAN (local OS) or our own copy > >> to do so via the same codepath. > > > > nit: I think with s/to

Re: [PATCH 1/8] perl: *.pm files should not have the executable bit

2018-02-25 Thread Ævar Arnfjörð Bjarmason
On Wed, Feb 14 2018, Jonathan Nieder jotted: > Hi, > > Ævar Arnfjörð Bjarmason wrote: > >> The Git::Mail::Address file added in bd869f67b9 ("send-email: add and >> use a local copy of Mail::Address", 2018-01-05) had the executable bit >> set, this should not be the case with *.pm files, it

Re: [PATCH 3/8] perl: generalize the Git::LoadCPAN facility

2018-02-25 Thread Ævar Arnfjörð Bjarmason
On Wed, Feb 14 2018, Jonathan Nieder jotted: > Ævar Arnfjörð Bjarmason wrote: > >> Change the two wrappers to load from CPAN (local OS) or our own copy >> to do so via the same codepath. > > nit: I think with s/to load/that load/ this will be easier to read. > >> I added the Error.pm wrapper in

ref-filter: how to improve the code

2018-02-25 Thread Оля Тележная
Hi everyone, I am trying to remove cat-file formatting part and reuse same functionality from ref-filter. I have a problem that cat-file sometimes needs to continue running even if the request is broken, while in ref-filter we invoke die() in many places everywhere during formatting process. I

[PATCH v1.1] t: prevent '-x' tracing from interfering with test helpers' stderr

2018-02-25 Thread SZEDER Gábor
Running a test script with '-x' turns on 'set -x' tracing, the output of which is normally sent to stderr. This causes a lot of test failures, because many tests redirect and verify the stderr of shell functions, most frequently that of 'test_must_fail'. These issues were worked around somewhat

[PATCH] perf: use GIT_PERF_REPEAT_COUNT=3 by default even without config file

2018-02-25 Thread René Scharfe
9ba95ed23c (perf/run: update get_var_from_env_or_config() for subsections) stopped setting a default value for GIT_PERF_REPEAT_COUNT if no perf config file is present, because get_var_from_env_or_config returns early in that case. Fix it by setting the default value after calling this function.

Re: [PATCH v8 4/7] utf8: add function to detect a missing UTF-16/32 BOM

2018-02-25 Thread Lars Schneider
> On 25 Feb 2018, at 04:52, Eric Sunshine wrote: > > On Sat, Feb 24, 2018 at 11:27 AM, wrote: >> If the endianness is not defined in the encoding name, then let's >> be strict and require a BOM to avoid any encoding confusion. The >>

Re: [PATCH v8 3/7] utf8: add function to detect prohibited UTF-16/32 BOM

2018-02-25 Thread Lars Schneider
> On 25 Feb 2018, at 04:41, Eric Sunshine wrote: > > On Sat, Feb 24, 2018 at 11:27 AM, wrote: >> Whenever a data stream is declared to be UTF-16BE, UTF-16LE, UTF-32BE >> or UTF-32LE a BOM must not be used [1]. The function returns true if

[PATCH v3 0/6] Fix initializing the_hash_algo

2018-02-25 Thread Nguyễn Thái Ngọc Duy
v3 refines v2 a bit more: - fix configure typo (and stray words in commit message) - use repo_set_hash_algo() instead of reassigning the_hash_algo - compare hash algos by format_id - catch NULL hash algo, report nicely and suggest GIT_HASH_FIXUP The last point makes me much happier about keeping

[PATCH v3 1/6] setup.c: initialize the_repository correctly in all cases

2018-02-25 Thread Nguyễn Thái Ngọc Duy
There are many ways for any command to access a git repository: - most of them will try to discover the .git dir via setup_git_directory() and friends - the server side programs already know where the repo is and prepare with enter_repo() - special commands that deal with repo creation

[PATCH v3 2/6] sha1_file.c: keep a good name for "unknown" hash_algos[UNKNOWN]

2018-02-25 Thread Nguyễn Thái Ngọc Duy
This is mostly for displaying the hash algorithm name when we report errors. Printing "unknown" with '%s' is much better than '(null)' in glibc printf version (and probably could crash if other implementations do not check for NULL pointer) Signed-off-by: Nguyễn Thái Ngọc Duy

[PATCH v3 4/6] index-pack: check (and optionally set) hash algo based on input file

2018-02-25 Thread Nguyễn Thái Ngọc Duy
After 454253f059 (builtin/index-pack: improve hash function abstraction - 2018-02-01), index-pack uses the_hash_algo for hashing. If "git index-pack" is executed without a repository, we do not know what hash algorithm to be used and the_hash_algo in theory could be undefined. Since there should

[PATCH v3 3/6] cache.h: make the_hash_algo read-only

2018-02-25 Thread Nguyễn Thái Ngọc Duy
By returning an R-value in the_hash_algo we make sure people can't accidentally change hash algorithm with the_hash_algo = _algos[something]; and go with repo_set_hash_algo() instead. Of course they can still do the_repository->hash_algo = ... but that is more obvious and easily caught

[PATCH v3 6/6] Revert "repository: pre-initialize hash algo pointer"

2018-02-25 Thread Nguyễn Thái Ngọc Duy
This reverts commit e26f7f19b6c7485f04234946a59ab8f4fd21d6d1. The root problem, git clone not setting up the_hash_algo, has been fixed in the previous patch. Since this is a dangerous move and could potentially break stuff after release (and leads to workaround like the reverted commit), the

[PATCH v3 5/6] diff.c: initialize hash algo when running in --no-index mode

2018-02-25 Thread Nguyễn Thái Ngọc Duy
Our "git diff" command supports running as a standalone tool. In this code path, we try to hash the file content but after 18e2588e11 (sha1_file: switch uses of SHA-1 to the_hash_algo - 2018-02-01), there is a chance that the_hash_algo (required by index_path) may still be uninitialized if no

Re: [PATCH v4 00/12] rebase -i: offer to recreate merge commits

2018-02-25 Thread Jacob Keller
On Fri, Feb 23, 2018 at 4:35 AM, Johannes Schindelin wrote: > Changes since v3: > > - fixed a grammar error in "introduce the `merge` command"'s commit message. > > - fixed a couple of resource leaks in safe_append() and do_reset(), pointed > out by Eric Sunshine. >