[PATCH v2 01/42] cache: add a function to read an object ID from a buffer

2018-05-01 Thread brian m. carlson
In various places throughout the codebase, we need to read data into a struct object_id from a pack or other unsigned char buffer. Add an inline function that does this based on the current hash algorithm in use, and use it in several places. Signed-off-by: brian m. carlson <s

Re: [PATCH] format-patch: make cover letters always text/plain

2018-05-01 Thread brian m. carlson
On Mon, Apr 30, 2018 at 09:53:33PM -0400, Eric Sunshine wrote: > On Mon, Apr 30, 2018 at 8:02 PM, brian m. carlson > <sand...@crustytoothpaste.net> wrote: > > When formatting a series of patches using --attach and --cover-letter, > > the cover letter lacks the closing MIME

Re: [PATCH 08/41] packfile: abstract away hash constant values

2018-05-01 Thread brian m. carlson
On Tue, May 01, 2018 at 12:22:43PM +0200, Duy Nguyen wrote: > On Mon, Apr 23, 2018 at 11:39:18PM +0000, brian m. carlson wrote: > > There are several instances of the constant 20 and 20-based values in > > the packfile code. Abstract away dependence on SHA-1 by using the

Re: [PATCH 01/41] cache: add a function to read an object ID from a buffer

2018-05-01 Thread brian m. carlson
On Tue, May 01, 2018 at 11:36:03AM +0200, Duy Nguyen wrote: > On Mon, Apr 23, 2018 at 11:39:11PM +0000, brian m. carlson wrote: > > diff --git a/cache.h b/cache.h > > index bbaf5c349a..4bca177cf3 100644 > > --- a/cache.h > > +++ b/cache.h > > @@ -1008,6 +1008,11 @@

Re: [PATCH 31/41] wt-status: convert two uses of EMPTY_TREE_SHA1_HEX

2018-04-30 Thread brian m. carlson
d the rest of them) in it. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH 0/9] get_short_oid UI improvements

2018-04-30 Thread brian m. carlson
e As mentioned, I'm a bit unsure that patches 7 and 8 are entirely correct. I've mostly convinced myself that they are after looking at peel_onion, but I'm still harboring lingering doubts for some reason. The rest of the series looked fine to me. Thanks for cleaning up my stray newline. -- bri

Re: [PATCH 7/9] get_short_oid / peel_onion: ^{tree} should mean tree, not treeish

2018-04-30 Thread brian m. carlson
J_BLOB) > lookup_flags |= GET_OID_BLOB; > I was concerned at first that this might lead to some sort of wrong behavior when we do something like "git rev-parse v2.17.0^{tree}", but looking at the code I've mostly convinced myself that that should still work. -- brian m. car

[PATCH] format-patch: make cover letters always text/plain

2018-04-30 Thread brian m. carlson
is not very useful, always emit it as text/plain, avoiding the boundary problem altogether. Reported-by: Patrick Hemmer <g...@stormcloud9.net> Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/log.c | 2 +- log-tree.c | 7 ---

Re: [PATCH 00/41] object_id part 13

2018-04-30 Thread brian m. carlson
On Mon, Apr 30, 2018 at 08:03:12PM +0200, Duy Nguyen wrote: > On Tue, Apr 24, 2018 at 1:39 AM, brian m. carlson > <sand...@crustytoothpaste.net> wrote: > > [0] I can synthesize blobs, trees, and commits, but things are currently > > totally broken, which is, I suppose, to

Re: Bug: format-patch MIME boundary not added to cover letter when attach enabled

2018-04-30 Thread brian m. carlson
ry, but I think you make a good argument that perhaps omitting the entire multipart portion would be better. I'll have to work on this after work, so expect a patch later today. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: Bug: format-patch MIME boundary not added to cover letter when attach enabled

2018-04-29 Thread brian m. carlson
> clients (Thunderbird in my case) to discard the message body. > This is experienced with git 2.16.3. Thanks for reporting this. I can confirm this with a reasonably recent next. Let me see if I can come up with a patch. -- brian m. carlson: Houston, Texas, US OpenPGP: https://ke

Re: [PATCH 18/41] index-pack: abstract away hash function constant

