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
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
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
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
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
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
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 +
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
.
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
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
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
-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
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:
>
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
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
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 +
:
* 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
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
.
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
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.
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
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
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
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.
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
.
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
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
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
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(
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
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
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
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
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
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
&
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
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
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(
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
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
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.
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
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.
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
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
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
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
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
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
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.
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.
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
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
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
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
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
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
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
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
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
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
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
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
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(
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
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.
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
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.
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...
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
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
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
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.
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
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.
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
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
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
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
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.
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
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...
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
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
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
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
701 - 800 of 2261 matches
Mail list logo