In various places throughout the codebase, we need to read data into a
struct object_id from a pack or other unsigned char buffer. Add an
inline function that does this based on the current hash algorithm in
use, and use it in several places.
Signed-off-by: brian m. carlson <s
On Mon, Apr 30, 2018 at 09:53:33PM -0400, Eric Sunshine wrote:
> On Mon, Apr 30, 2018 at 8:02 PM, brian m. carlson
> <sand...@crustytoothpaste.net> wrote:
> > When formatting a series of patches using --attach and --cover-letter,
> > the cover letter lacks the closing MIME
On Tue, May 01, 2018 at 12:22:43PM +0200, Duy Nguyen wrote:
> On Mon, Apr 23, 2018 at 11:39:18PM +0000, brian m. carlson wrote:
> > There are several instances of the constant 20 and 20-based values in
> > the packfile code. Abstract away dependence on SHA-1 by using the
On Tue, May 01, 2018 at 11:36:03AM +0200, Duy Nguyen wrote:
> On Mon, Apr 23, 2018 at 11:39:11PM +0000, brian m. carlson wrote:
> > diff --git a/cache.h b/cache.h
> > index bbaf5c349a..4bca177cf3 100644
> > --- a/cache.h
> > +++ b/cache.h
> > @@ -1008,6 +1008,11 @@
d the rest of them) in it.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
e
As mentioned, I'm a bit unsure that patches 7 and 8 are entirely
correct. I've mostly convinced myself that they are after looking at
peel_onion, but I'm still harboring lingering doubts for some reason.
The rest of the series looked fine to me. Thanks for cleaning up my
stray newline.
--
bri
J_BLOB)
> lookup_flags |= GET_OID_BLOB;
>
I was concerned at first that this might lead to some sort of wrong
behavior when we do something like "git rev-parse v2.17.0^{tree}", but
looking at the code I've mostly convinced myself that that should still
work.
--
brian m. car
is not very useful, always emit it as text/plain,
avoiding the boundary problem altogether.
Reported-by: Patrick Hemmer <g...@stormcloud9.net>
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
builtin/log.c | 2 +-
log-tree.c | 7 ---
On Mon, Apr 30, 2018 at 08:03:12PM +0200, Duy Nguyen wrote:
> On Tue, Apr 24, 2018 at 1:39 AM, brian m. carlson
> <sand...@crustytoothpaste.net> wrote:
> > [0] I can synthesize blobs, trees, and commits, but things are currently
> > totally broken, which is, I suppose, to
ry, but I
think you make a good argument that perhaps omitting the entire
multipart portion would be better.
I'll have to work on this after work, so expect a patch later today.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
> clients (Thunderbird in my case) to discard the message body.
> This is experienced with git 2.16.3.
Thanks for reporting this. I can confirm this with a reasonably recent
next. Let me see if I can come up with a patch.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://ke
data? That doesn't seem like a good idea.
But also, some of the candidates we're considering for NewHash are
actually faster than SHA-1. So for performance reasons alone, it might
be useful to adopt a consistent scheme.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
member in struct object_context
> - server-info: remove unused members from struct pack_info
> - cache: add a function to read an object ID from a buffer
>
> Conversion from uchar[20] to struct object_id continues.
I do plan to reroll this, and if you want to forge my sign-off on the
pat
On Tue, Apr 24, 2018 at 11:58:17AM +0200, Martin Ågren wrote:
> On 24 April 2018 at 01:39, brian m. carlson
> > diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
> > index c4272fbc96..5f35596c14 100644
> > --- a/builtin/receive-pack.c
> > +++ b/builtin/re
k\n")) {
> >> + get_sha1_hex(data + i + 6, hash);
> >> + fetch_and_setup_pack_index(packs_head,
> >> hash,
> >> base_url);
> >> i += 51;
> >
> > s/51/hexsz + 11/ ?
>
> Quite right.
Good point. Will fix.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
On Tue, Apr 24, 2018 at 11:50:16AM +0200, Martin Ågren wrote:
> On 24 April 2018 at 01:39, brian m. carlson
> <sand...@crustytoothpaste.net> wrote:
> > The code for reading certain pack v2 offsets had a hard-coded 5
> > representing the number of uint32_t words tha
On Tue, Apr 24, 2018 at 03:00:55AM +0200, SZEDER Gábor wrote:
> > This script hard-codes the object ID of the empty tree. To avoid any
>
> s/tree/blob/
>
> > problems when changing hashes, compute this value by calling git
> > hash-object.
>
> Missing signof
se functions.
Ah, yes, I remember that recursive call chain.
Anyway, other than the one item I mentioned earlier, this series looked
good to me.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
ing the macro to definition to
>
> #define sha1_object_info(r, sha1, size) \
> (r, sha1_object_info_##r(sha1, size)).
I think you may have wanted to write "oid_object_info" here.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
it should expect.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
packfile.c | 66 ++
1 file changed, 37 insertions(+), 29 deletions(-)
diff --git a/packfile.c b/packfile.c
index 84acd405e0..b7bc4eab17 100644
--- a/packfile.c
Use the_hash_algo to look up the length of our current hash instead of
hard-coding the value 20.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
tree-walk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tree-walk.c b/tree-walk.c
index e11b
Since the only caller of this function already uses struct object_id,
update get_tree_entry_follow_symlinks to use it in parameters and
internally.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
sha1_name.c | 4 ++--
tree-walk.c | 16
tree-walk.h | 2
Instead of using hard-coded instances of the constant 20, use
the_hash_algo to look up the correct constant.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
builtin/pack-redundant.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/builti
Convert the base_sha1 member of struct split_index to use struct
object_id and rename it base_oid. Include cache.h to make the structure
visible.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
builtin/rev-parse.c | 4 ++--
read-cache.c
The code for reading certain pack v2 offsets had a hard-coded 5
representing the number of uint32_t words that we needed to skip over.
Specify this value in terms of a value from the_hash_algo.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
builtin/index-pack.c | 3
Convert struct submodule and struct parse_config_parameter to use struct
object_id. Adjust the functions which take members of these structures
as arguments to also use struct object_id. Include cache.h into
submodule-config.h to make struct object_id visible.
Signed-off-by: brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
commit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/commit.c b/commit.c
index ca474a7c11..9617f85caa 100644
--- a/commit.c
+++ b/commit.c
@@ -331,7 +331,7 @@ int parse_commit_buffer(struct commit
Convert this function to take a pointer to struct object_id and rename
it has_object_pack for consistency with has_object_file.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
builtin/count-objects.c | 2 +-
builtin/fsck.c | 2 +-
builtin/prune-packed.
Convert several uses of EMPTY_TREE_SHA1_BIN to use the_hash_algo
and struct object_id instead.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
builtin/am.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/builtin/am.c b/builtin/am.c
index 9c82
Instead of using hard-coded 40 constants, refer to the_hash_algo for the
current hash size.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
diff.c | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/diff.c b/diff.c
index 314c
Convert two static functions to use struct object_id and parse_oid_hex,
instead of relying on harcoded 20 and 40-based constants.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
fsck.c | 20 +++-
1 file changed, 11 insertions(+), 9 deletions(-)
diff
Convert one use of EMPTY_TREE_SHA1_HEX to use oid_to_hex and
the_hash_algo to avoid a dependency on a given hash algorithm.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
builtin/receive-pack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/b
-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
wt-status.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/wt-status.c b/wt-status.c
index 50815e5faf..857724bd60 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -600,10 +600,11 @@ stati
This script hard-codes the object ID of the empty tree. To avoid any
problems when changing hashes, compute this value by calling git
hash-object.
---
git-merge-one-file.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh
index
To ensure that we are hash algorithm agnostic, use the_hash_algo to look
up the object ID for the empty blob instead of using the empty_tree_oid
variable.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
The read_empty and reset_hard functions are static and their callers
have already changed to use struct object_id, so convert them as well.
To avoid dependency on the hash algorithm in use, switch from using
EMPTY_TREE_SHA1_HEX to using oid_to_hex with the_hash_algo.
Signed-off-by: brian m
Convert the last use of EMPTY_TREE_SHA1_BIN to use a direct copy from
the_hash_algo->empty_tree to avoid a dependency on a given hash
algorithm.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
builtin/reset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
d
When comparing an object ID against that of the empty tree, use the
is_empty_tree_oid function to ensure that we abstract over the hash
algorithm properly. In addition, this is more readable than a plain
oidcmp.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
cache-tree
Convert one use of EMPTY_TREE_SHA1_HEX to use oid_to_hex and
the_hash_algo to avoid a dependency on a given hash algorithm.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
sequencer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sequenc
the need for constants and simplify the code at the same
time.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
upload-pack.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/upload-pack.c b/upload-pack.c
index 4a82602be5..0858527c5b
Convert struct llist_item and the rest of the linked list code to use
struct object_id. Add a use of GIT_MAX_HEXSZ to avoid a dependency on a
hard-coded constant.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
builtin/pack-redundant.
To ensure that we are hash algorithm agnostic, use the_hash_algo to look
up the object ID for the empty tree instead of using the empty_tree_oid
variable.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
sequencer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Use the_hash_algo to find the right size for parsing pack names.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
http.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/http.c b/http.c
index 3034d10b68..ec70676748 100644
--- a/http.c
+++ b/
Several of our shell scripts hard-code the object ID of the empty tree.
To avoid any problems when changing hashes, compute this value on
startup of the script. For performance, store the value in a variable
and reuse it throughout the life of the script.
Signed-off-by: brian m. carlson <s
The sha1 member in struct pack_entry is unused except for one instance
in which we store a value in it. Since nobody ever reads this value,
don't bother to compute it and remove the member from struct pack_entry.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
cache.h
Convert find_pack_entry and the static function fill_pack_entry to take
pointers to struct object_id.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
packfile.c | 12 ++--
packfile.h | 2 +-
sha1_file.c | 6 +++---
3 files changed, 10 insertions(+), 10 del
Replace two uses of the hard-coded constant 40 with references to
the_hash_algo.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
revision.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/revision.c b/revision.c
index ce0e7b71f2..daf7fe6ff4
To avoid dependency on a particular hash algorithm, convert a use of
EMPTY_TREE_SHA1_HEX to use the_hash_algo->empty_tree instead. Since
both branches now use oid_to_hex, condense the if statement into a
ternary.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
me
Instead of using hard-coded instances of the constant 20, use
the_hash_algo to look up the correct constant.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
builtin/pack-objects.c | 30 --
1 file changed, 16 insertions(+), 14 deletions(-)
Convert the exclude_sha1 member of struct untracked_cache_dir and rename
it to exclude_oid. Eliminate several hard-coded integral constants, and
update a function name that referred to SHA-1.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
The head member of struct pack_info is completely unused and the
nr_heads member is used only in one place, which is an assignment.
Since these structure members are not useful, remove them.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
server-info.c | 3 ---
1 file c
The tree member of struct object_context is unused except in one place
where we write to it. Since there are no users of this member, remove
it.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
cache.h | 1 -
sha1_name.c | 1 -
2 files changed, 2 deletions(-)
diff
There really isn't any case in which we want to expose the constants for
empty trees and blobs outside of using the hash algorithm abstraction.
Make these constants static and stop exposing the defines in cache.h.
Remove the constants which are no longer in use.
Signed-off-by: brian m. carlson
Convert several uses of EMPTY_TREE_SHA1_HEX to use oid_to_hex and
the_hash_algo to avoid a dependency on a given hash algorithm.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
submodule.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/submodu
and its length and validity are entirely controlled by the
server. Consequently, defer updating this code until that point.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
builtin/receive-pack.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/b
Adjust struct index_state to use struct object_id instead of unsigned
char [20].
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
cache.h | 2 +-
read-cache.c | 16
t/helper/test-dump-split-index.c | 2 +-
Convert the code that looks up cached objects to use struct object_id.
Adjust the lookup for empty trees to use the_hash_algo. Note that we
don't need to be concerned about the hard-coded object ID in the
empty_tree object since we never use it.
Signed-off-by: brian m. carlson <s
Convert the various functions for freshening objects and
has_loose_object_nonlocal to use struct object_id.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
builtin/pack-objects.c | 2 +-
cache.h| 2 +-
sha1_file.c
The interactive add script hard-codes the object ID of the empty tree.
To avoid any problems when changing hashes, compute this value when used
and cache it for any future uses.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
git-add--interactive.perl | 11 +--
, to be expected.
brian m. carlson (41):
cache: add a function to read an object ID from a buffer
server-info: remove unused members from struct pack_info
Remove unused member in struct object_context
packfile: remove unused member from struct pack_entry
packfile: convert has_sha1_pack to object_id
In various places throughout the codebase, we need to read data into a
struct object_id from a pack or other unsigned char buffer. Add an
inline function that does this based on the current hash algorithm in
use, and use it in several places.
Signed-off-by: brian m. carlson <s
stamps with touch.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
o library that supports TLS 1.2. As of June
30, TLS 1.0 will be pretty much dead on the Internet.
[0] I surmised this from https://www.ssllabs.com/ssltest/clients.html,
but I don't use macOS so can't speak for certain.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
other three patches deal with standalone "\--" which we can't
> always turn into "--" since it can be rendered as an em dash.
This series looked sane to me as well. I appreciate the work to keep
our documentation working in both AsciiDoc and Asciidoctor.
--
brian m. carlson
On Mon, Apr 16, 2018 at 02:05:32PM +0900, Junio C Hamano wrote:
> "brian m. carlson" <sand...@crustytoothpaste.net> writes:
>
> > On Tue, Apr 10, 2018 at 04:24:27AM -0400, Eric Sunshine wrote:
> >> How confident are we that _all_ possible signing programs wi
other than OpenPGP and CMS, it's the only scheme I've seen
people use with Git.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
On Tue, Apr 10, 2018 at 02:26:15PM -0700, Stefan Beller wrote:
> This is the followup for
> https://public-inbox.org/git/xmqqbmer4vfh@gitster-ct.c.googlers.com/
>
> We have no files left with underscores in their names.
This series looked good to me. It's a nice change.
ngs" already that's clearly not a codepath that's going to
> warn.
Thanks for this patch. I ran into this earlier this week (with git svn
fetch) and had intended to send a patch, but you clearly got to it
before I did.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
On Mon, Mar 26, 2018 at 03:18:20PM -0700, Junio C Hamano wrote:
> "brian m. carlson" <sand...@crustytoothpaste.net> writes:
>
> > The test enumerates reflog entries in an arbitrary order and then sorts
> > them. For SHA-1, this produces results that happen
a test helper to
translate them so that we get functionally equivalent results. t1512 is
another great example of this same kind of test.
--
brian m. carlson / brian with sandals: Houston, Texas, US
https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204
sig
onnection cache to machines that don't do STARTTLS (which, much to my
annoyance, vger doesn't offer).
In short, I don't think this is going to be especially helpful because
it won't change the status quo for a lot of senders. You'd have to
insert some significant delay in order to get the effec
instead of the object ID. Remove an assumption about
the length of a hash by using cut with the delimiter and field options
instead of the character range option.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
t/t1405-main-ref-store.sh | 4 ++--
1 file changed, 2 insertions
Adjust the test so that it computes the expected hash value dynamically
instead of relying on a hard-coded hash. Hoist some code earlier in the
test to make this possible.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
t/t1011-read-tree-sparse-checkout.sh | 7 ---
Adjust the test so that it uses the computed blob value instead of
hard-coding a hash.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
t/t1300-repo-config.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/t/t1300-repo-config.sh b/t/t130
Use the $EMPTY_BLOB variable instead of hard-coding a hash.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
t/t2107-update-index-basic.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/t/t2107-update-index-basic.sh b/t/t2107-update-index-ba
Adjust the test so that it uses a variable consisting of the current
HEAD instead of a hard-coded hash.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
t/t1411-reflog-show.sh | 21 +++--
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/t
Adjust the test so that it uses variables and command substitution for
blobs instead of hard-coded hashes.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
t/t2101-update-index-reupdate.sh | 41
1 file changed, 21 insertions(+), 20 del
.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
t/t2101-update-index-reupdate.sh | 52 ++--
1 file changed, 29 insertions(+), 23 deletions(-)
diff --git a/t/t2101-update-index-reupdate.sh b/t/t2101-update-index-reupdate.sh
index c8bce8c2e4..1687
Adjust the test so that it uses a variable consisting of the current
HEAD instead of a hard-coded hash.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
t/t1507-rev-parse-upstream.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/t/t1507-rev
Adjust the test so that it uses variables for the revisions we're
checking out instead of hard-coded hashes.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
t/t2020-checkout-detach.sh | 40 +++---
1 file changed, 24 insertions(+), 16 del
Adjust the test so that it uses the $EMPTY_BLOB value instead of
hard-coding the hash.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
t/t1304-default-acl.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t1304-default-acl.sh b/t/t1304-default-
been tested using my "short BLAKE2b" series (branch
blake2b-test-hash) and have also been tested based off master.
Comments on any aspect of this series are welcome, but opinions on the
approach or style are especially so.
brian m. carlson (10):
t1011: abstract away SHA-1-specific
> object to object_id).
This looks good to me.
--
brian m. carlson / brian with sandals: Houston, Texas, US
https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
at there were alignment issues with doing this,
> > but I might have be remembering wrongly - in my limited knowledge of C
> > alignment, both "unsigned char *" and "struct object_id *" have the same
> > constraints, but I'm not sure.
>
> Adding Brian
c. I'll
probably pick that piece up next.
By the way, thanks for a useful regex. It's a little bit different
than what I've been using, but provides a nice overview.
--
brian m. carlson / brian with sandals: Houston, Texas, US
https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
On Wed, Mar 14, 2018 at 10:31:37AM -0700, Junio C Hamano wrote:
> "brian m. carlson" <sand...@crustytoothpaste.net> writes:
>
> > -+ buf += the_hash_algo->rawsz;
> > -+ size -= the_hash_algo->rawsz;
> > ++
Convert the various *_sha1 members to use struct object_id instead.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
wt-status.c | 12 ++--
wt-status.h | 6 +++---
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/wt-status.c b/wt-status.c
index 5c68
th references to the_hash_algo.
Changes from v1:
* Rebase onto master.
tbdiff output below.
brian m. carlson (36):
bulk-checkin: convert index_bulk_checkin to struct object_id
builtin/write-tree: convert to struct object_id
cache-tree: convert write_*_as_tree to object_id
cache-tree: conver
Convert the sha1 member of this struct to be an array of struct
object_id instead. This change is needed to convert find_unique_abbrev.
Convert some instances of hard-coded constants to use the_hash_algo as
well.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
buil
Convert find_unique_abbrev and find_unique_abbrev_r to each take a
pointer to struct object_id.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
builtin/blame.c| 2 +-
builtin/branch.c | 2 +-
builtin/checkout.c | 6 +++---
builtin/describe.c
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
ed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
http-walker.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/http-walker.c b/http-walker.c
index 07c2b1af82..f506f394ac 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -22,7 +22,7 @@ enum object_r
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
builtin/fsck.c | 2 +-
cache.h| 4 ++--
sha1_file.c| 10 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/builtin/fsck.c b/builtin/fsck.c
index ef78c6c00c..eae018e3fb 100644
--- a/b
lookup_replace_object, open_istream needs to be converted, and
open_istream needs check_sha1_signature to be converted, causing a loop
of dependencies. The temporaries will be removed in a future patch.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
builtin/fast-export.
Convert the remaining function, feed_object, to use struct object_id.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
send-pack.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/send-pack.c b/send-pack.c
index 8d9190f5e7..19025a7aca
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
@@
Convert this struct to use a member of type object_id. Convert various
static functions as well.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
builtin/index-pack.c | 34 +-
1 file changed, 17 insertions(+), 17 deletions(-)
diff
Convert the write_archive_entry_fn_t type to use a pointer to struct
object_id. Convert various static functions in the tar and zip
archivers also.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
archive-tar.c | 28 ++--
archive-zip.
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(
Convert get_tree_entry and find_tree_entry to take pointers to struct
object_id.
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net>
---
archive.c | 4 ++--
blame.c| 6 ++
builtin/rm.c | 2 +-
builtin/update-index.c | 2 +-
line
601 - 700 of 2261 matches
Mail list logo