2018-04-27 Thread brian m. carlson
data? That doesn't seem like a good idea. But also, some of the candidates we're considering for NewHash are actually faster than SHA-1. So for performance reasons alone, it might be useful to adopt a consistent scheme. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: What's cooking in git.git (Apr 2018, #03; Wed, 25)

2018-04-25 Thread brian m. carlson
member in struct object_context > - server-info: remove unused members from struct pack_info > - cache: add a function to read an object ID from a buffer > > Conversion from uchar[20] to struct object_id continues. I do plan to reroll this, and if you want to forge my sign-off on the pat

Re: [PATCH 25/41] builtin/receive-pack: avoid hard-coded constants for push certs

2018-04-24 Thread brian m. carlson
On Tue, Apr 24, 2018 at 11:58:17AM +0200, Martin Ågren wrote: > On 24 April 2018 at 01:39, brian m. carlson > > diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c > > index c4272fbc96..5f35596c14 100644 > > --- a/builtin/receive-pack.c > > +++ b/builtin/re

Re: [PATCH 21/41] http: eliminate hard-coded constants

2018-04-24 Thread brian m. carlson
k\n")) { > >> + get_sha1_hex(data + i + 6, hash); > >> + fetch_and_setup_pack_index(packs_head, > >> hash, > >> base_url); > >> i += 51; > > > > s/51/hexsz + 11/ ? > > Quite right. Good point. Will fix. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH 18/41] index-pack: abstract away hash function constant

2018-04-24 Thread brian m. carlson
On Tue, Apr 24, 2018 at 11:50:16AM +0200, Martin Ågren wrote: > On 24 April 2018 at 01:39, brian m. carlson > <sand...@crustytoothpaste.net> wrote: > > The code for reading certain pack v2 offsets had a hard-coded 5 > > representing the number of uint32_t words tha

Re: [PATCH 41/41] merge-one-file: compute empty blob object ID

2018-04-23 Thread brian m. carlson
On Tue, Apr 24, 2018 at 03:00:55AM +0200, SZEDER Gábor wrote: > > This script hard-codes the object ID of the empty tree. To avoid any > > s/tree/blob/ > > > problems when changing hashes, compute this value by calling git > > hash-object. > > Missing signof

Re: [PATCH 9/9] cache.h: allow sha1_object_info to handle arbitrary repositories

2018-04-23 Thread brian m. carlson
se functions. Ah, yes, I remember that recursive call chain. Anyway, other than the one item I mentioned earlier, this series looked good to me. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH 2/9] cache.h: add repository argument to oid_object_info

2018-04-23 Thread brian m. carlson
ing the macro to definition to > > #define sha1_object_info(r, sha1, size) \ > (r, sha1_object_info_##r(sha1, size)). I think you may have wanted to write "oid_object_info" here. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

[PATCH 08/41] packfile: abstract away hash constant values

2018-04-23 Thread brian m. carlson
it should expect. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- packfile.c | 66 ++ 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/packfile.c b/packfile.c index 84acd405e0..b7bc4eab17 100644 --- a/packfile.c

[PATCH 11/41] tree-walk: avoid hard-coded 20 constant

2018-04-23 Thread brian m. carlson
Use the_hash_algo to look up the length of our current hash instead of hard-coding the value 20. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- tree-walk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tree-walk.c b/tree-walk.c index e11b

[PATCH 12/41] tree-walk: convert get_tree_entry_follow_symlinks to object_id

2018-04-23 Thread brian m. carlson
Since the only caller of this function already uses struct object_id, update get_tree_entry_follow_symlinks to use it in parameters and internally. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- sha1_name.c | 4 ++-- tree-walk.c | 16 tree-walk.h | 2

[PATCH 10/41] pack-redundant: abstract away hash algorithm

2018-04-23 Thread brian m. carlson
Instead of using hard-coded instances of the constant 20, use the_hash_algo to look up the correct constant. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/pack-redundant.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/builti

[PATCH 15/41] split-index: convert struct split_index to object_id

2018-04-23 Thread brian m. carlson
Convert the base_sha1 member of struct split_index to use struct object_id and rename it base_oid. Include cache.h to make the structure visible. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/rev-parse.c | 4 ++-- read-cache.c

[PATCH 18/41] index-pack: abstract away hash function constant

