Re: git commit results in many lstat()s

2017-02-01 Thread brian m. carlson
make -j3 all && (cd t && GIT_PROVE_OPTS=-j3 make prove) This, of course, requires that you have Perl's prove installed, which has been part of core Perl since 5.10.1. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My

Re: git-scm.com status report

2017-02-08 Thread brian m. carlson
ly be possible to build the site as one big unit if we did it that way. I've played around with that plugin, so I'm happy to provide guidance if we want to do that. [0] HSTS would prevent anyone who had visited the page from downgrading to an insecure connection for the next

Re: [PATCH v2 7/7] Makefile: add a knob to enable the use of Asciidoctor

2017-01-22 Thread brian m. carlson
On Mon, Jan 23, 2017 at 03:57:13AM +0100, Øyvind A. Holm wrote: > On 2017-01-22 02:41:56, brian m. carlson wrote: > > While Git has traditionally built its documentation using AsciiDoc, some > > people wish to use Asciidoctor for speed or other reasons. Add a > > Makefile

[PATCH 5/7] Documentation: add XSLT to fix DocBook for Texinfo

2017-01-21 Thread brian m. carlson
necessary for Texinfo, since docbook2texi provides its own stylesheets. The DocBook stylesheets, which we use for other formats, provide the full range of DocBook 4 and 5 compatibility, and don't have this issue. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- Documentation/Ma

[PATCH 6/7] Documentation: move dblatex arguments into variable

2017-01-21 Thread brian m. carlson
m. carlson <sand...@crustytoothpaste.net> --- Documentation/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index 76be7017c..0f4db48eb 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -120,6

[PATCH 2/7] Documentation: modernize cat-texi.perl

2017-01-21 Thread brian m. carlson
of this modernization is that a formerly obscured bug is now visible, which will be fixed in a followup patch. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- Documentation/cat-texi.perl | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Documentati

[PATCH 3/7] Documentation: remove unneeded argument in cat-texi.perl

2017-01-21 Thread brian m. carlson
page anywhere in the header that's being generated. Remove the unused argument, and since the format specification functionality is no longer needed, convert the printf to a simple print. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- Documentation/cat-texi.perl | 4 +

[PATCH 0/7] Macro for Asciidoctor support

2017-01-21 Thread brian m. carlson
with cat-texi.perl, which have been fixed. It has also been modernized to use strict, warnings, and lexical file handles. I also made an attempt to produce more diffable texi files; I may follow up with additional series along this line to make the documentation build reproducibly. brian m. carlson

[PATCH 7/7] Makefile: add a knob to enable the use of Asciidoctor

2017-01-21 Thread brian m. carlson
. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- Documentation/Makefile | 12 Makefile | 6 ++ 2 files changed, 18 insertions(+) diff --git a/Documentation/Makefile b/Documentation/Makefile index 0f4db48eb..5cbecfa99 100644 --- a/Documentation/Ma

Re: [PATCH 3/3] git-prompt.sh: fix for submodule 'dirty' indicator

2017-01-23 Thread brian m. carlson
ubmodule_name:" > fi > } > @@ -544,7 +544,7 @@ __git_ps1 () > > local sub="" > if [ -n "${GIT_PS1_SHOWSUBMODULE}" ]; then > - sub="$(__git_ps1_submodule $g)" > + sub="$(__git_ps1_submodule "$g")" > fi > > local f="$w$i$s$u" > -- > 2.7.4 > -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH] checkout: convert post_checkout_hook() to struct object_id

2017-01-30 Thread brian m. carlson
On Mon, Jan 30, 2017 at 02:01:12PM +0100, Johannes Schindelin wrote: > Hi René, > > On Sat, 28 Jan 2017, René Scharfe wrote: > > > Signed-off-by: Rene Scharfe <l@web.de> > > These three SHA-1 -> OID patches all appear correct to me. I concur. These look g

[PATCH] Documentation: implement linkgit macro for Asciidoctor

2017-01-25 Thread brian m. carlson
-by: brian m. carlson <sand...@crustytoothpaste.net> --- Documentation/Makefile | 5 + Documentation/asciidoctor-extensions.rb | 28 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 Documentation/asciidoctor-extensions.rb

Re: [PATCH v2 0/7] Macros for Asciidoctor support

