Use the_hash_algo when parsing instead of GIT_SHA1_HEXSZ so that this
function works with any size hash. Rename the variable forty to
counter, as this is a better name and is independent of the hash size.
Signed-off-by: brian m. carlson
---
builtin/name-rev.c | 14 --
1 file
actly 64 hex characters.
Signed-off-by: brian m. carlson
---
perl/Git.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/perl/Git.pm b/perl/Git.pm
index d856930b2e..62c472e0ce 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -980,7 +980,7 @@ sub cat_blob {
retu
Convert struct stored_bitmap to use struct object_id.
Signed-off-by: brian m. carlson
---
pack-bitmap.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pack-bitmap.c b/pack-bitmap.c
index b53f37243c..c760913cea 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
@@ -18,7
Replace the uses of sha1_to_hex in the pack bitmap code with hash_to_hex
to allow the use of SHA-256 as well. Rename a few variables since they
are no longer limited to SHA-1.
Signed-off-by: brian m. carlson
---
pack-bitmap-write.c | 6 +++---
pack-bitmap.c | 8
2 files changed
Instead of using a specific invalid hard-coded object ID, produce one
of the appropriate length by using test_oid.
Signed-off-by: brian m. carlson
---
t/lib-submodule-update.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/lib-submodule-update.sh b/t/lib-submodule
Replace the uses of sha1_to_hex in this function with hash_to_hex to
allow the use of SHA-256 as well. Rename a variable since it is no
longer limited to SHA-1.
Signed-off-by: brian m. carlson
---
fast-import.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fast
There are some cases, such as the dumb HTTP transport and bundles, where
we can only determine the hash algorithm in use by the length of the
object IDs. Provide a function that looks up the algorithm by length.
Signed-off-by: brian m. carlson
---
hash.h | 2 ++
sha1-file.c | 8
2
To make this code independent of the hash size, verify that the length
of the comment is equal to that of any supported hash algorithm.
Signed-off-by: brian m. carlson
---
builtin/get-tar-commit-id.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/builtin/get-tar-commit
Change one hard-coded use of the constant 40 to a reference to
the_hash_algo. In addition, switch a use of get_oid_hex to
parse_oid_hex to avoid the need to use a constant.
Signed-off-by: brian m. carlson
---
remote-curl.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff
Signed-off-by: brian m. carlson
---
http.c | 10 +-
http.h | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/http.c b/http.c
index 993ddc956a..458d07fabb 100644
--- a/http.c
+++ b/http.c
@@ -2337,8 +2337,8 @@ static size_t fwrite_sha1_file(char *ptr, size_t eltsize
Switch a use of GIT_SHA1_HEXSZ to use the_hash_algo.
Signed-off-by: brian m. carlson
---
refspec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/refspec.c b/refspec.c
index f529092fd6..9a9bf21934 100644
--- a/refspec.c
+++ b/refspec.c
@@ -72,7 +72,7 @@ static int
Switch two hard-coded uses of 20 to references to the_hash_algo.
Signed-off-by: brian m. carlson
---
pack-bitmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pack-bitmap.c b/pack-bitmap.c
index 6d6fa68563..603492c237 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
Change the commit_sha1 member to be called "commit_oid" and change it to
be a pointer to struct object_id. Additionally, update some uses of
GIT_SHA1_HEXSZ and hard-coded values to use the_hash_algo instead.
Signed-off-by: brian m. carlson
---
archive-tar.c | 7 ---
archive-
Since sha1_to_hex is limited to SHA-1, replace it with hash_to_hex.
Signed-off-by: brian m. carlson
---
http.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/http.c b/http.c
index 458d07fabb..8ab07458e4 100644
--- a/http.c
+++ b/http.c
@@ -2079,19 +2079,19
e
following semantic patch:
@@
struct packed_git *E1;
@@
- E1->sha1
+ E1->hash
@@
struct packed_git E1;
@@
- E1.sha1
+ E1.hash
Signed-off-by: brian m. carlson
---
builtin/pack-redundant.c | 2 +-
fast-import.c| 17 +
http-push.c | 3 ++-
htt
Replace several uses of GIT_SHA1_HEXSZ and 40-based constants with
references to the_hash_algo. Update the note handling code here to
compute path sizes based on GIT_MAX_RAWSZ as well.
Signed-off-by: brian m. carlson
---
fast-import.c | 45 +
1 file
From: Rene Scharfe
Parse pax comment records properly and get rid of magic numbers for
acceptable comment length. This simplifies a later change to handle
longer hashes.
Signed-off-by: Rene Scharfe
Signed-off-by: brian m. carlson
---
builtin/get-tar-commit-id.c | 13 +++--
1 file
Instead of using get_oid_hex and GIT_SHA1_HEXSZ, use parse_oid_hex to
avoid the need for a constant and simplify the code.
Additionally, fix some comments to refer to object IDs instead of SHA-1
and update a constant used to provide an allocation hint.
Signed-off-by: brian m. carlson
Since sha1_to_hex is limited to SHA-1, switch all remaining uses of it
in this file to hash_to_hex or oid_to_hex. Modify update_remote to take
a pointer to struct object_id, and since we don't modify that parameter
in the function, set it to be const as well.
Signed-off-by: brian m. ca
beginning of the object ID before we get to printing the
error message.
Signed-off-by: brian m. carlson
---
builtin/difftool.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/builtin/difftool.c b/builtin/difftool.c
index a3ea60ea71..5fa83f481e 100644
--- a/builtin
Instead of using GIT_SHA1_HEXSZ, switch to using the_hash_algo and
parse_oid_hex to parse the lines involved in rebasing notes.
Signed-off-by: brian m. carlson
---
builtin/am.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/builtin/am.c b/builtin/am.c
index
Replace a hard-coded 40 with a reference to the_hash_algo.
Signed-off-by: brian m. carlson
---
http.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/http.c b/http.c
index a09adc518f..993ddc956a 100644
--- a/http.c
+++ b/http.c
@@ -2065,7 +2065,7 @@ int http_fetch_ref(const
t the structure to hold the maximum amount of data that may be
needed using a member called "data" and read and write this field
independently in the various places that need to read and write the
structure.
Signed-off-by: brian m. carlson
---
re
Instead of using a struct with a flex array member to read and write the
untracked cache extension, use a shorter, fixed-length struct and add
the name and hash data explicitly.
Signed-off-by: brian m. carlson
---
dir.c | 28 ++--
1 file changed, 14 insertions(+), 14
: brian m. carlson
---
http-backend.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/http-backend.c b/http-backend.c
index 29e68e38b5..ec3144b444 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -711,8 +711,11 @@ static struct service_cmd {
{"GET", "/objects/info/
Since sha1_to_hex is limited to SHA-1, replace the uses of it in this
file with hash_to_hex. Rename several variables accordingly to reflect
that they are no longer limited to SHA-1.
Signed-off-by: brian m. carlson
---
http-walker.c | 18 +-
1 file changed, 9 insertions(+), 9
ction. Finally, when formatting a log line, allow an
abbreviated describe output to contain up to 64 characters.
Helped-by: Ævar Arnfjörð Bjarmason
Signed-off-by: brian m. carlson
---
gitweb/gitweb.perl | 97 --
1 file changed, 67 insertions(+
Increase the checksum field in struct bitmap_disk_header to be
GIT_MAX_RAWSZ bytes in length and ensure that we hash the proper number
of bytes out when computing the bitmap checksum.
Signed-off-by: brian m. carlson
---
pack-bitmap-write.c | 2 +-
pack-bitmap.c | 2 +-
pack-bitmap.h
ed changes to Gitweb.
René Scharfe (1):
get-tar-commit-id: parse comment record
brian m. carlson (34):
t/lib-submodule-update: use appropriate length constant
khash: move oid hash table definition
pack-bitmap: make bitmap header handling hash agnostic
pack-bitmap: convert struct stored
Move the oid khash table definition to khash.h and define a typedef for
it, similar to the one we have for unsigned char pointers. Define
variants that are maps as well.
Signed-off-by: brian m. carlson
---
khash.h | 18 ++
oidset.h | 12
2 files changed, 18
Replace the uses of sha1_to_hex in this function with hash_to_hex to
allow the use of SHA-256 as well. Rename some variables since this code
is no longer limited to SHA-1.
Signed-off-by: brian m. carlson
---
notes.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git
Switch the lock token code to use the_hash_algo and increase its buffers
to be allocated using GIT_MAX_* constants. Update the parsing of object
paths to use the_hash_algo as well.
Signed-off-by: brian m. carlson
---
http-push.c | 20 ++--
1 file changed, 10 insertions(+), 10
Instead of using hard-coded 40-based constants, express these values in
terms of the_hash_algo and GIT_MAX_HEXSZ.
Signed-off-by: brian m. carlson
---
merge-recursive.c | 2 +-
submodule.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/merge-recursive.c b/merge
Instead of storing unsigned char pointers in the hash tables, switch to
storing instances of struct object_id. Update several internal functions
and one external function to take pointers to struct object_id.
Signed-off-by: brian m. carlson
---
builtin/pack-objects.c | 6 ++---
pack-bitmap.c
ut it.
Also, without specifying -u, we'd pick whatever key was the default in
the keyring, even if the email address for that key was wrong for the
commit.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
mail and not gitweb, and they're packaged
independently. I'm not opposed to seeing a patch to do that, but it
probably belongs in its own series.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
On Mon, Feb 11, 2019 at 10:32:15PM -0500, Eric Sunshine wrote:
> On Mon, Feb 11, 2019 at 8:23 PM brian m. carlson
> wrote:
> > This member is used to represent the pack checksum of the pack in
> > question. Expand this member to be GIT_MAX_RAWSZ bytes in length so it
> >
(and future us) in understanding what's going on.
This isn't me trying to be difficult, but rather to help you get your
patch in a state that's most likely to be accepted. It's common here to
do a couple of revisions of a patch, incorporating reviewers' comments
and polish
the user in whatever algorithms
we support, translate them into the default algorithm, and then use
them.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
different patch for this in a later series,
but I like this style better. I'm going to squash my existing patches
together and then rework them such that they're based off yours.
My technique iterated over the entire header, comparing the entire
header, which is much less elegant than this solution.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
On Tue, Feb 12, 2019 at 01:37:49AM -0500, Jeff King wrote:
> On Tue, Feb 12, 2019 at 01:22:29AM +0000, brian m. carlson wrote:
> > -static uint32_t find_object_pos(const unsigned char *sha1)
> > +static uint32_t find_object_pos(const unsigned char *hash)
>
> Isn't
On Mon, Feb 11, 2019 at 10:44:12PM -0500, Eric Sunshine wrote:
> On Mon, Feb 11, 2019 at 8:23 PM brian m. carlson
> wrote:
> > Replace several uses of GIT_SHA1_HEXSZ and 40-based constants with
> > references to the_hash_algo. Update the note handling code here to
> > com
On Mon, Feb 11, 2019 at 08:37:49PM -0500, Eric Sunshine wrote:
> On Mon, Feb 11, 2019 at 8:23 PM brian m. carlson
> wrote:
> > diff --git a/notes.c b/notes.c
> > @@ -527,15 +529,15 @@ static unsigned char determine_fanout(struct int_node
> > *tree, unsigned char
t the structure to hold the maximum amount of data that may be
needed using a member called "data" and read and write this field
independently in the various places that need to read and write the
structure.
Signed-off-by: brian m. carlson
---
re
actly 64 hex characters.
Signed-off-by: brian m. carlson
---
perl/Git.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/perl/Git.pm b/perl/Git.pm
index d856930b2e..62c472e0ce 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -980,7 +980,7 @@ sub cat_blob {
retu
Since sha1_to_hex is limited to SHA-1, replace it with hash_to_hex.
Signed-off-by: brian m. carlson
---
http.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/http.c b/http.c
index 458d07fabb..8ab07458e4 100644
--- a/http.c
+++ b/http.c
@@ -2079,19 +2079,19
Since sha1_to_hex is limited to SHA-1, replace the uses of it in this
file with hasH_to_hex. Rename several variables accordingly to reflect
that they are no longer limited to SHA-1.
Signed-off-by: brian m. carlson
---
http-walker.c | 18 +-
1 file changed, 9 insertions(+), 9
Switch a use of GIT_SHA1_HEXSZ to use the_hash_algo.
Signed-off-by: brian m. carlson
---
refspec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/refspec.c b/refspec.c
index f529092fd6..9a9bf21934 100644
--- a/refspec.c
+++ b/refspec.c
@@ -72,7 +72,7 @@ static int
Change one hard-coded use of the constant 40 to a reference to
the_hash_algo. In addition, switch a use of get_oid_hex to
parse_oid_hex to avoid the need to use a constant.
Signed-off-by: brian m. carlson
---
remote-curl.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff
Change the commit_sha1 member to be called "commit_oid" and change it to
be a pointer to struct object_id. Additionally, update two uses of
GIT_SHA1_HEXSZ to use the_hash_algo instead.
Signed-off-by: brian m. carlson
---
archive-tar.c | 6 +++---
archive-zip.c | 10 +-
: brian m. carlson
---
http-backend.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/http-backend.c b/http-backend.c
index 29e68e38b5..ec3144b444 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -711,8 +711,11 @@ static struct service_cmd {
{"GET", "/objects/info/
Replace the uses of sha1_to_hex in this function with hash_to_hex to
allow the use of SHA-256 as well. Rename a variable since it is no
longer limited to SHA-1.
Signed-off-by: brian m. carlson
---
fast-import.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fast
Instead of using a struct with a flex array member to read and write the
untracked cache extension, use a shorter, fixed-length struct and add
the name and hash data explicitly.
Signed-off-by: brian m. carlson
---
dir.c | 28 ++--
1 file changed, 14 insertions(+), 14
Replace the uses of sha1_to_hex in the pack bitmap code with hash_to_hex
to allow the use of SHA-256 as well. Rename a few variables since they
are no longer limited to SHA-1.
Signed-off-by: brian m. carlson
---
pack-bitmap-write.c | 6 +++---
pack-bitmap.c | 8
2 files changed
Since sha1_to_hex is limited to SHA-1, switch all remaining uses of it
in this file to hash_to_hex or oid_to_hex. Modify update_remote to take
a pointer to struct object_id, and since we don't modify that parameter
in the function, set it to be const as well.
Signed-off-by: brian m. ca
in a regex.
Similarly, switch the code that looks for deleted diffinfo information
to look for either 40 or 64 zeros, and update one piece of code to use
this function. Finally, when formatting a log line, allow an
abbreviated describe output to contain up to 64 characters.
Signed-off-by: brian m
Signed-off-by: brian m. carlson
---
http.c | 10 +-
http.h | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/http.c b/http.c
index 993ddc956a..458d07fabb 100644
--- a/http.c
+++ b/http.c
@@ -2337,8 +2337,8 @@ static size_t fwrite_sha1_file(char *ptr, size_t eltsize
Make the tar generation code hash size independent by using
the_hash_algo. Make the tar parsing code compute the header value based
on the hash algorithm in use. Update a variable name and switch to
hash_to_hex.
Signed-off-by: brian m. carlson
---
archive-tar.c | 7
Replace several uses of GIT_SHA1_HEXSZ and 40-based constants with
references to the_hash_algo. Update the note handling code here to
compute path sizes based on GIT_MAX_RAWSZ as well.
Signed-off-by: brian m. carlson
---
fast-import.c | 27 +++
1 file changed, 15
Switch out various uses of the GIT_SHA1_* constants with GIT_MAX_*
constants for allocations and the_hash_algo for general parsing. Update
a comment to no longer be SHA-1 specific.
Signed-off-by: brian m. carlson
---
notes.c | 32 +---
1 file changed, 17 insertions
Replace a hard-coded 40 with a reference to the_hash_algo.
Signed-off-by: brian m. carlson
---
http.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/http.c b/http.c
index a09adc518f..993ddc956a 100644
--- a/http.c
+++ b/http.c
@@ -2065,7 +2065,7 @@ int http_fetch_ref(const
Instead of using hard-coded 40-based constants, express these values in
terms of the_hash_algo and GIT_MAX_HEXSZ.
Signed-off-by: brian m. carlson
---
merge-recursive.c | 2 +-
submodule.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/merge-recursive.c b/merge
Switch two hard-coded uses of 20 to references to the_hash_algo.
Signed-off-by: brian m. carlson
---
pack-bitmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pack-bitmap.c b/pack-bitmap.c
index 6d6fa68563..603492c237 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
Switch the lock token code to use the_hash_algo and increase its buffers
to be allocated using GIT_MAX_* constants. Update the parsing of object
paths to use the_hash_algo as well.
Signed-off-by: brian m. carlson
---
http-push.c | 20 ++--
1 file changed, 10 insertions(+), 10
Instead of using get_oid_hex and adding constants to the result, use
parse_oid_hex to make this code independent of the hash size.
Signed-off-by: brian m. carlson
---
builtin/difftool.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/builtin/difftool.c b/builtin
Switch from using GIT_SHA1_HEXSZ to GIT_MAX_HEXSZ and the_hash_algo so
that the code works with any hash algorithm.
Signed-off-by: brian m. carlson
---
notes-merge.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/notes-merge.c b/notes-merge.c
index 280aa8e6c1
Convert struct stored_bitmap to use struct object_id.
Signed-off-by: brian m. carlson
---
pack-bitmap.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pack-bitmap.c b/pack-bitmap.c
index b53f37243c..c760913cea 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
@@ -18,7
Instead of using get_oid_hex and GIT_SHA1_HEXSZ, use parse_oid_hex to
avoid the need for a constant and simplify the code.
Signed-off-by: brian m. carlson
---
builtin/pull.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/builtin/pull.c b/builtin/pull.c
index 701d1473dc
Instead of using GIT_SHA1_HEXSZ, switch to using the_hash_algo and
parse_oid_hex to parse the lines involved in rebasing notes.
Signed-off-by: brian m. carlson
---
builtin/am.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/builtin/am.c b/builtin/am.c
index
Use the_hash_algo when parsing instead of GIT_SHA1_HEXSZ so that this
function works with any size hash. Rename the variable forty to
counter, as this is a better name and is independent of the hash size.
Signed-off-by: brian m. carlson
---
builtin/name-rev.c | 14 --
1 file
Replace the uses of sha1_to_hex in this function with hash_to_hex to
allow the use of SHA-256 as well. Rename some variables since this code
is no longer limited to SHA-1.
Signed-off-by: brian m. carlson
---
notes.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git
e
following semantic patch:
@@
struct packed_git *E1;
@@
- E1->sha1
+ E1->hash
@@
struct packed_git E1;
@@
- E1.sha1
+ E1.hash
Signed-off-by: brian m. carlson
---
builtin/pack-redundant.c | 2 +-
fast-import.c| 17 +
http-push.c | 3 ++-
htt
Increase the checksum field in struct bitmap_disk_header to be
GIT_MAX_RAWSZ bytes in length and ensure that we hash the proper number
of bytes out when computing the bitmap checksum.
Signed-off-by: brian m. carlson
---
pack-bitmap-write.c | 2 +-
pack-bitmap.c | 2 +-
pack-bitmap.h
ns.objectFormat and makes it so that it works
(transition-stage-4).
brian m. carlson (31):
t/lib-submodule-update: use appropriate length constant
pack-bitmap: make bitmap header handling hash agnostic
pack-bitmap: convert struct stored_bitmap to object_id
pack-bitmap: replace sha1_to_he
Instead of using a specific invalid hard-coded object ID, produce one
of the appropriate length by using test_oid.
Signed-off-by: brian m. carlson
---
t/lib-submodule-update.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/lib-submodule-update.sh b/t/lib-submodule
On Mon, Feb 11, 2019 at 04:31:00PM -0800, Junio C Hamano wrote:
> "brian m. carlson" writes:
>
> >> - cat lf.utf8.raw | iconv -f UTF-8 -t UTF-${i} >lf.utf${i}.raw &&
> >> - cat crlf.utf8.raw | iconv -f UTF-8 -t UTF-${i} >crlf.ut
lization according to the Unicode standard.
Preserve the existing behavior for systems which do not have this knob
enabled, since they may use optimized implementations, including
defaulting to the native endianness, which may improve performance.
Signed-off-by: brian m. carlson
---
Makefile
e keys instead of others?
Perhaps you could send a v2 with a more comprehensive commit message
that provides some of these answers.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
i}.raw &&
> + cat crlf.utf8.raw | eval "write_utf${i}" >crlf.utf${i}.raw &&
> cp crlf.utf${i}.raw eol.utf${i} &&
>
> cat >expectIndexLF <<-EOF &&
I'll squash in this fix, thanks.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
lization according to the Unicode standard.
Preserve the existing behavior for systems which do not have this knob
enabled, since they may use optimized implementations, including
defaulting to the native endianness, which may improve performance.
Signed-off-by: brian m. carlson
---
Makefile
On Sun, Feb 10, 2019 at 08:16:26PM -0500, Eric Sunshine wrote:
> On Sun, Feb 10, 2019 at 7:23 PM brian m. carlson
> wrote:
> > When serializing UTF-16 (and UTF-32), there are three possible ways to
> > write the stream. One can write the data with a BOM in either big-endian
&g
lization according to the Unicode standard.
Preserve the existing behavior for systems which do not have this knob
enabled, since they may use optimized implementations, including
defaulting to the native endianness, which may improve performance.
Signed-off-by: brian m. carlson
---
Makefile
On Sun, Feb 10, 2019 at 08:04:13AM +, Torsten Bögershausen wrote:
> On Sat, Feb 09, 2019 at 08:08:01PM +0000, brian m. carlson wrote:
> > Preserve the existing behavior for systems which do not have this knob
> > enabled, since they may use optimized implementations, including
On Sat, Feb 09, 2019 at 08:45:16PM -0500, Eric Sunshine wrote:
> On Sat, Feb 9, 2019 at 3:08 PM brian m. carlson
> wrote:
> > [...]
> > Add a Makefile and #define knob, ICONV_NEEDS_BOM, that can be set if the
> > iconv implementation has this behavior. When set, Git will
lization according to the Unicode standard.
Preserve the existing behavior for systems which do not have this knob
enabled, since they may use optimized implementations, including
defaulting to the native endianness, to gain improved performance, which
can be significant with large checkouts.
Signed
On Fri, Feb 08, 2019 at 03:12:22PM -0800, Junio C Hamano wrote:
> "brian m. carlson" writes:
>
> > +test_lazy_prereq NO_BOM '
> > + printf abc | iconv -f UTF-8 -t UTF-16 &&
> > + test $(wc -c) = 6
> > +'
>
> This must be &q
pose one
argument is fine. Otherwise, it might be better to expose key-value
pairs on stdin instead, or something like that.
Finally, I have questions about performance. What's the overhead of
determining whether the hook exists in this code path when there isn't
one? Since the index is frequently used, and can be written out as an
optimization by some commands, it would be nice to keep overhead low if
the hook isn't present.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
't matter to me one way or another, as
> long as I can get the dependency to /dev/zero removed so tests will run here.
My preference is that we wrap the yes/tr invocation into a function
(maybe "infinite_nul") and use that where we currently require
/dev/zero.
--
brian m. c
dn't think the
> command-line tool was. If it really is available everywhere, then yeah,
> I'd be fine with it.
It's not. POSIX doesn't specify the command, and macOS lacks it, I
believe.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
through, but test 3 then fails, because git itself output the file
> without BOM, presumably because it's passed through iconv.
>
> So I'm not sure if it's a matter of just fixing the tests.
I think something like the following will likely work in this scenario:
--
On Fri, Feb 08, 2019 at 12:55:11PM +0100, Kevin Daudt wrote:
> On Fri, Feb 08, 2019 at 11:45:02AM +0000, brian m. carlson wrote:
> > On Fri, Feb 08, 2019 at 01:04:03AM -0500, Rich Felker wrote:
> > [..]
> > > In any case, this test seems mainly relevant to Windows user
e with the fact that the test (and
the corresponding functionality) won't work as expected with UTF-16,
then I agree that no action is needed.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
6 (with
a proper BOM) with musl and Git will have their data corrupted,
according to my reading of the musl website.
In other words, I believe this test is failing legitimately.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
nstead.
That's fine with me. Sorry about the delay getting the reroll in.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
using freed memory. git
index-pack will read the repository's shallow file, which will have been
updated with the correct information.
Signed-off-by: brian m. carlson
---
fetch-pack.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/fetch-pack.c b/fetch-pack.c
index 577faa6229..a9262
sounds like a good idea to me.
I'll reroll with that change and a commit message update. I think it's
important that we get this issue fixed for the release, and then we can
choose to implement a more comprehensive solution later.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
On Mon, Feb 04, 2019 at 09:18:14PM -0500, Larry Martell wrote:
> On Mon, Feb 4, 2019 at 9:15 PM brian m. carlson
> wrote:
> > If you want to generate a file, you can certainly do that in the
> > post-commit hook or using a Makefile target. You just can't check it
>
you could do is "git log --pretty='tformat:%H%n%B' HEAD".
That will print the commit hash and commit message to standard output
for each commit. If you want just one commit, you can use "-1".
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
signed for checking and
notification, not for editing the commit, with the exception of the
commit message hooks, which are designed only for editing the commit
message, not the contents.
The pre-receive hook runs on the server side, so if you aren't running
it there, then it won't get ca
nk there if there is one, and run "git init", and things should be
fixed.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
signature.asc
Description: PGP signature
301 - 400 of 2732 matches
Mail list logo