2018-04-23 Thread brian m. carlson
The code for reading certain pack v2 offsets had a hard-coded 5 representing the number of uint32_t words that we needed to skip over. Specify this value in terms of a value from the_hash_algo. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/index-pack.c | 3

[PATCH 14/41] submodule-config: convert structures to object_id

2018-04-23 Thread brian m. carlson
Convert struct submodule and struct parse_config_parameter to use struct object_id. Adjust the functions which take members of these structures as arguments to also use struct object_id. Include cache.h into submodule-config.h to make struct object_id visible. Signed-off-by: brian m. carlson

[PATCH 19/41] commit: convert uses of get_sha1_hex to get_oid_hex

2018-04-23 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- commit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commit.c b/commit.c index ca474a7c11..9617f85caa 100644 --- a/commit.c +++ b/commit.c @@ -331,7 +331,7 @@ int parse_commit_buffer(struct commit

[PATCH 05/41] packfile: convert has_sha1_pack to object_id

2018-04-23 Thread brian m. carlson
Convert this function to take a pointer to struct object_id and rename it has_object_pack for consistency with has_object_file. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/count-objects.c | 2 +- builtin/fsck.c | 2 +- builtin/prune-packed.

[PATCH 26/41] builtin/am: convert uses of EMPTY_TREE_SHA1_BIN to the_hash_algo

2018-04-23 Thread brian m. carlson
Convert several uses of EMPTY_TREE_SHA1_BIN to use the_hash_algo and struct object_id instead. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/am.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/am.c b/builtin/am.c index 9c82

[PATCH 24/41] diff: specify abbreviation size in terms of the_hash_algo

2018-04-23 Thread brian m. carlson
Instead of using hard-coded 40 constants, refer to the_hash_algo for the current hash size. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- diff.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/diff.c b/diff.c index 314c

[PATCH 13/41] fsck: convert static functions to struct object_id

2018-04-23 Thread brian m. carlson
Convert two static functions to use struct object_id and parse_oid_hex, instead of relying on harcoded 20 and 40-based constants. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- fsck.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff

[PATCH 32/41] builtin/receive-pack: convert one use of EMPTY_TREE_SHA1_HEX

2018-04-23 Thread brian m. carlson
Convert one use of EMPTY_TREE_SHA1_HEX to use oid_to_hex and the_hash_algo to avoid a dependency on a given hash algorithm. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/receive-pack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b

[PATCH 31/41] wt-status: convert two uses of EMPTY_TREE_SHA1_HEX

2018-04-23 Thread brian m. carlson
-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- wt-status.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wt-status.c b/wt-status.c index 50815e5faf..857724bd60 100644 --- a/wt-status.c +++ b/wt-status.c @@ -600,10 +600,11 @@ stati

[PATCH 41/41] merge-one-file: compute empty blob object ID

2018-04-23 Thread brian m. carlson
This script hard-codes the object ID of the empty tree. To avoid any problems when changing hashes, compute this value by calling git hash-object. --- git-merge-one-file.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh index

[PATCH 37/41] dir: use the_hash_algo for empty blob object ID

2018-04-23 Thread brian m. carlson
To ensure that we are hash algorithm agnostic, use the_hash_algo to look up the object ID for the empty blob instead of using the empty_tree_oid variable. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 27/41] builtin/merge: switch tree functions to use object_id

2018-04-23 Thread brian m. carlson
The read_empty and reset_hard functions are static and their callers have already changed to use struct object_id, so convert them as well. To avoid dependency on the hash algorithm in use, switch from using EMPTY_TREE_SHA1_HEX to using oid_to_hex with the_hash_algo. Signed-off-by: brian m

[PATCH 33/41] builtin/reset: convert use of EMPTY_TREE_SHA1_BIN

2018-04-23 Thread brian m. carlson
Convert the last use of EMPTY_TREE_SHA1_BIN to use a direct copy from the_hash_algo->empty_tree to avoid a dependency on a given hash algorithm. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

[PATCH 35/41] cache-tree: use is_empty_tree_oid

2018-04-23 Thread brian m. carlson
When comparing an object ID against that of the empty tree, use the is_empty_tree_oid function to ensure that we abstract over the hash algorithm properly. In addition, this is more readable than a plain oidcmp. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- cache-tree