2017-01-25 Thread brian m. carlson
On Wed, Jan 25, 2017 at 06:30:00PM -0500, Jeff King wrote: > On Wed, Jan 25, 2017 at 11:19:26PM +0000, brian m. carlson wrote: > > > On Wed, Jan 25, 2017 at 04:35:44PM -0500, Jeff King wrote: > > > On Wed, Jan 25, 2017 at 02:28:55PM +0100, Johannes Schindelin wrote: >

Re: [PATCH v2 0/7] Macros for Asciidoctor support

2017-01-25 Thread brian m. carlson
erve judgement until > I saw the actual Ruby code, though. :) I've sent the patch before, but I can send it again. It's relatively small and self-contained. I'm also happy to be responsible for maintaining it. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | https://ww

[PATCH v2 1/7] Documentation: fix warning in cat-texi.perl

2017-01-21 Thread brian m. carlson
Newer versions of Perl produce the warning "Unescaped left brace in regex is deprecated, passed through in regex" when an unescaped left brace occurs in a regex. Escape the brace to avoid this warning. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- D

[PATCH v2 3/7] Documentation: remove unneeded argument in cat-texi.perl

2017-01-21 Thread brian m. carlson
page anywhere in the header that's being generated. Remove the unused argument, and since the format specification functionality is no longer needed, convert the printf to a simple print. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- Documentation/cat-texi.perl | 4 +

[PATCH v2 0/7] Macros for Asciidoctor support

2017-01-21 Thread brian m. carlson
: * Fix a brown-paper-bag bug. brian m. carlson (7): Documentation: fix warning in cat-texi.perl Documentation: modernize cat-texi.perl Documentation: remove unneeded argument in cat-texi.perl Documentation: sort sources for gitman.texi Documentation: add XSLT to fix DocBook for Texinfo

[PATCH v2 5/7] Documentation: add XSLT to fix DocBook for Texinfo

2017-01-21 Thread brian m. carlson
necessary for Texinfo, since docbook2texi provides its own stylesheets. The DocBook stylesheets, which we use for other formats, provide the full range of DocBook 4 and 5 compatibility, and don't have this issue. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- Documentation/Ma

[PATCH v2 7/7] Makefile: add a knob to enable the use of Asciidoctor

2017-01-21 Thread brian m. carlson
. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- Documentation/Makefile | 12 Makefile | 6 ++ 2 files changed, 18 insertions(+) diff --git a/Documentation/Makefile b/Documentation/Makefile index d95002e62..19c42eb60 100644 --- a/Documentation/Ma

[PATCH v2 4/7] Documentation: sort sources for gitman.texi

2017-01-21 Thread brian m. carlson
Sorting the sources makes it easier to compare the output using diff. In addition, it aids groups creating reproducible builds, as the order of the files is no longer dependent on the file system or other irrelevant factors. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.

[PATCH v2 6/7] Documentation: move dblatex arguments into variable

2017-01-21 Thread brian m. carlson
m. carlson <sand...@crustytoothpaste.net> --- Documentation/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index 76be7017c..d95002e62 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -120,6

[PATCH v2 2/7] Documentation: modernize cat-texi.perl

2017-01-21 Thread brian m. carlson
of this modernization is that a formerly obscured bug is now visible, which will be fixed in a followup patch. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- Documentation/cat-texi.perl | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Documentati

[PATCH 1/7] Documentation: fix warning in cat-texi.perl

2017-01-21 Thread brian m. carlson
Newer versions of Perl produce the warning "Unescaped left brace in regex is deprecated, passed through in regex" when an unescaped left brace occurs in a regex. Escape the brace to avoid this warning. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- D

[PATCH 4/7] Documentation: sort sources for gitman.texi

2017-01-21 Thread brian m. carlson
Sorting the sources makes it easier to compare the output using diff. In addition, it aids groups creating reproducible builds, as the order of the files is no longer dependent on the file system or other irrelevant factors. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.

Re: [PATCH] Documentation: implement linkgit macro for Asciidoctor

2017-01-26 Thread brian m. carlson
house style, which uses multi-line %(). We could pick [0] as an option, or just argue it out when someone cares, like here. [0] https://github.com/bbatsov/ruby-style-guide -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

[PATCH] Documentation: use brackets for optional arguments

2017-02-22 Thread brian m. carlson
. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- Documentation/blame-options.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt index 2669b87c9d..dc41957afa 100644 --- a/Documentation

Re: Fwd: Typo in worktree man page

