Both sha1_to_hex_r() and oid_to_hex_r() take two parameters, so use two
expressions in the semantic patch for transforming calls of the former
to the latter one.
Signed-off-by: Rene Scharfe
---
contrib/coccinelle/object_id.cocci | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
Replace uses of strbuf_addf() for adding strings with more lightweight
strbuf_addstr() calls. This makes the intent clearer and avoids
potential issues with printf format specifiers.
02962d36845b89145cd69f8bc65e015d78ae3434 already converted six cases,
this patch covers eleven more.
A semantic p
Provide a simple way to run Coccinelle against all source files, in the
form of a Makefile target. Running "make coccicheck" applies each
.cocci file in contrib/coccinelle/ on all source files. It generates
a .patch file for each .cocci file, containing the actual changes for
effecting the transf
Am 15.09.2016 um 21:38 schrieb Jeff King:
On Thu, Sep 15, 2016 at 12:25:43PM -0700, Junio C Hamano wrote:
Silly question: Is there a natural language that uses percent signs
as letters or e.g. instead of commas? :)
I don't know, but if they do, they'd better get used to escaping them.
:)
I
Am 15.09.2016 um 22:01 schrieb Junio C Hamano:
> René Scharfe writes:
>
>> Take this for example:
>>
>> -strbuf_addf(&o->obuf, _("(bad commit)\n"));
>> +strbuf_addstr(&o->obuf, _("(bad commit
Am 17.09.2016 um 14:51 schrieb Anatoly Borodin:
> Hi All!
>
> First bug:
>
> git log -3 --pretty='%C(cyan)%C(auto)%h%C(auto)%d %s'
>
> prints %h with the default color (normal yellow), but
>
> git log -3 --pretty='%C(bold cyan)%C(auto)%h%C(auto)%d %s'
>
> shows %h with bold yellow,
Am 18.09.2016 um 14:30 schrieb Anatoly Borodin:
On Sat, Sep 17, 2016 at 8:25 PM, René Scharfe wrote:
I'm not sure how just how automatic %C(auto) is supposed to be, but you
expected it do emit the reset for you, right? Sounds reasonable to me.
I don't see a good reason not to do
Add a static initializer for struct checkout and use it throughout the
code base. It's shorter, avoids a memset(3) call and makes sure the
base_dir member is initialized to a valid (empty) string.
Signed-off-by: Rene Scharfe
---
apply.c | 4 +---
builtin/checkout-index.c | 2 +-
Starting with v2.5.0 git merge can handle FETCH_HEAD internally and
warns when it's called like 'git merge HEAD ' because
that syntax is deprecated. Use this feature in git-gui and get rid of
that warning.
Signed-off-by: Rene Scharfe
---
Tested only _very_ lightly!
git-gui/lib/merge.tcl | 7 +
Add COPY_ARRAY, a safe and convenient helper for copying arrays,
complementing ALLOC_ARRAY and REALLOC_ARRAY. Users just specify source,
destination and the number of elements; the size of an element is
inferred automatically.
It checks if the multiplication of size and element count overflows.
T
Add a semantic patch for converting certain calls of memcpy(3) to
COPY_ARRAY() and apply that transformation to the code base. The result
is
shorter and safer code. For now only consider calls where source and
destination have the same type, or in other words: easy cases.
Signed-off-by: Rene Sc
Ha, can't count. It should be [PATCH 2/2] of course.
René
Am 25.09.2016 um 09:41 schrieb Jeff King:
On Sun, Sep 25, 2016 at 09:15:42AM +0200, René Scharfe wrote:
It checks if the multiplication of size and element count overflows.
The inferred size is passed first to st_mult, which allows the division
there to be done at compilation time.
I wonder
Signed-off-by: Rene Scharfe
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 05cb58a..f370ba0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -207,6 +207,7 @@
/tags
/TAGS
/cscope*
+/contrib/coccinelle/*.patch*
*.obj
*.lib
*.res
--
2.10.0
Replace uses of strbuf_addf() for adding strings with more lightweight
strbuf_addstr() calls. This is shorter and makes the intent clearer.
bc57b9c0cc5a123365a922fa1831177e3fd607ed already converted three cases,
this patch covers two more.
A semantic patch for Coccinelle is included for easier c
Call strbuf_add_unique_abbrev() to add abbreviated hashes to strbufs
instead of taking detours through find_unique_abbrev() and its static
buffer. This is shorter and a bit more efficient.
1eb47f167d65d1d305b9c196a1bb40eb96117cb1 already converted six cases,
this patch covers three more.
A seman
Am 27.09.2016 um 21:52 schrieb Jakub Narębski:
> W dniu 27.09.2016 o 21:01, René Scharfe pisze:
>> Signed-off-by: Rene Scharfe
>> ---
>> .gitignore | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/.gitignore b/.gitignore
>> index 05cb58a
Am 27.09.2016 um 22:28 schrieb Junio C Hamano:
> René Scharfe writes:
>> diff --git a/submodule.c b/submodule.c
>> index dcc5ce3..8cf40ea 100644
>> --- a/submodule.c
>> +++ b/submodule.c
>> @@ -396,7 +396,7 @@ static void show_submodule_hea
Apply the semantic patch contrib/coccinelle/qsort.cocci to the code
base, replacing calls of qsort(3) with QSORT. The resulting code is
shorter and supports empty arrays with NULL pointers.
Signed-off-by: Rene Scharfe
---
Freshly generated using coccicheck, compiles, survives make test.
bisect
Add a semantic patch for removing checks similar to the one that QSORT
already does internally and apply it to the code base.
Signed-off-by: Rene Scharfe
---
builtin/fmt-merge-msg.c| 10 --
contrib/coccinelle/qsort.cocci | 18 ++
sh-i18n--envsubst.c|
Add the macro QSORT, a convenient wrapper for qsort(3) that infers the
size of the array elements and supports the convention of initializing
empty arrays with a NULL pointer, which we use in some places.
Calling qsort(3) directly with a NULL pointer is undefined -- even with
an element count of z
Am 17.09.2016 um 20:25 schrieb René Scharfe:
> diff --git a/pretty.c b/pretty.c
> index 9788bd8..493edb0 100644
> --- a/pretty.c
> +++ b/pretty.c
> @@ -1072,6 +1072,8 @@ static size_t format_commit_one(struct strbuf *sb, /*
> in UTF-8 */
> case 'C':
Am 30.09.2016 um 00:36 schrieb Junio C Hamano:
> René Scharfe writes:
>
>> Add the macro QSORT, a convenient wrapper for qsort(3) that infers the
>> size of the array elements and supports the convention of initializing
>> empty arrays with a NULL pointer, whi
Am 30.09.2016 um 01:21 schrieb René Scharfe:
> Am 30.09.2016 um 00:36 schrieb Junio C Hamano:
>> René Scharfe writes:
>>
>>> Add the macro QSORT, a convenient wrapper for qsort(3) that infers the
>>> size of the array elements and supports the convention of ini
Am 30.09.2016 um 00:36 schrieb Junio C Hamano:
> 3. builtin/show-branch.c does this:
>
> qsort(ref_name + bottom, top - bottom, sizeof(ref_name[0]),
> compare_ref_name);
>
> where ref_name[] is a file-scope global:
>
> static char *ref_name[MAX_REVS + 1];
>
> and top and botto
Am 30.09.2016 um 21:36 schrieb Jeff King:
> We adjust the test script here to demonstrate that this now
> works. Unfortunately, we can't demonstrate that the
> duplicate is suppressed, since it has no user-visible
> behavior (it's just one less place for our object lookups to
> go). But you can ver
Am 15.09.2016 um 23:39 schrieb Junio C Hamano:
> René Scharfe writes:
>
>> Am 15.09.2016 um 22:01 schrieb Junio C Hamano:
>>> René Scharfe writes:
>>>
>>>> Take this for example:
>>>>
>>>> - strbuf_addf(&o
suggest:
From c2716458f05893ca88c05ce211a295a330e74590 Mon Sep 17 00:00:00 2001
From: René Scharfe
Date: Sat, 24 Sep 2016 13:30:22 +0200
Subject: [PATCH] git-gui: stop using deprecated merge syntax
Starting with v2.5.0 git merge can handle FETCH_HEAD internally and
warns when it's called
Am 03.10.2016 um 19:09 schrieb Kevin Bracey:
As such, NULL checks can still be elided even with your change. If you
effectively change your example to:
if (nmemb > 1)
qsort(array, nmemb, size, cmp);
if (!array)
printf("array is NULL\n");
array may only be checked for NUL
Am 04.10.2016 um 07:28 schrieb Kevin Bracey:
On 04/10/2016 01:00, René Scharfe wrote:
Am 03.10.2016 um 19:09 schrieb Kevin Bracey:
As such, NULL checks can still be elided even with your change. If you
effectively change your example to:
if (nmemb > 1)
qsort(array, nmemb, s
Am 24.01.2016 um 16:59 schrieb f...@fuz.su:
Right now, git archive creates a pax global header of the form
comment=57ca140635bf157354124e4e4b3c8e1bde2832f1
in tar archives it creates. This is suboptimal as as comments are
specified to be ignored by extraction software. It is impossible to
Am 28.01.2016 um 00:45 schrieb f...@fuz.su:
There is git get-tar-commit-id, which prints the commit ID if it
finds a comment entry which looks like a hexadecimal SHA-1 hash.
It's better than a hex editor at least. :)
This is incredibly fuzzy and can get wrong for a pleothora of reasons.
I hope
Am 06.02.2016 um 15:57 schrieb f...@fuz.su:
On Sat, Feb 06, 2016 at 02:23:11PM +0100, René Scharfe wrote:
Am 28.01.2016 um 00:45 schrieb f...@fuz.su:
There is git get-tar-commit-id, which prints the commit ID if it
finds a comment entry which looks like a hexadecimal SHA-1 hash.
It's b
Am 19.02.2016 um 12:22 schrieb Jeff King:
REALLOC_ARRAY inherently involves a multiplication which can
overflow size_t, resulting in a much smaller buffer than we
think we've allocated. We can easily harden it by using
st_mult() to check for overflow. Likewise, we can add
ALLOC_ARRAY to do the s
Am 15.10.2015 um 00:07 schrieb David Turner:
From: Keith McGuigan
During merges, we would previously free entries that we no longer need
in the destination index. But those entries might also be stored in
the dir_entry cache, and when a later call to add_to_index found them,
they would be used
Am 15.10.2015 um 21:02 schrieb David Turner:
On Thu, 2015-10-15 at 05:35 +0200, René Scharfe wrote:
Am 15.10.2015 um 00:07 schrieb David Turner:
From: Keith McGuigan
During merges, we would previously free entries that we no longer need
in the destination index. But those entries might also
Avoid duplication by moving the code to release allocated memory for
arguments and environment to its own function, child_process_clear().
Export it to provide a counterpart to child_process_init().
Signed-off-by: Rene Scharfe
---
Documentation/technical/api-run-command.txt | 7 +++
run-com
Call child_process_clear() when a child ends to release the memory
allocated for its environment. This is necessary because unlike all
other users of start_command() we don't call finish_command(), which
would have taken care of that for us.
This leak was introduced by f063d38b (daemon: use cld->
Instead of open-coding the function pop_commit() just call it. This
makes the intent clearer and reduces code size.
Signed-off-by: Rene Scharfe
---
builtin/fmt-merge-msg.c | 9 +++--
builtin/merge.c | 12 +---
builtin/reflog.c| 6 +-
builtin/rev-parse.c |
Am 26.10.2015 um 20:23 schrieb Stefan Beller:
On Mon, Oct 26, 2015 at 11:43 AM, Junio C Hamano wrote:
René Scharfe writes:
Avoid duplication by moving the code to release allocated memory for
arguments and environment to its own function, child_process_clear().
Export it to provide a
Am 26.10.2015 um 22:33 schrieb Junio C Hamano:
René Scharfe writes:
Instead of open-coding the function pop_commit() just call it. This
makes the intent clearer and reduces code size.
Signed-off-by: Rene Scharfe
---
builtin/fmt-merge-msg.c | 9 +++--
builtin/merge.c | 12
Changes since v1:
- Rebased on next, which already has a cleanup function.
- Added first patch for renaming it.
Rene Scharfe (3):
run-command: name the cleanup function child_process_clear()
run-command: export child_process_clear()
daemon: plug memory leak
Documentation/technical/api-run
Rename child_process_deinit() to child_process_clear() in order to stay
consistent with similar cleanup functions like argv_array_clear(),
string_list_clear() etc.
Signed-off-by: Rene Scharfe
---
run-command.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/run-c
Make the API symmetric by including a cleanup function as a counterpart
to child_process_init().
Signed-off-by: Rene Scharfe
---
Documentation/technical/api-run-command.txt | 7 +++
run-command.c | 2 +-
run-command.h | 1 +
3 files
Call child_process_clear() when a child ends to release the memory
allocated for its environment. This is necessary because unlike all
other users of start_command() we don't call finish_command(), which
would have taken care of that for us.
This leak was introduced by f063d38b (daemon: use cld->
Memory is accessed out-of-bounds when try to show --branch info in a
repo with a detached HEAD. Add a test in patch 1 and a fix in patch
3, as well as some cleanups.
Rene Scharfe (5):
t7060: add test for status --branch on a detached HEAD
wt-status: exit early using goto in wt_shortstatus_pri
This test fails when run under Valgrind because branch_get() gets passed
a bogus branch name pointer:
==62831== Invalid read of size 1
==62831==at 0x4F76AE: branch_get (remote.c:1650)
==62831==by 0x53499E: wt_shortstatus_print_tracking (wt-status.c:1654)
==62831==by 0x53499E: wt_shorts
Deduplicate printing the line terminator by jumping to the end of the
function.
Signed-off-by: Rene Scharfe
---
wt-status.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/wt-status.c b/wt-status.c
index 3e3b8c0..083328f 100644
--- a/wt-status.c
+++ b/wt-status.
If we're on a detached HEAD then wt_shortstatus_print_tracking() takes
the string "HEAD (no branch)", translates it, skips the first eleven
characters and passes the result to branch_get(), which returns a bogus
result and accesses memory out of bounds in order to produce it.
Somehow stat_tracking_
Signed-off-by: Rene Scharfe
---
wt-status.c | 36 +++-
1 file changed, 15 insertions(+), 21 deletions(-)
diff --git a/wt-status.c b/wt-status.c
index 42ea15e..435fc28 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -897,15 +897,15 @@ static void wt_status_print_verb
Use the variable branch_name, which already has "refs/heads/" removed,
instead of blindly advancing in the ->branch string by 11 bytes. This
is safer and less magical.
Signed-off-by: Rene Scharfe
---
wt-status.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wt-status.c b/w
Use argv_array instead of open-coding it.
Signed-off-by: Rene Scharfe
---
builtin/show-branch.c | 24
1 file changed, 8 insertions(+), 16 deletions(-)
diff --git a/builtin/show-branch.c b/builtin/show-branch.c
index ac5141d..e17744b 100644
--- a/builtin/show-branch.c
++
Am 01.11.2015 um 18:50 schrieb Junio C Hamano:
René Scharfe writes:
If we're on a detached HEAD then wt_shortstatus_print_tracking() takes
the string "HEAD (no branch)", translates it, skips the first eleven
characters and passes the result to branch_get(), which returns a b
When a branch name is longer than four characters, memcmp() can read
past the end of the string literal "HEAD". Use strncmp() instead, which
stops at the end of a string. This fixes the following test failures
with AddressSanitizer:
t3203-branch-output.sh (Wstat: 256 Te
The short option -h is hard-wired in parseopt to list the options of
a command together with a short explanation. If -h is to be given a
different meaning then the flag PARSE_OPT_NO_INTERNAL_HELP has to be
specified, which turns off handling for -h, --help and --help-all
(except that --help handli
Avoid long lines and repeating parse_options_usage() calls with their
duplicate parameters by providing labels with speaking names to jump to.
Signed-off-by: Rene Scharfe
---
parse-options.c | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/parse-options.c b
Let callers provide their own handler for the short option -h even
without the flag PARSE_OPT_NO_INTERNAL_HELP, but call the internal
handler (showing usage information) if that is the only parameter.
Implement the first part by checking for -h only if parse_short_opt()
can't find it and returns -2
The flag PARSE_OPT_NO_INTERNAL_HELP is set to allow overriding the
option -h, except when it's the only one given. This is the default
behavior now, so remove the flag and the hand-rolled --help-all
handling. The internal --help-all handler now actually shows hidden
options, i.e. --debug in this
Signed-off-by: Rene Scharfe
---
parse-options.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/parse-options.c b/parse-options.c
index f0b6d9b..4863966 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -5,10 +5,6 @@
#include "color.h"
#include "utf8.h"
-
The flag PARSE_OPT_NO_INTERNAL_HELP is set to allow overriding the
option -h, except when it's the only one given. This is the default
behavior now, so remove the flag and the hand-rolled --help-all
handling. The internal --help-all handler now actually shows hidden
options, i.e. -h in this case.
Signed-off-by: Rene Scharfe
---
t/t1450-fsck.sh | 32
1 file changed, 32 insertions(+)
diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh
index dc09797..6c96953 100755
--- a/t/t1450-fsck.sh
+++ b/t/t1450-fsck.sh
@@ -176,6 +176,18 @@ test_expect_success 'integer overf
We check the return value of verify_header() for commits already, so do
the same for tags as well.
Signed-off-by: Rene Scharfe
---
fsck.c | 3 ++-
t/t1450-fsck.sh | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/fsck.c b/fsck.c
index e41e753..4060f1f 100644
--- a/f
Am 19.11.2015 um 21:33 schrieb Eric Sunshine:
On Thu, Nov 19, 2015 at 11:20 AM, René Scharfe wrote:
Signed-off-by: Rene Scharfe
---
diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh
@@ -176,6 +176,18 @@ test_expect_success 'integer overflow in timestamps is
reported' '
+test
Some tests print a file using cat and then grep it for some pattern.
This is done to aid debugging in case the pattern is unexpectedly not
found; the file contents can easily inspected by running the test with
the option --verbose.
Replace these combinations by calls of test_must_contain. It only
Am 20.11.2015 um 12:14 schrieb Jeff King:
On Thu, Nov 19, 2015 at 09:54:54PM +0100, René Scharfe wrote:
diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh
@@ -176,6 +176,18 @@ test_expect_success 'integer overflow in timestamps is
reported' '
+test_expect_success 'commi
Extract a helper function for searching for a pattern in a file and
printing the whole file if the pattern is not found. It is useful
when starting tests with --verbose for debugging purposes.
Signed-off-by: Rene Scharfe
---
t/t0008-ignores.sh | 10 +-
t/test-lib-functions.sh | 12
Am 21.11.2015 um 02:16 schrieb SZEDER Gábor:
Hi,
diff --git a/t/t9810-git-p4-rcs.sh b/t/t9810-git-p4-rcs.sh
index 8134ab4..e02b490 100755
--- a/t/t9810-git-p4-rcs.sh
+++ b/t/t9810-git-p4-rcs.sh
@@ -294,8 +294,7 @@ test_expect_success 'cope with rcs keyword file deletion' '
echo
Am 21.11.2015 um 09:11 schrieb Johannes Sixt:
> Am 20.11.2015 um 21:50 schrieb René Scharfe:
>> Extract a helper function for searching for a pattern in a file and
>> printing the whole file if the pattern is not found. It is useful
>> when starting tests with --verbose f
Am 24.11.2015 um 22:36 schrieb Jeff King:
> On Fri, Nov 06, 2015 at 11:47:03PM +0100, René Scharfe wrote:
>
>> When a branch name is longer than four characters, memcmp() can read
>> past the end of the string literal "HEAD". Use strncmp() instead, which
>> s
If a branch name is longer than four characters then memcmp() reads over
the end of the static string "HEAD". This causes the following test
failures with AddressSanitizer:
t3203-branch-output.sh (Wstat: 256 Tests: 18 Failed:
4)
Failed tests: 12, 15-17
Non-zero exi
Am 28.12.2018 um 19:04 schrieb Junio C Hamano:
> * jk/loose-object-cache (2018-11-24) 10 commits
> (merged to 'next' on 2018-12-28 at 5a5faf384e)
> + odb_load_loose_cache: fix strbuf leak
> + fetch-pack: drop custom loose object cache
> + sha1-file: use loose object cache for quick existence c
Add and use a function for loading the entries if a loose object
subdirectory for a given object ID. It frees callers from deriving the
fanout key; they can use the returned oid_array reference for lookups or
forward range scans.
Suggested-by: Jeff King
Signed-off-by: Rene Scharfe
---
object-s
Add and use a function for emptying the loose object cache, so callers
don't have to know any of its implementation details.
Signed-off-by: Rene Scharfe
---
object-store.h | 3 +++
object.c | 2 +-
packfile.c | 7 ++-
sha1-file.c| 7 +++
4 files changed, 13 insertions(+), 6
The loose objects cache is filled one subdirectory at a time as needed.
It is stored in an oid_array, which has to be resorted after each add
operation. So when querying a wide range of objects, the partially
filled array needs to be resorted up to 255 times, which takes over 100
times longer than
Am 06.01.2019 um 21:38 schrieb Ævar Arnfjörð Bjarmason:
>> $ git count-objects
>> 26733 objects, 68808 kilobytes
>>
>> TestHEAD^ HEAD
>>
>> 4205.1: log with %H 0.51(0.47+0.04) 0.51(0.4
Am 07.01.2019 um 13:30 schrieb Jeff King:
> On Mon, Jan 07, 2019 at 11:27:06AM +, Philip Oakley wrote:
>
>> On 06/01/2019 16:45, René Scharfe wrote:
>>> Add and use a function for loading the entries if a loose object
>>> subdirectory for a given object ID
Am 07.01.2019 um 09:27 schrieb Jeff King:
> On Sun, Jan 06, 2019 at 05:45:30PM +0100, René Scharfe wrote:
>> diff --git a/object-store.h b/object-store.h
>> index 60758efad8..7236c571c0 100644
>> --- a/object-store.h
>> +++ b/object-store.h
>> @@ -54,6 +54,13 @@ vo
map_sha1_file_1() checks if the file it is about to mmap() is empty and
errors out in that case and explains the situation in an error message.
It leaks the private handle to that empty file, though.
Have the function clean up after itself and close the file descriptor
before exiting early.
Signe
Inline odb_load_loose_cache() into its only remaining caller,
odb_loose_cache(). The latter offers a nicer interface for loading the
cache, as it doesn't require callers to deal with fanout directory
numbers directly.
Signed-off-by: Rene Scharfe
---
object-store.h | 7 ---
sha1-file.c|
Am 07.01.2019 um 14:26 schrieb René Scharfe:
> Yes, the functions are arranged so that odb_load_loose_cache() can be
> inlined easily. I meant to include a patch for that but then quibbled
> about keeping the BUG check (which is probably optimized out) or not,
> and dropped it for no
Am 07.01.2019 um 09:31 schrieb Jeff King:
> I also cleaned up my sha1/object_id patch and rebased it on top of what
> you have here. Though as I worked on it, it expanded in scope a bit.
> Possibly it should be a separate series entirely, but that would create
> some annoying textual conflicts on m
Am 16.01.2019 um 10:18 schrieb Carlo Arenas:
> while running HEAD cppcheck against git HEAD got the following error,
> that seem to be in the code all the way to maint:
>
> [refs/files-backend.c:2681] -> [refs.c:1044] -> [cache.h:1075]:
> (error) Null pointer dereference: src
>
> the code that uses
Am 17.01.2019 um 21:29 schrieb Barret Rhoden:
> The blame_entry will get passed up the tree until we find a commit that
> has a diff chunk that affects those lines. If an ignored commit added
> more lines than it removed, the blame will fall on a commit that made a
> change nearby. There is no ge
Am 05.04.2019 um 01:25 schrieb Jeff King:
> When we have a .midx that covers many packfiles, we try to avoid opening
> the .idx for those packfiles. However, there are a few problems with the
> filename comparison we use:
>
>- we ask midx_contains_pack() about the .pack name, not the .idx name.
Am 05.04.2019 um 01:27 schrieb Jeff King:
> We can use skip_prefix() and parse_oid_hex() to continuously increment
> our pointer, rather than dealing with magic numbers. This also fixes a
> few small shortcomings:
>
> - if we see a 'P' line that does not match our expectations, we'll
> leave
Am 05.04.2019 um 20:11 schrieb Jeff King:
> On Fri, Apr 05, 2019 at 12:41:27PM +0200, René Scharfe wrote:
>> Parsing "P" and "pack-" together crosses logical token boundaries,
>> but that I don't mind it here.
>
> Yeah, I was tempted to
s does fix _a_ bug, it's masked
> by another bug in that same caller. That will be covered (with a test)
> in the next patch.
>
> Helped-by: René Scharfe
> Signed-off-by: Jeff King
> ---
> I was tempted to suggest that the midx struct just store the base name
> withou
Am 13.04.2019 um 03:51 schrieb Jeff King:
> On Fri, Apr 12, 2019 at 04:04:40PM -0700, Rohit Ashiwal via GitGitGadget
> wrote:
>
>> From: Rohit Ashiwal
>>
>> As we already link to the zlib library, we can perform the compression
>> without even requiring gzip on the host machine.
>
> Very cool. It
Am 26.04.19 um 16:51 schrieb Johannes Schindelin:> Hi Peff,
>
> On Mon, 15 Apr 2019, Jeff King wrote:
>
>> On Sun, Apr 14, 2019 at 12:01:10AM +0200, René Scharfe wrote:
>>
>>>>> As we already link to the zlib library, we can perform the compression
>&g
Am 27.04.19 um 11:59 schrieb René Scharfe:> Am 26.04.19 um 16:51 schrieb
Johannes Schindelin:
>>
>> On Mon, 15 Apr 2019, Jeff King wrote:
>>
>>> On Sun, Apr 14, 2019 at 12:01:10AM +0200, René Scharfe wrote:
>>>
>>>> Doing compression in its ow
Hello Dscho,
Am 29.04.19 um 23:25 schrieb Johannes Schindelin:
> On Sat, 27 Apr 2019, René Scharfe wrote:
>> The simplest solution is of course to not touch the archive code.
>
> We could do that, of course, and we could avoid adding a new command that
> we have to suppo
Am 01.05.19 um 20:09 schrieb Jeff King:
> On Mon, Apr 29, 2019 at 05:32:50PM -0400, Johannes Schindelin wrote:
>
>>> Another is that I am not sure how your "fixed format" argument
>>> meshes with the "-b blocksize" parameter to affect the tar/pax
>>> output. The format may be fixed, but it is para
Am 27.04.19 um 01:27 schrieb Rohit Ashiwal via GitGitGadget:
> From: Rohit Ashiwal
>
> As we already link to the zlib library, we can perform the compression
> without even requiring gzip on the host machine.
>
> Note: the `-n` flag that `git archive` passed to `gzip` wants to ensure
> that a repr
Am 27.04.19 um 01:27 schrieb Johannes Schindelin via GitGitGadget:
> From: Johannes Schindelin
>
> They really are unsigned, and we are using e.g. BLOCKSIZE as `size_t`
> parameter to pass to `write_or_die()`.
True, but the compiler converts that value correctly to size_t without
complaint alread
Am 09.05.19 um 20:38 schrieb Jeff King:
> I do dream of a world where we do not have a bunch of implicit
> conversions (both signedness but also truncation) in our code base, and
> can compile cleanly with -Wconversion We know that this case is
> perfectly fine, but I am sure there are many that ar
Am 19.05.19 um 07:10 schrieb Jeff King:
> diff --git a/transport.c b/transport.c
> index f1fcd2c4b0..ba61e57295 100644
> --- a/transport.c
> +++ b/transport.c
> @@ -1373,7 +1372,15 @@ char *transport_anonymize_url(const char *url)
> cp = strchr(scheme_prefix + 3, '/');
>
Am 24.05.19 um 10:13 schrieb Jeff King:
> On Fri, May 24, 2019 at 09:35:51AM +0200, Keegan Carruthers-Smith wrote:
>
>>> I can't reproduce on Linux, using GNU tar (1.30) nor with bsdtar 3.3.3
>>> (from Debian's bsdtar package). What does your "tar --version" say?
>>
>> bsdtar 2.8.3 - libarchive 2.8
Am 25.05.19 um 23:07 schrieb Ævar Arnfjörð Bjarmason:
>
> On Sat, May 25 2019, René Scharfe wrote:
>
>> We could truncate symlink targets at the first NUL as well in git
>> archive -- but that would be a bit sad, as the archive formats allow
>> storing the "real&quo
Am 28.05.19 um 07:58 schrieb Jeff King:
> On Sat, May 25, 2019 at 03:26:53PM +0200, René Scharfe wrote:
>
>> We could
>> make git fsck report such symlinks.
>
> This is a little tricky, because fsck generally looks at individual
> objects, and the bad pattern is a combi
Am 28.05.19 um 21:08 schrieb Jeff King:
> On Tue, May 28, 2019 at 08:01:43PM +0200, René Scharfe wrote:
>
>> Am 28.05.19 um 07:58 schrieb Jeff King:
>>> On Sat, May 25, 2019 at 03:26:53PM +0200, René Scharfe wrote:
>>>
>>>> We could
>>>> make g
201 - 300 of 1338 matches
Mail list logo