[PATCH 29/41] sequencer: convert one use of EMPTY_TREE_SHA1_HEX

2018-04-23 Thread brian m. carlson
Convert one use of EMPTY_TREE_SHA1_HEX to use oid_to_hex and the_hash_algo to avoid a dependency on a given hash algorithm. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- sequencer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sequenc

[PATCH 23/41] upload-pack: replace use of several hard-coded constants

2018-04-23 Thread brian m. carlson
the need for constants and simplify the code at the same time. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- upload-pack.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/upload-pack.c b/upload-pack.c index 4a82602be5..0858527c5b

[PATCH 17/41] pack-redundant: convert linked lists to use struct object_id

2018-04-23 Thread brian m. carlson
Convert struct llist_item and the rest of the linked list code to use struct object_id. Add a use of GIT_MAX_HEXSZ to avoid a dependency on a hard-coded constant. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/pack-redundant.

[PATCH 36/41] sequencer: use the_hash_algo for empty tree object ID

2018-04-23 Thread brian m. carlson
To ensure that we are hash algorithm agnostic, use the_hash_algo to look up the object ID for the empty tree instead of using the empty_tree_oid variable. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 21/41] http: eliminate hard-coded constants

2018-04-23 Thread brian m. carlson
Use the_hash_algo to find the right size for parsing pack names. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- http.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/http.c b/http.c index 3034d10b68..ec70676748 100644 --- a/http.c +++ b/

[PATCH 39/41] Update shell scripts to compute empty tree object ID

2018-04-23 Thread brian m. carlson
Several of our shell scripts hard-code the object ID of the empty tree. To avoid any problems when changing hashes, compute this value on startup of the script. For performance, store the value in a variable and reuse it throughout the life of the script. Signed-off-by: brian m. carlson <s

[PATCH 04/41] packfile: remove unused member from struct pack_entry

2018-04-23 Thread brian m. carlson
The sha1 member in struct pack_entry is unused except for one instance in which we store a value in it. Since nobody ever reads this value, don't bother to compute it and remove the member from struct pack_entry. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- cache.h

[PATCH 07/41] packfile: convert find_pack_entry to object_id

2018-04-23 Thread brian m. carlson
Convert find_pack_entry and the static function fill_pack_entry to take pointers to struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- packfile.c | 12 ++-- packfile.h | 2 +- sha1_file.c | 6 +++--- 3 files changed, 10 insertions(+), 10 del

[PATCH 22/41] revision: replace use of hard-coded constants

2018-04-23 Thread brian m. carlson
Replace two uses of the hard-coded constant 40 with references to the_hash_algo. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- revision.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/revision.c b/revision.c index ce0e7b71f2..daf7fe6ff4

[PATCH 28/41] merge: convert empty tree constant to the_hash_algo

2018-04-23 Thread brian m. carlson
To avoid dependency on a particular hash algorithm, convert a use of EMPTY_TREE_SHA1_HEX to use the_hash_algo->empty_tree instead. Since both branches now use oid_to_hex, condense the if statement into a ternary. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- me

[PATCH 09/41] pack-objects: abstract away hash algorithm

2018-04-23 Thread brian m. carlson
Instead of using hard-coded instances of the constant 20, use the_hash_algo to look up the correct constant. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/pack-objects.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-)

[PATCH 20/41] dir: convert struct untracked_cache_dir to object_id

2018-04-23 Thread brian m. carlson
Convert the exclude_sha1 member of struct untracked_cache_dir and rename it to exclude_oid. Eliminate several hard-coded integral constants, and update a function name that referred to SHA-1. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> ---

[PATCH 02/41] server-info: remove unused members from struct pack_info

2018-04-23 Thread brian m. carlson
The head member of struct pack_info is completely unused and the nr_heads member is used only in one place, which is an assignment. Since these structure members are not useful, remove them. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- server-info.c | 3 --- 1 file c

[PATCH 03/41] Remove unused member in struct object_context

2018-04-23 Thread brian m. carlson
The tree member of struct object_context is unused except in one place where we write to it. Since there are no users of this member, remove it. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- cache.h | 1 - sha1_name.c | 1 - 2 files changed, 2 deletions(-) diff

[PATCH 38/41] sha1_file: only expose empty object constants through git_hash_algo