2017-02-22 Thread brian m. carlson
On Tue, Feb 21, 2017 at 04:52:11PM -0800, Casey Rodarmor wrote: > Hi there, > > The git worktree man page mentions the `--detached` flag in the > section on `add`, but the flag is actually called `--detach`. Thanks for reporting this. I'll send a patch. -- brian m. carlson / brian

[PATCH] Documentation: correctly spell git worktree --detach

2017-02-22 Thread brian m. carlson
The option is “--detach”, but we accidentally spelled it “--detached” at one point in the man page. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> Reported-by: Casey Rodarmor <ca...@rodarmor.com> --- Documentation/git-worktree.txt | 2 +- 1 file changed, 1 ins

[PATCH v5 05/19] builtin/fast-export: convert to struct object_id

2017-02-21 Thread brian m. carlson
In addition to converting to struct object_id, write some hardcoded buffer sizes in terms of GIT_SHA1_RAWSZ. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/fast-export.c | 58 +-- 1 file changed, 29 insertions(

[PATCH v5 08/19] builtin/branch: convert to struct object_id

2017-02-21 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/branch.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/builtin/branch.c b/builtin/branch.c index 9d30f55b0b..faf472ff8f 100644 --- a/builtin/branch.c +++ b/b

[PATCH v5 12/19] builtin/replace: convert to struct object_id

2017-02-21 Thread brian m. carlson
Convert various uses of unsigned char [20] to struct object_id. Rename replace_object_sha1 to replace_object_oid. Finally, specify a constant in terms of GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/replace.c

[PATCH v5 16/19] sha1_file: introduce an nth_packed_object_oid function

2017-02-21 Thread brian m. carlson
provides a variable into which to store the value, which it returns on success; on error, it returns NULL, as nth_packed_object_sha1 does. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- cache.h | 6 ++ sha1_file.c | 17 ++--- 2 files changed, 20 insertions

Re: [PATCH v4 03/19] builtin/diff-tree: convert to struct object_id

2017-02-20 Thread brian m. carlson
On Mon, Feb 20, 2017 at 08:08:36PM -0500, Jeff King wrote: > On Tue, Feb 21, 2017 at 12:25:19AM +0000, brian m. carlson wrote: > > > On Mon, Feb 20, 2017 at 03:09:02AM -0500, Jeff King wrote: > > > It's a little disturbing that we do not seem to have even a basic test > &g

Re: [PATCH v4 03/19] builtin/diff-tree: convert to struct object_id

2017-02-20 Thread brian m. carlson
e only way to know if it works is to test it. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH v2 00/19] object_id part 6

2017-02-17 Thread brian m. carlson
On Fri, Feb 17, 2017 at 10:55:03AM +0100, Michael Haggerty wrote: > On 02/14/2017 03:31 AM, brian m. carlson wrote: > > This is another series in the continuing conversion to struct object_id. > > > > This series converts more of the builtin directory and some of the refs &

[PATCH v3 01/19] builtin/commit: convert to struct object_id

2017-02-17 Thread brian m. carlson
Convert most leaf functions to use struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/commit.c | 46 +++--- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c

[PATCH v3 03/19] builtin/describe: convert to struct object_id

2017-02-17 Thread brian m. carlson
Convert the functions in this file and struct commit_name to struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/describe.c | 50 +- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/b

[PATCH v3 04/19] builtin/fast-export: convert to struct object_id

