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

2018-02-19 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 <sand...@crustytoothpaste.net> --- builtin/commit-tree.c | 2 +- cache.h | 2 +- commit.c | 2 +- sha1_file.c | 8 4

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

2018-02-19 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 20/36] streaming: convert open_istream to use struct object_id

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

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

2018-02-19 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 9981db2263..57509a4eac 100644 --- a/b

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

2018-02-19 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 <sand...@crustytoothpaste.net> --- replace_object.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

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

2018-02-19 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 07/36] ref-filter: convert grab_objectname to struct object_id

2018-02-19 Thread brian m. carlson
This is necessary in order to convert find_unique_abbrev. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- 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 03/36] cache-tree: convert write_*_as_tree to object_id

2018-02-19 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 <sand...@crustytoothpaste.net> --- builtin/am.c | 8 builtin/merge.c | 2 +- builtin/write-tree.c | 2 +- cache-tree.c | 10 +- cache-

[PATCH 00/36] object_id part 12

2018-02-19 Thread brian m. carlson
in number but minor, mostly because of the type_name conversion. None of them are tricky, except that the introduction of get_tree_entry_if_blob requires a conversion of that function. brian m. carlson (36): bulk-checkin: convert index_bulk_checkin to struct object_id builtin/write-tree: convert

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

2018-02-19 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 <sand...@crustytoothpaste.net> --- bulk-checkin.c | 18 +- bulk-checkin.h | 2 +- sha1_file.c| 2 +- 3 files chang

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

2018-02-19 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

Re: Is there any way to "interrupt" a rebase?

2018-02-19 Thread brian m. carlson
stage all the changes from the index, make the change that should have gone into commit C, use git commit --fixup (or --squash), and then restage the rest of the changes and continue with the rebase. I can then use git rebase -i --autosquash afterwards to insert the commit into the right place.

Re: [PATCH 0/4] Correct offsets of hunks when one is skipped

2018-02-13 Thread brian m. carlson
This looks reasonably sane to me. I really like that you managed to produce failing tests for this situation. I know pathological cases like this have bit GCC in the past, so it's good that you fixed this. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/

[PATCH v2] docs/interpret-trailers: fix agreement error

2018-02-12 Thread brian m. carlson
In the description of git interpret-trailers, we describe "a group…of lines" that have certain characteristics. Ensure both options describing this group use a singular verb for parallelism. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- Documentati

Re: Question about rebasing - unexpected result, can't figure out why

2018-02-12 Thread brian m. carlson
ual changes as a commit in HEAD.. are omitted (i.e., a patch already accepted upstream with a different commit message or timestamp will be skipped)." If you want to be very explicit about replaying these commits, you can say "git rebase --onto master $(git merge-base master HEAD)", i

Re: [PATCH] docs/interpret-trailers: fix agreement error

2018-02-10 Thread brian m. carlson
On Thu, Feb 08, 2018 at 12:29:53PM -0800, Junio C Hamano wrote: > Jonathan Tan <jonathanta...@google.com> writes: > > > On Thu, 8 Feb 2018 02:56:14 +0000 > > "brian m. carlson" <sand...@crustytoothpaste.net> wrote: > > > >> Existing t

[PATCH] docs/interpret-trailers: fix agreement error

2018-02-07 Thread brian m. carlson
In the description of git interpret-trailers, we describe "a group…of lines" that have certain characteristics. Because the first option uses a plural verb (referring to "lines"), the second option must also use plural verbs for parallelism. Signed-off-by: br

[PATCH v2] hash: update obsolete reference to SHA1_HEADER

2018-02-07 Thread brian m. carlson
We moved away from SHA1_HEADER to a preprocessor if chain, but didn't update the comment discussing the platform defines. Update this comment so it reflects the current state of our codebase. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- hash.h | 4 ++-- 1 file chan

Re: [PATCH 025/194] object-store: allow prepare_alt_odb to handle arbitrary repositories

2018-02-07 Thread brian m. carlson
On Tue, Feb 06, 2018 at 09:48:56AM -0800, Stefan Beller wrote: > On Mon, Feb 5, 2018 at 5:19 PM, brian m. carlson > <sand...@crustytoothpaste.net> wrote: > > On Mon, Feb 05, 2018 at 03:54:46PM -0800, Stefan Beller wrote: > >> @@ -434,12 +433,12 @@ static int link_alt_odb