2018-04-23 Thread brian m. carlson
There really isn't any case in which we want to expose the constants for empty trees and blobs outside of using the hash algorithm abstraction. Make these constants static and stop exposing the defines in cache.h. Remove the constants which are no longer in use. Signed-off-by: brian m. carlson

[PATCH 30/41] submodule: convert several uses of EMPTY_TREE_SHA1_HEX

2018-04-23 Thread brian m. carlson
Convert several uses of EMPTY_TREE_SHA1_HEX to use oid_to_hex and the_hash_algo to avoid a dependency on a given hash algorithm. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- submodule.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/submodu

[PATCH 25/41] builtin/receive-pack: avoid hard-coded constants for push certs

2018-04-23 Thread brian m. carlson
and its length and validity are entirely controlled by the server. Consequently, defer updating this code until that point. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/receive-pack.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/b

[PATCH 16/41] Update struct index_state to use struct object_id

2018-04-23 Thread brian m. carlson
Adjust struct index_state to use struct object_id instead of unsigned char [20]. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- cache.h | 2 +- read-cache.c | 16 t/helper/test-dump-split-index.c | 2 +-

[PATCH 34/41] sha1_file: convert cached object code to struct object_id

2018-04-23 Thread brian m. carlson
Convert the code that looks up cached objects to use struct object_id. Adjust the lookup for empty trees to use the_hash_algo. Note that we don't need to be concerned about the hard-coded object ID in the empty_tree object since we never use it. Signed-off-by: brian m. carlson <s

[PATCH 06/41] sha1_file: convert freshen functions to object_id

2018-04-23 Thread brian m. carlson
Convert the various functions for freshening objects and has_loose_object_nonlocal to use struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/pack-objects.c | 2 +- cache.h| 2 +- sha1_file.c

[PATCH 40/41] add--interactive: compute the empty tree value

2018-04-23 Thread brian m. carlson
The interactive add script hard-codes the object ID of the empty tree. To avoid any problems when changing hashes, compute this value when used and cache it for any future uses. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- git-add--interactive.perl | 11 +--

[PATCH 00/41] object_id part 13

2018-04-23 Thread brian m. carlson
, to be expected. brian m. carlson (41): cache: add a function to read an object ID from a buffer server-info: remove unused members from struct pack_info Remove unused member in struct object_context packfile: remove unused member from struct pack_entry packfile: convert has_sha1_pack to object_id

[PATCH 01/41] cache: add a function to read an object ID from a buffer

2018-04-23 Thread brian m. carlson
In various places throughout the codebase, we need to read data into a struct object_id from a pack or other unsigned char buffer. Add an inline function that does this based on the current hash algorithm in use, and use it in several places. Signed-off-by: brian m. carlson <s

Re: Git enhancement request - checkout (clone) set modified dates to commit date

2018-04-22 Thread brian m. carlson
stamps with touch. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: Is support for 10.8 dropped?

2018-04-22 Thread brian m. carlson
o library that supports TLS 1.2. As of June 30, TLS 1.0 will be pretty much dead on the Internet. [0] I surmised this from https://www.ssllabs.com/ssltest/clients.html, but I don't use macOS so can't speak for certain. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH 0/4] doc: cleaning up instances of \--

2018-04-18 Thread brian m. carlson
other three patches deal with standalone "\--" which we can't > always turn into "--" since it can be rendered as an em dash. This series looked sane to me as well. I appreciate the work to keep our documentation working in both AsciiDoc and Asciidoctor. -- brian m. carlson

Re: [PATCH 8/8] gpg-interface: handle alternative signature types

2018-04-16 Thread brian m. carlson
On Mon, Apr 16, 2018 at 02:05:32PM +0900, Junio C Hamano wrote: > "brian m. carlson" <sand...@crustytoothpaste.net> writes: > > > On Tue, Apr 10, 2018 at 04:24:27AM -0400, Eric Sunshine wrote: > >> How confident are we that _all_ possible signing programs wi

Re: [PATCH 8/8] gpg-interface: handle alternative signature types

2018-04-14 Thread brian m. carlson
other than OpenPGP and CMS, it's the only scheme I've seen people use with Git. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH 0/6] Rename files to use dashes instead of underscores