2017-02-17 Thread brian m. carlson
In addition to converting to struct object_id, write some hardcoded buffer sizes in terms of GIT_SHA1_RAWSZ. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/fast-export.c | 58 +-- 1 file changed, 29 insertions(

[PATCH v3 09/19] builtin/merge: convert to struct object_id

2017-02-17 Thread brian m. carlson
Additionally convert several uses of the constant 40 into GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/merge.c | 134 1 file changed, 66 insertions(+), 68 deletions(-) diff --git a/b

[PATCH v3 19/19] wt-status: convert to struct object_id

2017-02-17 Thread brian m. carlson
Convert the remaining uses of unsigned char [20] to struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- wt-status.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/wt-status.c b/wt-status.c

[PATCH v3 05/19] builtin/fmt-merge-message: convert to struct object_id

2017-02-17 Thread brian m. carlson
Convert most of the code to use struct object_id, including struct origin_data and struct merge_parents. Convert several instances of hardcoded numbers into references to GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/fmt-merge-msg.

[PATCH v3 08/19] builtin/clone: convert to struct object_id

2017-02-17 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/clone.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/clone.c b/builtin/clone.c index 3f63edbbf9..b4c929bb8a 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -681,7

[PATCH v3 02/19] builtin/diff-tree: convert to struct object_id

2017-02-17 Thread brian m. carlson
Convert most leaf functions to struct object_id. Rewrite several hardcoded numbers in terms of GIT_SHA1_HEXSZ, using an intermediate variable where that makes sense. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/diff-tree.

[PATCH v3 00/19] object_id part 6

2017-02-17 Thread brian m. carlson
casts. * Rebase on master. brian m. carlson (19): builtin/commit: convert to struct object_id builtin/diff-tree: convert to struct object_id builtin/describe: convert to struct object_id builtin/fast-export: convert to struct object_id builtin/fmt-merge-message: convert to struct

[PATCH v3 10/19] Convert remaining callers of resolve_refdup to object_id

2017-02-17 Thread brian m. carlson
There are a few leaf functions in various files that call resolve_refdup. Convert these functions to use struct object_id internally to prepare for transitioning resolve_refdup itself. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/notes.c

[PATCH v3 15/19] refs: simplify parsing of reflog entries

2017-02-17 Thread brian m. carlson
The current code for reflog entries uses a lot of hard-coded constants, making it hard to read and modify. Use parse_oid_hex and two temporary variables to simplify the code and reduce the use of magic constants. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- refs

[PATCH v3 11/19] builtin/replace: convert to struct object_id

2017-02-17 Thread brian m. carlson
Convert various uses of unsigned char [20] to struct object_id. Rename replace_object_sha1 to replace_object_oid. Finally, specify a constant in terms of GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/replace.c

[PATCH v3 14/19] hex: introduce parse_oid_hex

2017-02-17 Thread brian m. carlson
Introduce a function, parse_oid_hex, which parses a hexadecimal object ID and if successful, sets a pointer to just beyond the last character. This allows for simpler, more robust parsing without needing to hard-code integer values throughout the codebase. Signed-off-by: brian m. carlson <s

[PATCH v3 16/19] sha1_file: introduce an nth_packed_object_oid function

2017-02-17 Thread brian m. carlson
provides a variable into which to store the value, which it returns on success; on error, it returns NULL, as nth_packed_object_sha1 does. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- cache.h | 6 ++ sha1_file.c | 17 ++--- 2 files changed, 20 insertions

[PATCH v3 12/19] reflog-walk: convert struct reflog_info to struct object_id

2017-02-17 Thread brian m. carlson
1 + E1.noid.hash @@ struct reflog_info *E1; @@ - E1->nsha1 + E1->noid.hash Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- reflog-walk.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/reflog-walk.c b/reflog-walk.c index f98748e2ae.

[PATCH v3 13/19] refs: convert each_reflog_ent_fn to struct object_id

2017-02-17 Thread brian m. carlson
Make each_reflog_ent_fn take two struct object_id pointers instead of two pointers to unsigned char. Convert the various callbacks to use struct object_id as well. Also, rename fsck_handle_reflog_sha1 to fsck_handle_reflog_oid. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.

[PATCH v3 17/19] Convert object iteration callbacks to struct object_id

2017-02-17 Thread brian m. carlson
Convert each_loose_object_fn and each_packed_object_fn to take a pointer to struct object_id. Update the various callbacks. Convert several 40-based constants to use GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/cat-file.c

[PATCH v3 18/19] builtin/merge-base: convert to struct object_id

2017-02-17 Thread brian m. carlson
Convert the remaining uses of unsigned char [20] to struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/merge-base.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/builtin/merge-base.c b/builtin

[PATCH v3 07/19] builtin/branch: convert to struct object_id

2017-02-17 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/branch.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/builtin/branch.c b/builtin/branch.c index 9d30f55b0b..faf472ff8f 100644 --- a/builtin/branch.c +++ b/b

[PATCH v3 06/19] builtin/grep: convert to struct object_id

2017-02-17 Thread brian m. carlson
Convert several functions to use struct object_id, and rename them so that they no longer refer to SHA-1. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/grep.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/b

Re: [PATCH v3 16/19] sha1_file: introduce an nth_packed_object_oid function

2017-02-17 Thread brian m. carlson
On Sat, Feb 18, 2017 at 01:24:34AM +, Ramsay Jones wrote: > > > On 18/02/17 00:06, brian m. carlson wrote: > > There are places in the code where we would like to provide a struct > > object_id *, yet read the hash directly from the pack. Provide an > > nth

Re: [PATCH v3 02/19] builtin/diff-tree: convert to struct object_id

2017-02-17 Thread brian m. carlson
On Sat, Feb 18, 2017 at 01:18:11AM +, Ramsay Jones wrote: > > > On 18/02/17 00:06, brian m. carlson wrote: > > Convert most leaf functions to struct object_id. Rewrite several > > hardcoded numbers in terms of GIT_SHA1_HEXSZ, using an intermediate > > vari

Re: SHA1 collisions found

2017-02-25 Thread brian m. carlson
transition path (but I am open to be educated and pursuaded the > other way). I would simply use multihash[0] for this purpose. New-style objects serialize data in multihash format, so it's immediately obvious what hash we're referring to. That makes future transitions less problematic. [0] h

Re: SHA1 collisions found

2017-02-25 Thread brian m. carlson
op since the collision announcement was made. After another 27 commits, I've got it down from 1244 to 1119. I plan to send another series out sometime after the existing series has hit next. People who are interested can follow the object-id-part* branches at https://github.com/bk2204/git. -- bri

[PATCH] t: add multi-parent test of diff-tree --stdin

2017-02-22 Thread brian m. carlson
We were lacking a test that covered the multi-parent case for commits. Add a basic test to ensure we do not regress this behavior in the future. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- t/t4013-diff-various.sh | 19 +++ 1 file changed, 19 inse

Re: [PATCH] t: add multi-parent test of diff-tree --stdin

2017-02-22 Thread brian m. carlson
On Wed, Feb 22, 2017 at 03:42:25PM -0800, Junio C Hamano wrote: > "brian m. carlson" <sand...@crustytoothpaste.net> writes: > > > We were lacking a test that covered the multi-parent case for commits. > > Add a basic test to ensure we do not regress this behavior

Re: [PATCH] http(s): automatically try NTLM authentication first

2017-02-22 Thread brian m. carlson
le feature to have enabled, with little downside. I just don't know about the security of the NTLM part, and I don't think we should take this patch unless we're sure we know the consequences of it. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH v5 03/19] builtin/diff-tree: convert to struct object_id

2017-02-22 Thread brian m. carlson
On Wed, Feb 22, 2017 at 02:16:42PM -0500, Jeff King wrote: > On Wed, Feb 22, 2017 at 10:50:21AM -0800, Junio C Hamano wrote: > > > "brian m. carlson" <sand...@crustytoothpaste.net> writes: > > > > > Convert most leaf functions to struct object_id. Cha

[PATCH v4 05/19] builtin/fast-export: convert to struct object_id

2017-02-19 Thread brian m. carlson
In addition to converting to struct object_id, write some hardcoded buffer sizes in terms of GIT_SHA1_RAWSZ. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/fast-export.c | 58 +-- 1 file changed, 29 insertions(

[PATCH v4 15/19] refs: simplify parsing of reflog entries

2017-02-19 Thread brian m. carlson
The current code for reflog entries uses a lot of hard-coded constants, making it hard to read and modify. Use parse_oid_hex and two temporary variables to simplify the code and reduce the use of magic constants. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- refs

[PATCH v4 14/19] refs: convert each_reflog_ent_fn to struct object_id

2017-02-19 Thread brian m. carlson
Make each_reflog_ent_fn take two struct object_id pointers instead of two pointers to unsigned char. Convert the various callbacks to use struct object_id as well. Also, rename fsck_handle_reflog_sha1 to fsck_handle_reflog_oid. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.

[PATCH v4 09/19] builtin/clone: convert to struct object_id

2017-02-19 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/clone.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/clone.c b/builtin/clone.c index 3f63edbbf9..b4c929bb8a 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -681,7

[PATCH v4 12/19] builtin/replace: convert to struct object_id

2017-02-19 Thread brian m. carlson
Convert various uses of unsigned char [20] to struct object_id. Rename replace_object_sha1 to replace_object_oid. Finally, specify a constant in terms of GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/replace.c

[PATCH v4 18/19] builtin/merge-base: convert to struct object_id

2017-02-19 Thread brian m. carlson
Convert the remaining uses of unsigned char [20] to struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/merge-base.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/builtin/merge-base.c b/builtin

[PATCH v4 00/19] object_id part 6

2017-02-19 Thread brian m. carlson
about unsafe casts. * Rebase on master. brian m. carlson (19): hex: introduce parse_oid_hex builtin/commit: convert to struct object_id builtin/diff-tree: convert to struct object_id builtin/describe: convert to struct object_id builtin/fast-export: convert to struct object_id builtin

[PATCH v4 16/19] sha1_file: introduce an nth_packed_object_oid function

2017-02-19 Thread brian m. carlson
provides a variable into which to store the value, which it returns on success; on error, it returns NULL, as nth_packed_object_sha1 does. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- cache.h | 6 ++ sha1_file.c | 17 ++--- 2 files changed, 20 insertions

[PATCH v4 08/19] builtin/branch: convert to struct object_id

2017-02-19 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/branch.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/builtin/branch.c b/builtin/branch.c index 9d30f55b0b..faf472ff8f 100644 --- a/builtin/branch.c +++ b/b

[PATCH v4 01/19] hex: introduce parse_oid_hex

2017-02-19 Thread brian m. carlson
Introduce a function, parse_oid_hex, which parses a hexadecimal object ID and if successful, sets a pointer to just beyond the last character. This allows for simpler, more robust parsing without needing to hard-code integer values throughout the codebase. Signed-off-by: brian m. carlson <s

[PATCH v4 17/19] Convert object iteration callbacks to struct object_id

2017-02-19 Thread brian m. carlson
Convert each_loose_object_fn and each_packed_object_fn to take a pointer to struct object_id. Update the various callbacks. Convert several 40-based constants to use GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/cat-file.c

[PATCH v4 06/19] builtin/fmt-merge-message: convert to struct object_id

2017-02-19 Thread brian m. carlson
Convert most of the code to use struct object_id, including struct origin_data and struct merge_parents. Convert several instances of hardcoded numbers into references to GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/fmt-merge-msg.

[PATCH v4 19/19] wt-status: convert to struct object_id

2017-02-19 Thread brian m. carlson
Convert the remaining uses of unsigned char [20] to struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- wt-status.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/wt-status.c b/wt-status.c

[PATCH v4 11/19] Convert remaining callers of resolve_refdup to object_id

2017-02-19 Thread brian m. carlson
There are a few leaf functions in various files that call resolve_refdup. Convert these functions to use struct object_id internally to prepare for transitioning resolve_refdup itself. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/notes.c

[PATCH v4 10/19] builtin/merge: convert to struct object_id

2017-02-19 Thread brian m. carlson
Additionally convert several uses of the constant 40 into GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/merge.c | 134 1 file changed, 66 insertions(+), 68 deletions(-) diff --git a/b

[PATCH v4 04/19] builtin/describe: convert to struct object_id

2017-02-19 Thread brian m. carlson
Convert the functions in this file and struct commit_name to struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/describe.c | 50 +- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/b

[PATCH v4 07/19] builtin/grep: convert to struct object_id

2017-02-19 Thread brian m. carlson
Convert several functions to use struct object_id, and rename them so that they no longer refer to SHA-1. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/grep.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/b

[PATCH v4 02/19] builtin/commit: convert to struct object_id

2017-02-19 Thread brian m. carlson
Convert most leaf functions to use struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/commit.c | 46 +++--- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c

[PATCH v4 13/19] reflog-walk: convert struct reflog_info to struct object_id

2017-02-19 Thread brian m. carlson
1 + E1.noid.hash @@ struct reflog_info *E1; @@ - E1->nsha1 + E1->noid.hash Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- reflog-walk.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/reflog-walk.c b/reflog-walk.c index f98748e2ae.

[PATCH v4 03/19] builtin/diff-tree: convert to struct object_id

2017-02-19 Thread brian m. carlson
the first NUL was a newline we overwrote. However, with parse_oid_hex, we no longer need to increment the pointer directly, and can simply increment it as part of our check for the space character. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> Signed-off-by: Jeff King <p...

Re: [PATCH v3 02/19] builtin/diff-tree: convert to struct object_id

2017-02-18 Thread brian m. carlson
sive about complaining about > nonsense on the line, rather than silently ignoring it. I'd come to basically the same patch, but I did pick up a few niceties from your patch, like avoiding the off-by-one issue you mentioned above. Can I place your sign-off on the resulting change? -- bria

[PATCH v5 11/19] Convert remaining callers of resolve_refdup to object_id

2017-02-21 Thread brian m. carlson
There are a few leaf functions in various files that call resolve_refdup. Convert these functions to use struct object_id internally to prepare for transitioning resolve_refdup itself. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/notes.c

[PATCH v5 10/19] builtin/merge: convert to struct object_id

2017-02-21 Thread brian m. carlson
Additionally convert several uses of the constant 40 into GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/merge.c | 134 1 file changed, 66 insertions(+), 68 deletions(-) diff --git a/b

[PATCH v5 14/19] refs: convert each_reflog_ent_fn to struct object_id

2017-02-21 Thread brian m. carlson
Make each_reflog_ent_fn take two struct object_id pointers instead of two pointers to unsigned char. Convert the various callbacks to use struct object_id as well. Also, rename fsck_handle_reflog_sha1 to fsck_handle_reflog_oid. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.

[PATCH v5 15/19] refs: simplify parsing of reflog entries

2017-02-21 Thread brian m. carlson
The current code for reflog entries uses a lot of hard-coded constants, making it hard to read and modify. Use parse_oid_hex and two temporary variables to simplify the code and reduce the use of magic constants. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- refs

[PATCH v5 06/19] builtin/fmt-merge-message: convert to struct object_id

2017-02-21 Thread brian m. carlson
Convert most of the code to use struct object_id, including struct origin_data and struct merge_parents. Convert several instances of hardcoded numbers into references to GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/fmt-merge-msg.

[PATCH v5 04/19] builtin/describe: convert to struct object_id

2017-02-21 Thread brian m. carlson
Convert the functions in this file and struct commit_name to struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/describe.c | 50 +- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/b

[PATCH v5 01/19] hex: introduce parse_oid_hex

2017-02-21 Thread brian m. carlson
Introduce a function, parse_oid_hex, which parses a hexadecimal object ID and if successful, sets a pointer to just beyond the last character. This allows for simpler, more robust parsing without needing to hard-code integer values throughout the codebase. Signed-off-by: brian m. carlson <s

[PATCH v5 02/19] builtin/commit: convert to struct object_id

2017-02-21 Thread brian m. carlson
Convert most leaf functions to use struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/commit.c | 46 +++--- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c

[PATCH v5 07/19] builtin/grep: convert to struct object_id

2017-02-21 Thread brian m. carlson
Convert several functions to use struct object_id, and rename them so that they no longer refer to SHA-1. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/grep.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/b

[PATCH v5 13/19] reflog-walk: convert struct reflog_info to struct object_id

2017-02-21 Thread brian m. carlson
1 + E1.noid.hash @@ struct reflog_info *E1; @@ - E1->nsha1 + E1->noid.hash Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- reflog-walk.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/reflog-walk.c b/reflog-walk.c index f98748e2ae.

[PATCH v5 17/19] Convert object iteration callbacks to struct object_id

2017-02-21 Thread brian m. carlson
Convert each_loose_object_fn and each_packed_object_fn to take a pointer to struct object_id. Update the various callbacks. Convert several 40-based constants to use GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/cat-file.c

[PATCH v5 03/19] builtin/diff-tree: convert to struct object_id

2017-02-21 Thread brian m. carlson
the first NUL was a newline we overwrote. However, with parse_oid_hex, we no longer need to increment the pointer directly, and can simply increment it as part of our check for the space character. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> Signed-off-by: Jeff King <p...

[PATCH v5 19/19] wt-status: convert to struct object_id

2017-02-21 Thread brian m. carlson
Convert the remaining uses of unsigned char [20] to struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- wt-status.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/wt-status.c b/wt-status.c

[PATCH v5 18/19] builtin/merge-base: convert to struct object_id

2017-02-21 Thread brian m. carlson
Convert the remaining uses of unsigned char [20] to struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/merge-base.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/builtin/merge-base.c b/builtin

[PATCH v5 09/19] builtin/clone: convert to struct object_id

2017-02-21 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/clone.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/clone.c b/builtin/clone.c index 3f63edbbf9..b4c929bb8a 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -681,7

[PATCH v5 00/19] object_id part 6

2017-02-21 Thread brian m. carlson
of parse_oid_hex. * Remove needless variable. * Rebase on master. Changes from v1: * Implement parse_oid_hex and use it. * Make nth_packed_object_oid take a variable into which to store the object ID. This avoids concerns about unsafe casts. * Rebase on master. brian m. carlson (19): hex: introduce

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