Re: [RFC PATCH 000/194] Moving global state into the repository object

2018-02-05 Thread brian m. carlson
ughts on the size of the series and potential conflicts in flight, but I'll let him articulate those. The series could in theory be split into pieces the way you've done it: it would just be less convenient to work with some of the functions in the mean time. -- brian m. carlson / brian with sanda

Re: [PATCH 076/194] push: add test showing bad interaction of replace refs and submodules

2018-02-05 Thread brian m. carlson
er <jrnie...@gmail.com> > Signed-off-by: Stefan Beller <sbel...@google.com> It appears you have multiple independent commit messages here. -- 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 065/194] object-store: add repository argument to sha1_object_info

2018-02-05 Thread brian m. carlson
tch if the repository.h header is not included > at the call site. call sites needing that #include were identified by "Call sites" (capital at the beginning of the sentence). -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opin

Re: [PATCH 042/194] object-store: move alternates API to new alternates.h

2018-02-05 Thread brian m. carlson
ray.h" > + > +struct alternates { > + struct alternate_object_database *list; > + struct alternate_object_database **tail; > +}; > +#define ALTERNATES_INIT { NULL, NULL } I was surprised to find that this patch not only moves the alternates API to a new location, but introdu

Re: [PATCH 025/194] object-store: allow prepare_alt_odb to handle arbitrary repositories

2018-02-05 Thread brian m. carlson
his transformation is correct. Could you perhaps say a few words about why it is? -- 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: Missing git options

2018-02-05 Thread brian m. carlson
log with --pretty to format commit hashes or messages into other programs. I'm aware of multiple tools that will simply break if --graph or --patch become the default. Requiring people to retrofit their tools to use --no-graph or --no-patch is likely to be a burden. -- brian m.

Re: [PATCH v2 00/12] object_id part 11 (the_hash_algo)

2018-02-05 Thread brian m. carlson
reroll which fixes this, or just a follow-up patch on top to fix the comment? -- 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

[PATCH v2 05/12] sha1_file: switch uses of SHA-1 to the_hash_algo

2018-01-31 Thread brian m. carlson
Switch various uses of explicit calls to SHA-1 into references to the_hash_algo for better abstraction. Convert some calls to use struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- sha1_file.c | 52 ++--

[PATCH v2 10/12] csum-file: rename sha1file to hashfile

2018-01-31 Thread brian m. carlson
Rename struct sha1file to struct hashfile, along with all of its related functions. The transformation in this commit was made by global search-and-replace. --- builtin/index-pack.c | 20 +-- builtin/pack-objects.c | 52 +-

[PATCH v2 09/12] read-cache: abstract away uses of SHA-1

2018-01-31 Thread brian m. carlson
Convert various uses of direct calls to SHA-1 and 20- and 40-based constants to use the_hash_algo instead. Don't yet convert the on-disk data structures, which will be handled in a future commit. Adjust some comments so as not to refer explicitly to SHA-1. Signed-off-by: brian m. carlson <s

[PATCH v2 04/12] builtin/unpack-objects: switch uses of SHA-1 to the_hash_algo

2018-01-31 Thread brian m. carlson
Switch various uses of explicit calls to SHA-1 into references to the_hash_algo to better abstract away the various uses of it. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/unpack-objects.c | 18 +- 1 file changed, 9 insertions(+), 9 del

[PATCH v2 01/12] hash: move SHA-1 macros to hash.h

2018-01-31 Thread brian m. carlson
Most of the other code dealing with SHA-1 and other hashes is located in hash.h, which is in turn loaded by cache.h. Move the SHA-1 macros to hash.h as well, so we can use them in additional hash-related items in the future. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.

[PATCH v2 12/12] bulk-checkin: abstract SHA-1 usage

2018-01-31 Thread brian m. carlson
Convert uses of the direct SHA-1 functions to use the_hash_algo instead. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- bulk-checkin.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bulk-checkin.c b/bulk-checkin.c index 5f79ed6ea3..8bcd

[PATCH v2 08/12] pack-write: switch various SHA-1 values to abstract forms

2018-01-31 Thread brian m. carlson
Convert various uses of hardcoded 20- and 40-based numbers to use the_hash_algo, along with direct calls to SHA-1. Adjust the names of variables to refer to "hash" instead of "sha1". Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net&