2018-04-11 Thread brian m. carlson
On Tue, Apr 10, 2018 at 02:26:15PM -0700, Stefan Beller wrote: > This is the followup for > https://public-inbox.org/git/xmqqbmer4vfh@gitster-ct.c.googlers.com/ > > We have no files left with underscores in their names. This series looked good to me. It's a nice change.

Re: [PATCH] git-svn: avoid warning on undef readline()

2018-04-07 Thread brian m. carlson
ngs" already that's clearly not a codepath that's going to > warn. Thanks for this patch. I ran into this earlier this week (with git svn fetch) and had intended to send a patch, but you clearly got to it before I did. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH 04/10] t1405: sort reflog entries in a hash-independent way

2018-03-26 Thread brian m. carlson
On Mon, Mar 26, 2018 at 03:18:20PM -0700, Junio C Hamano wrote: > "brian m. carlson" <sand...@crustytoothpaste.net> writes: > > > The test enumerates reflog entries in an arbitrary order and then sorts > > them. For SHA-1, this produces results that happen

Re: [PATCH 00/10] Hash-independent tests (part 1)

2018-03-26 Thread brian m. carlson
a test helper to translate them so that we get functionally equivalent results. t1512 is another great example of this same kind of test. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 sig

Re: [PATCH 2/2] send-email: supply a --send-delay=1 by default

2018-03-25 Thread brian m. carlson
onnection cache to machines that don't do STARTTLS (which, much to my annoyance, vger doesn't offer). In short, I don't think this is going to be especially helpful because it won't change the status quo for a lot of senders. You'd have to insert some significant delay in order to get the effec

[PATCH 04/10] t1405: sort reflog entries in a hash-independent way

2018-03-25 Thread brian m. carlson
instead of the object ID. Remove an assumption about the length of a hash by using cut with the delimiter and field options instead of the character range option. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- t/t1405-main-ref-store.sh | 4 ++-- 1 file changed, 2 insertions

[PATCH 01/10] t1011: abstract away SHA-1-specific constants

2018-03-25 Thread brian m. carlson
Adjust the test so that it computes the expected hash value dynamically instead of relying on a hard-coded hash. Hoist some code earlier in the test to make this possible. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- t/t1011-read-tree-sparse-checkout.sh | 7 ---

[PATCH 03/10] t1300: abstract away SHA-1-specific constants

2018-03-25 Thread brian m. carlson
Adjust the test so that it uses the computed blob value instead of hard-coding a hash. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- t/t1300-repo-config.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t1300-repo-config.sh b/t/t130

[PATCH 10/10] t2107: abstract away SHA-1-specific constants

2018-03-25 Thread brian m. carlson
Use the $EMPTY_BLOB variable instead of hard-coding a hash. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- t/t2107-update-index-basic.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t2107-update-index-basic.sh b/t/t2107-update-index-ba

[PATCH 05/10] t1411: abstract away SHA-1-specific constants

2018-03-25 Thread brian m. carlson
Adjust the test so that it uses a variable consisting of the current HEAD instead of a hard-coded hash. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- t/t1411-reflog-show.sh | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/t

[PATCH 09/10] t2101: abstract away SHA-1-specific constants

2018-03-25 Thread brian m. carlson
Adjust the test so that it uses variables and command substitution for blobs instead of hard-coded hashes. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- t/t2101-update-index-reupdate.sh | 41 1 file changed, 21 insertions(+), 20 del

[PATCH 08/10] t2101: modernize test style

2018-03-25 Thread brian m. carlson
. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- t/t2101-update-index-reupdate.sh | 52 ++-- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/t/t2101-update-index-reupdate.sh b/t/t2101-update-index-reupdate.sh index c8bce8c2e4..1687

[PATCH 06/10] t1507: abstract away SHA-1-specific constants

2018-03-25 Thread brian m. carlson
Adjust the test so that it uses a variable consisting of the current HEAD instead of a hard-coded hash. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- t/t1507-rev-parse-upstream.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/t1507-rev

[PATCH 07/10] t2020: abstract away SHA-1 specific constants

2018-03-25 Thread brian m. carlson
Adjust the test so that it uses variables for the revisions we're checking out instead of hard-coded hashes. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- t/t2020-checkout-detach.sh | 40 +++--- 1 file changed, 24 insertions(+), 16 del

[PATCH 02/10] t1304: abstract away SHA-1-specific constants

2018-03-25 Thread brian m. carlson
Adjust the test so that it uses the $EMPTY_BLOB value instead of hard-coding the hash. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- t/t1304-default-acl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t1304-default-acl.sh b/t/t1304-default-

[PATCH 00/10] Hash-independent tests (part 1)

2018-03-25 Thread brian m. carlson
been tested using my "short BLAKE2b" series (branch blake2b-test-hash) and have also been tested based off master. Comments on any aspect of this series are welcome, but opinions on the approach or style are especially so. brian m. carlson (10): t1011: abstract away SHA-1-specific

Re: [PATCH] bisect: use oid_to_hex() for converting object_id hashes to hex strings

2018-03-25 Thread brian m. carlson
> object to object_id). This looks good to me. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH] sha1_name: use bsearch_hash() for abbreviations

2018-03-21 Thread brian m. carlson
at there were alignment issues with doing this, > > but I might have be remembering wrongly - in my limited knowledge of C > > alignment, both "unsigned char *" and "struct object_id *" have the same > > constraints, but I'm not sure. > > Adding Brian

Re: [PATCH v3 00/36] object_id part 12

2018-03-14 Thread brian m. carlson
c. I'll probably pick that piece up next. By the way, thanks for a useful regex. It's a little bit different than what I've been using, but provides a nice overview. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH v3 00/36] object_id part 12

2018-03-14 Thread brian m. carlson
On Wed, Mar 14, 2018 at 10:31:37AM -0700, Junio C Hamano wrote: > "brian m. carlson" <sand...@crustytoothpaste.net> writes: > > > -+ buf += the_hash_algo->rawsz; > > -+ size -= the_hash_algo->rawsz; > > ++

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

2018-03-11 Thread brian m. carlson
Convert the various *_sha1 members to use struct object_id instead. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- 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 5c68

[PATCH v3 00/36] object_id part 12

2018-03-11 Thread brian m. carlson
th references to the_hash_algo. Changes from v1: * Rebase onto master. tbdiff output below. brian m. carlson (36): bulk-checkin: convert index_bulk_checkin to struct object_id builtin/write-tree: convert to struct object_id cache-tree: convert write_*_as_tree to object_id cache-tree: conver

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

2018-03-11 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. Convert some instances of hard-coded constants to use the_hash_algo as well. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- buil

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

2018-03-11 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 <sand...@crustytoothpaste.net> --- builtin/blame.c| 2 +- builtin/branch.c | 2 +- builtin/checkout.c | 6 +++--- builtin/describe.c

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

2018-03-11 Thread brian m. carlson
This is needed to convert parts of the cache-tree code. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- 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..299a

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

2018-03-11 Thread brian m. carlson
ed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- http-walker.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/http-walker.c b/http-walker.c index 07c2b1af82..f506f394ac 100644 --- a/http-walker.c +++ b/http-walker.c @@ -22,7 +22,7 @@ enum object_r

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

2018-03-11 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- 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 ef78c6c00c..eae018e3fb 100644 --- a/b

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

2018-03-11 Thread brian m. carlson
lookup_replace_object, open_istream needs to be converted, and open_istream needs check_sha1_signature to be converted, causing a loop of dependencies. The temporaries will be removed in a future patch. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/fast-export.

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

2018-03-11 Thread brian m. carlson
Convert the remaining function, feed_object, to use struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- send-pack.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/send-pack.c b/send-pack.c index 8d9190f5e7..19025a7aca

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

2018-03-11 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- 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 @@

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

2018-03-11 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 <sand...@crustytoothpaste.net> --- builtin/index-pack.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff

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

2018-03-11 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 <sand...@crustytoothpaste.net> --- archive-tar.c | 28 ++-- archive-zip.

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

2018-03-11 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 <sand...@crustytoothpaste.net> --- builtin/mktree.c | 24 1 file changed, 12 insertions(

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

2018-03-11 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 <sand...@crustytoothpaste.net> --- archive.c | 4 ++-- blame.c| 6 ++ builtin/rm.c | 2 +- builtin/update-index.c | 2 +- line

<    2   3   4   5   6   7   8   9   10   11   >