[PATCH v2 11/12] csum-file: abstract uses of SHA-1

2018-01-31 Thread brian m. carlson
Convert several direct uses of SHA-1 to use the_hash_algo instead. Convert one use of the constant 20 as well. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- csum-file.c | 10 +- csum-file.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff

[PATCH v2 06/12] fast-import: switch various uses of SHA-1 to the_hash_algo

2018-01-31 Thread brian m. carlson
Switch various uses of explicit calls to SHA-1 to use the_hash_algo. Convert various uses of 20 and the GIT_SHA1 constants as well. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- fast-import.c | 42 ++ 1 file changed, 22 inse

[PATCH v2 02/12] hash: create union for hash context allocation

2018-01-31 Thread brian m. carlson
and benefits from avoiding dynamic allocation outweigh this small downside. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- hash.h | 15 +-- sha1_file.c | 20 +--- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/hash.h b/hash.h

[PATCH v2 00/12] object_id part 11 (the_hash_algo)

2018-01-31 Thread brian m. carlson
. brian m. carlson (12): hash: move SHA-1 macros to hash.h hash: create union for hash context allocation builtin/index-pack: improve hash function abstraction builtin/unpack-objects: switch uses of SHA-1 to the_hash_algo sha1_file: switch uses of SHA-1 to the_hash_algo fast-import: switch

[PATCH v2 07/12] pack-check: convert various uses of SHA-1 to abstract forms

2018-01-31 Thread brian m. carlson
Convert various explicit calls to use SHA-1 functions and constants to references to the_hash_algo. Make several strings more generic with respect to the hash algorithm used. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- pack-check.c | 32 -

[PATCH v2 03/12] builtin/index-pack: improve hash function abstraction

2018-01-31 Thread brian m. carlson
Convert several uses of unsigned char [20] to struct object_id and convert various hard-coded constants and uses of SHA-1 functions to use the_hash_algo. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/index-pack.

Re: [RFC PATCH 0/2] alternate hash test

2018-01-31 Thread brian m. carlson
iced some of our Perl scripts have hard-coded empty-tree object IDs in them, which obviously will need to be fixed. -- 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: t9128 failing randomly with svn 1.9?

2018-01-29 Thread brian m. carlson
t fails. > I'm on an ancient 32-bit system, I guess you guys encountered > it on 64-bit machines? Yes, both systems are 64-bit Debian systems, one stable, and the other unstable. -- 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

t9128 failing randomly with svn 1.9?

2018-01-28 Thread brian m. carlson
.sh --verbose); done) I'm not really familiar with git svn or its internals, and I didn't see anything recently on the list about this. Is this issue known? -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: http

Re: [PATCH 00/12] object_id part 11 (the_hash_algo)

2018-01-28 Thread brian m. carlson
hes at least until part 12 will be sent. Okay. I've just rebased it on top of your object_id series, so I'll reroll this series and then once both series get picked up, rebase and submit it on top. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc

Re: [PATCH 08/12] pack-write: switch various SHA-1 values to abstract forms

2018-01-28 Thread brian m. carlson
On Sun, Jan 28, 2018 at 09:30:36PM +0100, Patryk Obara wrote: > On 28/01/2018 16:57, brian m. carlson wrote: > > if (partial_pack_offset == 0) { > > - unsigned char sha1[20]; > > - git_SHA1_Final(sha1, _sha1_ctx); > > -

Re: [PATCH 02/12] hash: create union for hash context allocation

2018-01-28 Thread brian m. carlson
On Sun, Jan 28, 2018 at 08:57:21PM +0100, Patryk Obara wrote: > On 28/01/2018 16:57, brian m. carlson wrote: > > In various parts of our code, we want to allocate a structure > > representing the internal state of a hash algorithm. The original > > implementation of the hash

Re: [PATCH 09/12] read-cache: abstract away uses of SHA-1

2018-01-28 Thread brian m. carlson
On Sun, Jan 28, 2018 at 02:50:18PM -0500, Eric Sunshine wrote: > On Sun, Jan 28, 2018 at 10:57 AM, brian m. carlson > <sand...@crustytoothpaste.net> wrote: > > Convert various uses of direct calls to SHA-1 and 20- and 40-based > > constants to use the_hash_algo ins

Re: [RFC PATCH 0/2] alternate hash test

2018-01-28 Thread brian m. carlson
On Sun, Jan 28, 2018 at 07:58:10PM +0100, Ævar Arnfjörð Bjarmason wrote: > On Sun, Jan 28, 2018 at 6:06 PM, brian m. carlson > <sand...@crustytoothpaste.net> wrote: > If the goal is to smoke out hardcoded SHA1s in tests, isn't it easier > to instrument SHA-1 (e.g. our blk

[RFC PATCH 2/2] Switch default hash algorithm to short BLAKE2b for testing

2018-01-28 Thread brian m. carlson
Set the default hash algorithm to short (160-bit) BLAKE2b so we can identify tests that rely on a given hash algorithm. This is a test commit and should not be used in production. Widespread test breakage occurs when using this commit. --- repository.c | 2 +- setup.c | 2 +-

[RFC PATCH 1/2] Base test implementation for short BLAKE2b support

2018-01-28 Thread brian m. carlson
Test the implementation of a second hash algorithm with "short" (160-bit) BLAKE2b support. Simply add an additional algorithm to the codebase without changing the use of any hash function and add a test helper. BLAKE2b was chosen simply because it provides a readily accessible hash algorithm

[RFC PATCH 0/2] alternate hash test

2018-01-28 Thread brian m. carlson
-prompt.sh (Wstat: 256 Tests: 66 Failed: 53) Failed tests: 4, 6-10, 14-34, 36, 39-62, 65 Non-zero exit status: 1 brian m. carlson (2): Base test implementation for short BLAKE2b support Switch default hash algorithm to short BLAKE2b for testing Makefile

[PATCH 08/12] pack-write: switch various SHA-1 values to abstract forms

2018-01-28 Thread brian m. carlson
Convert various uses of hardcoded 20- and 40-based numbers to use the_hash_algo, along with direct calls to SHA-1. Adjust the names of variables to refer to "hash" instead of "sha1". Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net&

[PATCH 10/12] csum-file: rename sha1file to hashfile

2018-01-28 Thread brian m. carlson
Rename struct sha1file to struct hashfile, along with all of its related functions. The transformation in this commit was made by global search-and-replace. --- builtin/index-pack.c | 20 +-- builtin/pack-objects.c | 52 +-

[PATCH 03/12] builtin/index-pack: improve hash function abstraction

2018-01-28 Thread brian m. carlson
Convert several uses of unsigned char [20] to struct object_id and convert various hard-coded constants and uses of SHA-1 functions to use the_hash_algo. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/index-pack.

[PATCH 02/12] hash: create union for hash context allocation

2018-01-28 Thread brian m. carlson
-by: brian m. carlson <sand...@crustytoothpaste.net> --- hash.h | 9 ++--- sha1_file.c | 2 -- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hash.h b/hash.h index 7122dea7b3..365846a6b5 100644 --- a/hash.h +++ b/hash.h @@ -55,6 +55,12 @@ /* Number of algorithms sup

[PATCH 07/12] pack-check: convert various uses of SHA-1 to abstract forms

2018-01-28 Thread brian m. carlson
Convert various explicit calls to use SHA-1 functions and constants to references to the_hash_algo. Make several strings more generic with respect to the hash algorithm used. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- pack-check.c | 32 -

[PATCH 11/12] csum-file: abstract uses of SHA-1

2018-01-28 Thread brian m. carlson
Convert several direct uses of SHA-1 to use the_hash_algo instead. Convert one use of the constant 20 as well. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- csum-file.c | 10 +- csum-file.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff

[PATCH 12/12] bulk-checkin: abstract SHA-1 usage

2018-01-28 Thread brian m. carlson
Convert uses of the direct SHA-1 functions to use the_hash_algo instead. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- bulk-checkin.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bulk-checkin.c b/bulk-checkin.c index 5f79ed6ea3..8bcd

[PATCH 06/12] fast-import: switch various uses of SHA-1 to the_hash_algo

2018-01-28 Thread brian m. carlson
Switch various uses of explicit calls to SHA-1 to use the_hash_algo. Convert various uses of 20 and the GIT_SHA1 constants as well. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- fast-import.c | 40 1 file changed, 20 insertions(

[PATCH 04/12] builtin/unpack-objects: switch uses of SHA-1 to the_hash_algo

2018-01-28 Thread brian m. carlson
Switch various uses of explicit calls to SHA-1 into references to the_hash_algo to better abstract away the various uses of it. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/unpack-objects.c | 18 +- 1 file changed, 9 insertions(+), 9 del

[PATCH 09/12] read-cache: abstract away uses of SHA-1

2018-01-28 Thread brian m. carlson
Convert various uses of direct calls to SHA-1 and 20- and 40-based constants to use the_hash_algo instead. Don't yet convert the on-disk data structures, which will be handled in a future commit. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- read-cache.

[PATCH 05/12] sha1_file: switch uses of SHA-1 to the_hash_algo

2018-01-28 Thread brian m. carlson
Switch various uses of explicit calls to SHA-1 into references to the_hash_algo for better abstraction. Convert some calls to use struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- sha1_file.c | 52 ++--

[PATCH 01/12] hash: move SHA-1 macros to hash.h

2018-01-28 Thread brian m. carlson
Most of the other code dealing with SHA-1 and other hashes is located in hash.h, which is in turn loaded by cache.h. Move the SHA-1 macros to hash.h as well, so we can use them in additional hash-related items in the future. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.

[PATCH 00/12] object_id part 11 (the_hash_algo)

2018-01-28 Thread brian m. carlson
.) brian m. carlson (12): hash: move SHA-1 macros to hash.h hash: create union for hash context allocation builtin/index-pack: improve hash function abstraction builtin/unpack-objects: switch uses of SHA-1 to the_hash_algo sha1_file: switch uses of SHA-1 to the_hash_algo fast-import: switch

Re: [PATCH v2 1/1] setup: recognise extensions.objectFormat

2018-01-28 Thread brian m. carlson
h is allowed in repo version 0). > > Add tests and documentation note about new extension. > > Signed-off-by: Patryk Obara <patryk.ob...@gmail.com> Other than that, the patch looks good to me. I like that we reject invalid values immediately. Adding documentatio

Re: Cloned repository has file changes -> bug?

2018-01-28 Thread brian m. carlson
wo files aren't identical, one or the other will show as modified. You probably want to adjust the repository so that it doesn't have files differing only in case or use a case-sensitive file system. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpa

Re: git send-email sets date

2018-01-28 Thread brian m. carlson
notation, which will allow your mailer to insert its own date while keeping the patch date separate. -- 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/14] Some fixes and bunch of object_id conversions

2018-01-26 Thread brian m. carlson
ct to object_id > > sha1_file: rename hash_sha1_file_literally > > These were mostly pleasant read. I'll queue these on two topic > branches and wait to see what others say. Other than the one typo, looks good to me. -- brian m. carlson / brian with sandals: Houston, Texas

Re: [PATCH v3 13/14] sha1_file: convert write_loose_object to object_id

2018-01-26 Thread brian m. carlson
On Wed, Jan 24, 2018 at 12:12:05PM +0100, Patryk Obara wrote: > Convert the definition and declaration of statis write_loose_object s/statis/static/ -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase

Re: [PATCH] t: add clone test for files differing only in case

2018-01-21 Thread brian m. carlson
he vfat partition, not my ext4 partition, where, of course, I got distracted by the various other failures. Sigh. Thanks for fixing this up. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204

Re: [PATCH 00/11] Some fixes and bunch of object_id conversions

2018-01-20 Thread brian m. carlson
On Thu, Jan 18, 2018 at 03:50:52PM +0100, Patryk Obara wrote: > * brian m. carlson implemented vtable for hash algorithm selection and pushed > the repository format front - thanks to him it's now quite easy to > experimentally replace hashing functions and, e.g. do some performance

Re: [PATCH 11/11] sha1_file: convert write_sha1_file to object_id

2018-01-20 Thread brian m. carlson
st char *type, struct object_id *oid, > + char *hdr, int *hdrlen) It looks like the indentation has changed here. Was that intentional? -- 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

[PATCH] t: add clone test for files differing only in case

2018-01-20 Thread brian m. carlson
not the first time similar problems have arisen. Introduce a test to catch this case and ensure the behavior does not regress. Signed-off-by: Eric Sunshine <sunsh...@sunshineco.com> Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- t/t5601-clone.sh | 13 + 1

Re: git 2.16.0 segfaults on clone of specific repo

2018-01-19 Thread brian m. carlson
sign-off? I'll try to set up a temporary FAT device and verify that I can reproduce the problem on Linux as well. -- 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] repository: pre-initialize hash algo pointer

2018-01-19 Thread brian m. carlson
suggested changes. Again, my apologies for the breakage and the inconvenience involved. -- 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: git 2.16.0 segfaults on clone of specific repo

2018-01-19 Thread brian m. carlson
e that it's a worthwhile test to have, since it will fail on those systems where it's going to be a problem. Furthermore, people do run the tests (as does Travis) on case-insensitive file systems during the development cycle, so if we break something in the future, someone will notice whil

[PATCH] repository: pre-initialize hash algo pointer

2018-01-18 Thread brian m. carlson
that functionality to the user, simply initialize the repository structure to use the current hash algorithm, SHA-1. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- repository.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) I'm still quite mystified as to why this is working on

Re: git 2.16.0 segfaults on clone of specific repo

2018-01-18 Thread brian m. carlson
0, and so on. I'd really like to catch this kind of issue sooner in the future if I can figure out how to reproduce it. -- 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: git 2.16.0 segfaults on clone of specific repo

2018-01-18 Thread brian m. carlson
guess about what the problem might be. Can you try this patch and see if it fixes things? -- >8 -- From 10b690241619a452634b31fbc5ccd054a4f6e5ec Mon Sep 17 00:00:00 2001 From: "brian m. carlson" <sand...@crustytoothpaste.net> Date: Sun, 14 Jan 2018 18:26:29 + Subject: [P

Re: [BUG] test_must_fail: does not correctly detect failures - Was Git 2.16.0-rc2 Test Summary on NonStop

2018-01-15 Thread brian m. carlson
if $!; exit $? >> 8 if $? >> 8; exit 255; # otherwise Is there an errno value on your port that matches 162? Maybe EBADF? On Linux, I get the following: genre ok % printf die | perl -; echo $? Died at - line 1. 9 -- brian m. carlson / brian with sandals: Houston, Texas, US ht

Re: [PATCH] bisect: debug: convert struct object to object_id

2018-01-10 Thread brian m. carlson
ously the right change to make. -- 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: Request for Assist on Limits for Tests

2018-01-07 Thread brian m. carlson
You can then annotate those tests with the appropriate prerequisite. I expect that for long paths, you will hit a lot of the same issues as occur on Windows, where PATH_MAX may be very small. It might be valuable to expose this information as a build option and then set an appropriate variable in t/test-li

Re: [PATCH] doc/SubmittingPatches: improve text formatting

2018-01-03 Thread brian m. carlson
ied) more > easily by users reading the text version. These readers are more likely > to use the commands while submitting patches. Make it easier for them. I think this change is fine. I don't have a strong opinion either way and if others think the change makes the plain text more readable,

Re: [RFC/PATCH] perl: bump the required Perl version to 5.10.0 from 5.8.0

2017-12-23 Thread brian m. carlson
e used. I'm curious, though, is there some reason you went with the "v5.10.0" syntax other than "5.010"? I believe the latter provides a better error message on older Perls, although I agree the former is more readable. -- brian m. carlson / brian with sandals: Houston, Te

Re: Q: rational for $XDG_CONFIG_HOME/git/config to be "non global" or just a bug?

2017-12-16 Thread brian m. carlson
. ~/.gitconfig is checked into my Git repo for my home directory and contains settings I preserve across all systems, and the XDG dir is not checked in and contains per-system settings (currently just commit.gpgsign). On my main systems I have a key and sign commits; if it's just some server I log in

Re: [PATCH v3] launch_editor(): indicate that Git waits for user input

2017-11-28 Thread brian m. carlson
On Mon, Nov 27, 2017 at 06:05:20PM -0500, Jeff King wrote: > On Mon, Nov 27, 2017 at 08:09:32PM +0000, brian m. carlson wrote: > > > > Show a message in the original terminal and get rid of it when the > > > editor returns. > > [...] > > > > Sorry for co

Re: [PATCH] repository: fix a sparse 'using integer as NULL pointer' warning

2017-11-28 Thread brian m. carlson
e last one) applies > on top of 'next'. Thanks for the patch; it's obviously correct. I'll get sparse set up for future patch series. -- 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] launch_editor(): indicate that Git waits for user input

2017-11-27 Thread brian m. carlson
e topic so late, but it occurred to me that we might want to conditionalize this on an advice.* flag. I expect there are some people who will never want to see this, and letting them turn it off would be good. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.n

Re: [PATCH 1/3] Documentation: allow overriding timestamps of generated asciidoc

2017-11-21 Thread brian m. carlson
e. Maybe something like the following in the Makefile: ifndef NO_PERL SOURCE_DATE_TIMESTAMP=$(shell perl -MPOSIX -e 'print strftime("%FT%TZ", gmtime($ENV{SOURCE_DATE_EPOCH}));') endif and then: + $(if $(SOURCE_DATE_TIMESTAMP),touch -d '$(SOURCE_DATE_TIMESTAMP)' $@+ &&a

Re: [PATCH] git-send-email: honor $PATH

2017-11-18 Thread brian m. carlson
y users. I think what you probably want to do is use entries in PATH first, and leave the two old values as backups at the end. -- 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

[PATCH v2 0/2] Convert SubmittingPatches to AsciiDoc

2017-11-12 Thread brian m. carlson
. Changes from v1: * Switch all branch names, paths, and commit message trailers to use backticks. * Move footnotes directly above relevant paragraph. * Fix quoting of mail message. brian m. carlson (2): Documentation: enable compat-mode for Asciidoctor Documentation: convert SubmittingPatches

[PATCH v2 2/2] Documentation: convert SubmittingPatches to AsciiDoc

2017-11-12 Thread brian m. carlson
will not like that. This allows us to render the document as part of the website for the benefit of others who wish to link to it as well as providing a more nicely formatted display for our community and potential contributors. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.

[PATCH v2 1/2] Documentation: enable compat-mode for Asciidoctor

2017-11-12 Thread brian m. carlson
AsciiDoc and Asciidoctor if we make use of those features in the future. Since this mode is specified as an attribute, if a version of Asciidoctor doesn't understand it, it will simply be ignored. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- Documentation/Makefile | 1 +

[PATCH v3 1/4] setup: expose enumerated repo info

2017-11-12 Thread brian m. carlson
since they're intricately intertwined with how things work at the moment, but this improves things for the future. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- setup.c | 46 +- 1 file changed, 25 insertions(+), 21 deletions(-)

[PATCH v3 2/4] Add structure representing hash algorithm

2017-11-12 Thread brian m. carlson
. Finally, include git-compat-util.h in hash.h so that the required types are available. This aids people using automated tools their editors. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- hash.h | 57 + sha1_

[PATCH v3 3/4] Integrate hash algorithm support with repo setup

2017-11-12 Thread brian m. carlson
to the user. The transition plan anticipates that these may be different. We can add an additional element in the future (say, ui_hash_algo) to provide for this case. Include repository.h in cache.h since we now need to have access to these struct and variable definitions. Signed-off-by: brian m

[PATCH v3 4/4] Switch empty tree and blob lookups to use hash abstraction

2017-11-12 Thread brian m. carlson
Switch the uses of empty_tree_oid and empty_blob_oid to use the current_hash abstraction that represents the current hash algorithm in use. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/am.c | 2 +- builtin/checkout.c | 2 +- builtin/diff.c | 2 +- b

[PATCH v3 0/4] Hash abstraction

2017-11-12 Thread brian m. carlson
and constants. brian m. carlson (4): setup: expose enumerated repo info Add structure representing hash algorithm Integrate hash algorithm support with repo setup Switch empty tree and blob lookups to use hash abstraction builtin/am.c | 2 +- builtin/checkout.c | 2 +- builtin/diff.c | 2

Re: [PATCH 2/4] Remove silent clamp of renameLimit

2017-11-11 Thread brian m. carlson
d reason here? I usually like size_t for values that are unsigned and don't need to be fixed size because it's usually the largest efficient unsigned type. However, if you want something to handle items larger than 2**32, then I agree that it's maybe not a great idea if we want it to work on 32-bit

Re: What's cooking in git.git (Nov 2017, #03; Wed, 8)

2017-11-10 Thread brian m. carlson
throughout various > codepaths has been started. > > cf. <20171028181239.59458-1-sand...@crustytoothpaste.net> I'll be rerolling this as well. -- 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 2/4] Remove silent clamp of renameLimit

2017-11-10 Thread brian m. carlson
s I should change the double here to uint64_t for > consistency? I'm wondering if maybe you want to use size_t. If you end up using an unsigned type, you might be able to leverage unsigned_mult_overflows to avoid having to write this by hand. -- brian m. carlson / brian with sandals: Ho

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