[PATCH v14 12/41] builtin/apply: make check_apply_state() return -1 instead of die()ing

2016-09-04 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", check_apply_state() should return -1 instead of calling die(). Signed-off-by: Christian Coud

[PATCH v14 15/41] builtin/apply: make parse_traditional_patch() return -1 on error

2016-09-04 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", parse_traditional_patch() should return -1 instead of calling die(). Signed-off-by: Christian Coud

[PATCH v14 02/41] apply: move 'struct apply_state' to apply.h

2016-09-04 Thread Christian Couder
To libify `git apply` functionality we must make 'struct apply_state' usable outside "builtin/apply.c". Let's do that by creating a new "apply.h" and moving 'struct apply_state' there. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>

[PATCH v14 03/41] builtin/apply: make apply_patch() return -1 or -128 instead of die()ing

2016-09-04 Thread Christian Couder
-128 and it will exit(1) when it returns -1. We exit() with code 128 because that was what die() was doing and we want to keep the distinction between exiting with code 1 and exiting with code 128. Helped-by: Eric Sunshine <sunsh...@sunshineco.com> Signed-off-by: Christian Couder &

[PATCH v14 11/41] apply: make init_apply_state() return -1 instead of exit()ing

2016-09-04 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of exit()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", init_apply_state() should return -1 instead of calling exit(). Signed-off-by: Christian Coud

[PATCH v14 17/41] builtin/apply: make gitdiff_*() return -1 on error

2016-09-04 Thread Christian Couder
m> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- builtin/apply.c | 40 +--- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index eb918e5..6b16173 100644 --- a/builtin/apply.c +++ b/builtin/appl

[PATCH v14 19/41] builtin/apply: make build_fake_ancestor() return -1 on error

2016-09-04 Thread Christian Couder
ine <sunsh...@sunshineco.com> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- builtin/apply.c | 41 ++--- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 166e94d..575981b 100644 --- a/builtin

[PATCH v14 04/41] builtin/apply: read_patch_file() return -1 instead of die()ing

2016-09-04 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. Let's do that by returning -1 instead of die()ing in read_patch_file(). Helped-by: Stefan Beller <sbel...@google.com> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- builtin

[PATCH v14 29/41] apply: rename and move opt constants to apply.h

2016-09-04 Thread Christian Couder
-by: Stefan Beller <sbel...@google.com> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- apply.h | 7 +++ builtin/apply.c | 11 --- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/apply.h b/apply.h index 53f09b5..48abd8e 100644 --- a/apply.h

[PATCH v14 35/41] usage: add set_warn_routine()

2016-09-04 Thread Christian Couder
There are already set_die_routine() and set_error_routine(), so let's add set_warn_routine() as this will be needed in a following commit. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- git-compat-util.h | 1 + usage.c | 5 + 2 files changed, 6 insertions(+)

[PATCH v14 32/41] apply: use error_errno() where possible

2016-09-04 Thread Christian Couder
To avoid possible mistakes and to uniformly show the errno related messages, let's use error_errno() where possible. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- apply.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apply.c b/apply.c

[PATCH v14 08/41] builtin/apply: make parse_whitespace_option() return -1 instead of die()ing

2016-09-04 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. To do that in a compatible manner with the rest of the error handling in builtin/apply.c, parse_whitespace_option() should return -1 instead of calling die(). Signed-off-by: Christian Couder <chr

[PATCH v14 38/41] apply: refactor `git apply` option parsing

2016-09-04 Thread Christian Couder
es.plus.com> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- apply.c | 103 +--- apply.h | 18 +++--- builtin/apply.c | 74 ++-- 3 files changed, 97 insertions(+), 98 dele

[PATCH v14 36/41] usage: add get_error_routine() and get_warn_routine()

2016-09-04 Thread Christian Couder
Let's make it possible to get the current error_routine and warn_routine, so that we can store them before using set_error_routine() or set_warn_routine() to use new ones. This way we will be able put back the original routines, when we are done with using new ones. Signed-off-by: Christian

[PATCH v14 06/41] builtin/apply: make parse_chunk() return a negative integer on error

2016-09-04 Thread Christian Couder
() is called only by apply_patch() which already returns either -1 or -128 when an error happened, let's make it also return -1 or -128. This makes it compatible with what find_header() and parse_binary() already return. Helped-by: Eric Sunshine <sunsh...@sunshineco.com> Signed-off-by: Chr

[PATCH v14 27/41] builtin/apply: make create_one_file() return -1 on error

2016-09-04 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of exit()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", create_one_file() should return -1 instead of calling exit(). Signed-off-by: Christian Coud

[PATCH v14 05/41] builtin/apply: make find_header() return -128 instead of die()ing

2016-09-04 Thread Christian Couder
find_header() already returns -1 when no header is found. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- builtin/apply.c | 40 t/t4254-am-corrupt.sh | 2 +- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/builtin/app

[PATCH v14 16/41] builtin/apply: make gitdiff_*() return 1 at end of header

2016-09-04 Thread Christian Couder
ase of a real error. This will be done in a following patch. Helped-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- builtin/apply.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/builtin/ap

[PATCH v14 09/41] builtin/apply: make parse_ignorewhitespace_option() return -1 instead of die()ing

2016-09-04 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", parse_ignorewhitespace_option() should return -1 instead of calling die(). Signed-off-by: Christ

[PATCH v14 31/41] apply: make some parsing functions static again

2016-09-04 Thread Christian Couder
Some parsing functions that were used in both "apply.c" and "builtin/apply.c" are now only used in the former, so they can be made static to "apply.c". Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- apply.c | 6 +++--- apply.h | 5 -

[PATCH v14 24/41] builtin/apply: make write_out_one_result() return -1 on error

2016-09-04 Thread Christian Couder
ng instead of calling exit(). Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- builtin/apply.c | 38 -- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index fdfeab0..003acec 100644 --- a/builtin/apply

[PATCH v14 13/41] builtin/apply: move check_apply_state() to apply.c

2016-09-04 Thread Christian Couder
To libify `git apply` functionality we must make check_apply_state() usable outside "builtin/apply.c". Let's do that by moving it into "apply.c". Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- apply.c | 32 apply

[PATCH v14 41/41] builtin/am: use apply API in run_apply()

2016-09-04 Thread Christian Couder
ot; with split index: 1m22.476s This series on top of "next" without split index: 1m12.034s This series on top of "next" with split index: 0m15.678s (using branch "next" from mid April 2016.) Benchmarked-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com>

[PATCH v14 07/41] builtin/apply: make parse_single_patch() return -1 on error

2016-09-04 Thread Christian Couder
() and let's adjust the related test cases accordingly. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- builtin/apply.c| 17 + t/t4012-diff-binary.sh | 4 ++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/builtin/apply.c b/builtin/a

[PATCH v14 21/41] builtin/apply: make add_conflicted_stages_file() return -1 on error

2016-09-04 Thread Christian Couder
ine <sunsh...@sunshineco.com> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- builtin/apply.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 27fb6e2..ad0b875 100644 --- a/builtin/apply.c

[PATCH v14 33/41] apply: make it possible to silently apply

2016-09-04 Thread Christian Couder
of in this patch, as that will be done in following patches. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- apply.c | 62 + apply.h | 8 +++- builtin/apply.c | 2 +- 3 files changed, 48 insertions(

[PATCH v14 34/41] apply: don't print on stdout in verbosity_silent mode

2016-09-04 Thread Christian Couder
values and calls printing functions, - summary_patch_list() calls show_file_mode_name(), printf(), show_rename_copy(), show_mode_change() that are only printing. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- apply.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH v14 39/41] apply: pass apply state to build_fake_ancestor()

2016-09-04 Thread Christian Couder
To libify git apply functionality, we will need to read from a different index file in get_current_sha1(). This index file will be stored in "struct apply_state", so let's pass the state to build_fake_ancestor() which will later pass it to get_current_sha1(). Signed-off-by: Christ

[PATCH v14 22/41] builtin/apply: make add_index_file() return -1 on error

2016-09-04 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", add_index_file() should return -1 instead of calling die(). Signed-off-by: Christian Coud

[PATCH v14 28/41] builtin/apply: rename option parsing functions

2016-09-04 Thread Christian Couder
As these functions are going to be part of the libified apply API, let's give them a name that is more specific to the apply API. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- builtin/apply.c | 40 1 file changed, 20 insertions(

[PATCH v14 18/41] builtin/apply: change die_on_unsafe_path() to check_unsafe_path()

2016-09-04 Thread Christian Couder
that let's change its name to check_unsafe_path(). Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- builtin/apply.c | 32 +--- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 6b16173..166e94d 1006

[PATCH v14 37/41] apply: change error_routine when silent

2016-09-04 Thread Christian Couder
eed to restore the saved routines in all cases, we cannot return early any more in apply_all_patches(). Helped-by: Stefan Beller <sbel...@google.com> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- apply.c | 21 - apply.h | 8 2 files changed, 28 i

[PATCH v14 40/41] apply: learn to use a different index file

2016-09-04 Thread Christian Couder
-off-by: Christian Couder <chrisc...@tuxfamily.org> --- apply.c | 27 +-- apply.h | 1 + 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/apply.c b/apply.c index f29387d..b1dd998 100644 --- a/apply.c +++ b/apply.c @@ -3993,12 +3993,21 @@ stat

[PATCH v14 10/41] builtin/apply: move init_apply_state() to apply.c

2016-09-04 Thread Christian Couder
To libify `git apply` functionality we must make init_apply_state() usable outside "builtin/apply.c". Let's do that by moving it into a new "apply.c". Helped-by: Eric Sunshine <sunsh...@sunshineco.com> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> ---

[PATCH v14 26/41] builtin/apply: make try_create_file() return -1 on error

2016-09-04 Thread Christian Couder
returns -1 to signal a recoverable error. To fix that, let's make it return 1 in case of a recoverable error and -1 in case of an unrecoverable error. Helped-by: Eric Sunshine <sunsh...@sunshineco.com> Helped-by: Jeff King <p...@peff.net> Signed-off-by: Christian Couder <chrisc...@tu

[PATCH v14 25/41] builtin/apply: make write_out_results() return -1 on error

2016-09-04 Thread Christian Couder
ine <sunsh...@sunshineco.com> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- builtin/apply.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 003acec..c787ead 100644 --- a/builtin/apply.c

[PATCH v14 23/41] builtin/apply: make create_file() return -1 on error

2016-09-04 Thread Christian Couder
returning instead of calling exit(). Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- builtin/apply.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index a646900..fdfeab0 100644 --- a/builtin/apply

Re: [PATCH v13 00/14] libify apply and use lib in am, part 3

2016-09-04 Thread Christian Couder
On Thu, Sep 1, 2016 at 7:48 PM, Junio C Hamano <gits...@pobox.com> wrote: > Christian Couder <christian.cou...@gmail.com> writes: > >> Following Stefan's review, it looks like I will need to resend at >> least 02/14, 10/14 and 14/14. >> What do you prefer me to

Re: [PATCH v13 00/14] libify apply and use lib in am, part 3

2016-08-30 Thread Christian Couder
On Mon, Aug 29, 2016 at 9:04 PM, Junio C Hamano <gits...@pobox.com> wrote: > Christian Couder <christian.cou...@gmail.com> writes: > >> Highlevel view of the patches in the series >> ~~~ >> >> This is "part 3

[ANNOUNCE] Git Rev News edition 19

2016-09-14 Thread Christian Couder
Hi everyone, I'm happy announce that the 19th edition of Git Rev News is now published: https://git.github.io/rev_news/2016/09/14/edition-19/ Thanks a lot to all the contributors and helpers, especially Brian, Jakub, Lars and Josh! Enjoy, Christian and Thomas.

Re: Git Miniconference at Plumbers

2016-09-14 Thread Christian Couder
On Tue, Sep 13, 2016 at 1:14 AM, Lars Schneider wrote: > >> On 12 Sep 2016, at 21:11, Junio C Hamano wrote: >> >> [..] >> properly; supporting "huge objects" better in the object layer, >> without having to resort to ugly hacks like GitLFS that will

Draft of Git Rev News edition 19

2016-09-11 Thread Christian Couder
Hi, A draft of a new Git Rev News edition is available here: https://github.com/git/git.github.io/blob/master/rev_news/drafts/edition-19.md Everyone is welcome to contribute in any section either by editing the above page on GitHub and sending a pull request, or by commenting on this GitHub

[BUG?] git log with --follow and --skip

2016-10-06 Thread Christian Couder
Hi, At GitLab, we are annoyed by the fact that `git log` doesn't seem to work well when using it with both --follow and --skip. For example: > git log --oneline -6 README.md a299e3a README.md: format CLI commands with code syntax c9a014e README.md: don't take 'commandname' literally a217f07

Re: Why are there multiple ways to get the manual in Git?

2016-09-17 Thread Christian Couder
On Sat, Sep 17, 2016 at 8:39 PM, Fredrik Gustafsson wrote: > On Sat, Sep 17, 2016 at 01:47:52PM -0400, Andrew Johnson wrote: >> $ git help >> $ git --help >> $ man git- >> >> I tested all three to confirm they were equivalent. Maybe it will be easier to understand if you try:

[PATCH v2 0/3] limit the size of the packs we receive

2016-08-18 Thread Christian Couder
ot;$filename" && test_commit "$filename" ' @@ -35,8 +35,8 @@ do ' done <<\EOF -1 1024 one-k-file -10 2048 two-k-file +1 1024 one-k-file foo +10 1024 other-one-k-file bar EOF test_done --- Christian Couder (1): unpack-objects: add --max-inpu

[PATCH v2 3/3] receive-pack: allow a maximum input size to be specified

2016-08-18 Thread Christian Couder
y been written to disk is a related problem that is not addressed by this patch. Signed-off-by: Jeff King <p...@peff.net> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- Documentation/config.txt | 5 + Documentation/git-receive-pack.txt | 3 +++ buil

[PATCH v2 2/3] unpack-objects: add --max-input-size= option

2016-08-18 Thread Christian Couder
When receiving a pack-file, it can be useful to abort the `git unpack-objects`, if the pack-file is too big. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- Documentation/git-unpack-objects.txt | 3 +++ builtin/unpack-objects.c | 7 +++ 2 files chang

[PATCH v2 1/3] index-pack: add --max-input-size= option

2016-08-18 Thread Christian Couder
From: Jeff King <p...@peff.net> When receiving a pack-file, it can be useful to abort the `git index-pack`, if the pack-file is too big. Signed-off-by: Jeff King <p...@peff.net> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- Documentation/git-index-pack.txt | 2

Re: [PATCH v13 00/14] libify apply and use lib in am, part 3

2016-08-27 Thread Christian Couder
On Sat, Aug 27, 2016 at 8:45 PM, Christian Couder <christian.cou...@gmail.com> wrote: > > I will send a diff between this version and v12 as a reply to this > email. Here is the diff: diff --git a/apply.c b/apply.c index 7e561a4..5cd037d 100644 --- a/apply.c +++ b/apply.c @@ -3

[PATCH v13 01/14] builtin/apply: rename option parsing functions

2016-08-27 Thread Christian Couder
As these functions are going to be part of the libified apply API, let's give them a name that is more specific to the apply API. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- builtin/apply.c | 40 1 file changed, 20 insertions(

[PATCH v13 00/14] libify apply and use lib in am, part 3

2016-08-27 Thread Christian Couder
plit-index and GIT_TRACE_PERFORMANCE=1. With Git v2.8.0, the rebase took 6.375888383 s, with the git am command launched by the rebase command taking 3.705677431 s. With this series on top of next, the rebase took 3.044529494 s, with the git am command launched by the rebase command taking

[PATCH v13 05/14] apply: use error_errno() where possible

2016-08-27 Thread Christian Couder
To avoid possible mistakes and to uniformly show the errno related messages, let's use error_errno() where possible. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- apply.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/apply.c b/a

[PATCH v13 06/14] apply: make it possible to silently apply

2016-08-27 Thread Christian Couder
of in this patch, as that will be done in following patches. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- apply.c | 62 + apply.h | 8 +++- builtin/apply.c | 2 +- 3 files changed, 48 insertions(

[PATCH v13 04/14] apply: make some parsing functions static again

2016-08-27 Thread Christian Couder
Some parsing functions that were used in both "apply.c" and "builtin/apply.c" are now only used in the former, so they can be made static to "apply.c". Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- apply.c | 6 +++--- apply.h | 5 -

[PATCH v13 02/14] apply: rename and move opt constants to apply.h

2016-08-27 Thread Christian Couder
The constants for the "inaccurate-eof" and the "recount" options will be used in both "apply.c" and "builtin/apply.c", so they need to go into "apply.h", and therefore they need a name that is more specific to the API they belong to. Signed

[PATCH v13 14/14] builtin/am: use apply API in run_apply()

2016-08-27 Thread Christian Couder
ot; with split index: 1m22.476s This series on top of "next" without split index: 1m12.034s This series on top of "next" with split index: 0m15.678s (using branch "next" from mid April 2016.) Benchmarked-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com>

[PATCH v13 13/14] apply: learn to use a different index file

2016-08-27 Thread Christian Couder
-off-by: Christian Couder <chrisc...@tuxfamily.org> --- apply.c | 27 +-- apply.h | 1 + 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/apply.c b/apply.c index 276e4af..5cd037d 100644 --- a/apply.c +++ b/apply.c @@ -3993,12 +3993,21 @@ stat

[PATCH v13 12/14] apply: pass apply state to build_fake_ancestor()

2016-08-27 Thread Christian Couder
To libify git apply functionality, we will need to read from a different index file in get_current_sha1(). This index file will be stored in "struct apply_state", so let's pass the state to build_fake_ancestor() which will later pass it to get_current_sha1(). Signed-off-by: Christ

[PATCH v13 09/14] usage: add get_error_routine() and get_warn_routine()

2016-08-27 Thread Christian Couder
Let's make it possible to get the current error_routine and warn_routine, so that we can store them before using set_error_routine() or set_warn_routine() to use new ones. This way we will be able put back the original routines, when we are done with using new ones. Signed-off-by: Christian

[PATCH v13 11/14] apply: refactor `git apply` option parsing

2016-08-27 Thread Christian Couder
es.plus.com> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- apply.c | 103 +--- apply.h | 18 +++--- builtin/apply.c | 74 ++-- 3 files changed, 97 insertions(+), 98 dele

[PATCH v13 08/14] usage: add set_warn_routine()

2016-08-27 Thread Christian Couder
There are already set_die_routine() and set_error_routine(), so let's add set_warn_routine() as this will be needed in a following commit. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- git-compat-util.h | 1 + usage.c | 5 + 2 files changed, 6 insertions(+)

[PATCH v13 10/14] apply: change error_routine when silent

2016-08-27 Thread Christian Couder
ler <sbel...@google.com> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- apply.c | 21 - apply.h | 8 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/apply.c b/apply.c index ddbb0a2..bf81b70 100644 --- a/apply.c +++ b/apply.c @@

[PATCH v13 07/14] apply: don't print on stdout in verbosity_silent mode

2016-08-27 Thread Christian Couder
values and calls printing functions, - summary_patch_list() calls show_file_mode_name(), printf(), show_rename_copy(), show_mode_change() that are only printing. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- apply.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

Re: [PATCH v12 12/13] apply: learn to use a different index file

2016-08-26 Thread Christian Couder
On Thu, Aug 11, 2016 at 10:17 PM, Junio C Hamano <gits...@pobox.com> wrote: > Christian Couder <christian.cou...@gmail.com> writes: > >> Sometimes we want to apply in a different index file. >> >> Before the apply functionality was libified it was possible to &

[PATCH v3 1/3] index-pack: add --max-input-size= option

2016-08-24 Thread Christian Couder
From: Jeff King <p...@peff.net> When receiving a pack-file, it can be useful to abort the `git index-pack`, if the pack-file is too big. Signed-off-by: Jeff King <p...@peff.net> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- Documentation/git-index-pack.txt | 2

[PATCH v3 0/3] limit the size of the packs we receive

2016-08-24 Thread Christian Couder
he limit allows push' ' + git --git-dir=dest config receive.maxInputSize 0 && + git push dest HEAD + ' +} + +test_expect_success "create known-size (1024 bytes) commit" ' + test-genrandom foo 1024 >one-k && + git add one-k &

[PATCH v3 3/3] receive-pack: allow a maximum input size to be specified

2016-08-24 Thread Christian Couder
y been written to disk is a related problem that is not addressed by this patch. Signed-off-by: Jeff King <p...@peff.net> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- Documentation/config.txt | 6 + Documentation/git-receive-pack.txt | 3 +++ buil

[PATCH v3 2/3] unpack-objects: add --max-input-size= option

2016-08-24 Thread Christian Couder
When receiving a pack-file, it can be useful to abort the `git unpack-objects`, if the pack-file is too big. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- Documentation/git-unpack-objects.txt | 3 +++ builtin/unpack-objects.c | 7 +++ 2 files chang

Re: [PATCH 0/6] receive-pack: quarantine pushed objects

2016-10-03 Thread Christian Couder
On Sun, Oct 2, 2016 at 3:02 PM, Jeff King <p...@peff.net> wrote: > On Sun, Oct 02, 2016 at 11:20:59AM +0200, Christian Couder wrote: > >> I wonder if the patch you sent in: >> >> https://public-inbox.org/git/20160816144642.5ikkta4l5hyx6...@sigill.intra.p

Re: Changing the default for "core.abbrev"?

2016-09-26 Thread Christian Couder
On Mon, Sep 26, 2016 at 3:39 AM, Linus Torvalds wrote: > > The kernel, these days, is at roughly 5 million objects, and while the > seven hex digits are still often enough for uniqueness (and git will > always add digits *until* it is unique), it's long been at the

Re: [PATCH 0/6] receive-pack: quarantine pushed objects

2016-10-02 Thread Christian Couder
On Fri, Sep 30, 2016 at 9:35 PM, Jeff King wrote: > I've mentioned before on the list that GitHub "quarantines" objects > while the pre-receive hook runs. Here are the patches to implement > that. Great! Thanks for upstreaming these patches! I wonder if the patch you sent in:

Re: [PATCH v15 01/27] bisect--helper: use OPT_CMDMODE instead of OPT_BOOL

2016-10-27 Thread Christian Couder
On Thu, Oct 27, 2016 at 6:59 PM, Junio C Hamano wrote: > Cc'ed those who touched either "git-bisect.sh" or "builtin/bisect-helper.c" > in our relatively recent past. > > Does any of you (and others on the list) have time and inclination > to review this series? As part of my

Re: [PATCH 2/4] trailer: avoid unnecessary splitting on lines

2016-10-29 Thread Christian Couder
On Sat, Oct 29, 2016 at 2:05 AM, Jonathan Tan wrote: > trailer.c currently splits lines while processing a buffer (and also > rejoins lines when needing to invoke ignore_non_trailer). > > Avoid such line splitting, except when generating the strings > corresponding to

Re: [PATCH 0/4] Make other git commands use trailer layout

2016-10-29 Thread Christian Couder
On Sat, Oct 29, 2016 at 3:12 AM, Junio C Hamano wrote: > Jonathan Tan writes: > >> This is built off jt/trailer-with-cruft (commit 60ef86a). >> >> This patch set makes "commit -s", "cherry-pick -x", and >> "format-patch --signoff" use the new trailer

Re: [PATCH v1 05/19] update-index: warn in case of split-index incoherency

2016-10-29 Thread Christian Couder
On Tue, Oct 25, 2016 at 12:00 PM, Duy Nguyen <pclo...@gmail.com> wrote: > On Sun, Oct 23, 2016 at 4:26 PM, Christian Couder > <christian.cou...@gmail.com> wrote: >> When users are using `git update-index --(no-)split-index`, they >> may expect the split-index featu

Re: [PATCH v1 10/19] read-cache: regenerate shared index if necessary

2016-10-29 Thread Christian Couder
On Tue, Oct 25, 2016 at 12:16 PM, Duy Nguyen <pclo...@gmail.com> wrote: > On Sun, Oct 23, 2016 at 4:26 PM, Christian Couder > <christian.cou...@gmail.com> wrote: >> @@ -2233,7 +2263,8 @@ int write_locked_index(struct index_state *istate, >> struct lock_file *lock,

Re: [PATCH v1 03/19] split-index: add {add,remove}_split_index() functions

2016-10-29 Thread Christian Couder
On Tue, Oct 25, 2016 at 11:58 AM, Duy Nguyen <pclo...@gmail.com> wrote: > On Sun, Oct 23, 2016 at 4:26 PM, Christian Couder > <christian.cou...@gmail.com> wrote: >> +void remove_split_index(struct index_state *istate) >> +{ >

Re: [PATCH v1 09/19] config: add git_config_get_max_percent_split_change()

2016-10-29 Thread Christian Couder
On Tue, Oct 25, 2016 at 12:06 PM, Duy Nguyen <pclo...@gmail.com> wrote: > On Sun, Oct 23, 2016 at 4:26 PM, Christian Couder > <christian.cou...@gmail.com> wrote: >> This new function will be used in a following commit to get the >> +int git_config_get

Re: [PATCH v1 10/19] read-cache: regenerate shared index if necessary

2016-10-29 Thread Christian Couder
On Sun, Oct 23, 2016 at 6:07 PM, Ramsay Jones wrote: >> >> +int too_many_not_shared_entries(struct index_state *istate) > > This function is a file-loacal symbol; could you please make it > a static function. Ok, it will be in the next version. Thanks, Christian.

Re: Regarding "git log" on "git series" metadata

2016-11-04 Thread Christian Couder
On Fri, Nov 4, 2016 at 6:57 PM, Junio C Hamano wrote: > > Imagine we invent a new tree entry type, "gitref", that is similar > to "gitlink" in that it can record a commit object name in a tree, > but unlike "gitlink" it does imply reachability. And you do not add > phony

Re: Regarding "git log" on "git series" metadata

2016-11-05 Thread Christian Couder
On Sat, Nov 5, 2016 at 5:42 AM, Junio C Hamano <gits...@pobox.com> wrote: > Christian Couder <christian.cou...@gmail.com> writes: > >> Couldn't a RefTree be used to store refs that point to the base >> commit, > > I think it is the other way around. With the ne

Re: [PATCH v1 03/19] split-index: add {add,remove}_split_index() functions

2016-11-09 Thread Christian Couder
On Wed, Nov 9, 2016 at 10:24 AM, Duy Nguyen <pclo...@gmail.com> wrote: > On Mon, Nov 7, 2016 at 5:08 PM, Duy Nguyen <pclo...@gmail.com> wrote: >> On Sun, Oct 30, 2016 at 5:06 AM, Christian Couder >> <christian.cou...@gmail.com> wrote: >>> On Tue,

Re: Regarding "git log" on "git series" metadata

2016-11-04 Thread Christian Couder
On Fri, Nov 4, 2016 at 10:19 PM, Josh Triplett <j...@joshtriplett.org> wrote: > On Fri, Nov 04, 2016 at 09:47:41PM +0100, Christian Couder wrote: >> On Fri, Nov 4, 2016 at 6:57 PM, Junio C Hamano <gits...@pobox.com> wrote: >> > >> > Imagine w

Re: [PATCH v1 09/19] config: add git_config_get_max_percent_split_change()

2016-11-04 Thread Christian Couder
On Tue, Nov 1, 2016 at 8:13 PM, Junio C Hamano wrote: > >>> + return -1; > > Perhaps do the usual > > return error(_("...")); > > here? Ok, it will be in the next version.

Re: [PATCH v1 12/19] Documentation/config: add splitIndex.maxPercentChange

2016-11-04 Thread Christian Couder
On Tue, Nov 1, 2016 at 8:19 PM, Junio C Hamano <gits...@pobox.com> wrote: > Christian Couder <christian.cou...@gmail.com> writes: > >> +splitIndex.maxPercentChange:: >> + When the split index feature is used, this specifies the >> + percent of entries

Re: Regarding "git log" on "git series" metadata

2016-11-05 Thread Christian Couder
On Sat, Nov 5, 2016 at 4:18 PM, Josh Triplett <j...@joshtriplett.org> wrote: > On Sat, Nov 05, 2016 at 01:45:27PM +0100, Christian Couder wrote: >> And with what Peff says above it looks like we will need ways >> configure and tweak commit reachability with gitlink/gitref an

Re: Regarding "git log" on "git series" metadata

2016-11-05 Thread Christian Couder
On Fri, Nov 4, 2016 at 10:19 PM, Josh Triplett <j...@joshtriplett.org> wrote: > On Fri, Nov 04, 2016 at 09:47:41PM +0100, Christian Couder wrote: >> On Fri, Nov 4, 2016 at 6:57 PM, Junio C Hamano <gits...@pobox.com> wrote: >> > >> > Imagine w

Re: Regarding "git log" on "git series" metadata

2016-11-05 Thread Christian Couder
On Sat, Nov 5, 2016 at 1:17 PM, Christian Couder <christian.cou...@gmail.com> wrote: > On Sat, Nov 5, 2016 at 5:42 AM, Junio C Hamano <gits...@pobox.com> wrote: >> Christian Couder <christian.cou...@gmail.com> writes: >> >>> Couldn't a RefTree be

Re: [PATCH v4 5/8] trailer: clarify failure modes in parse_trailer

2016-10-22 Thread Christian Couder
On Fri, Oct 21, 2016 at 2:18 AM, Junio C Hamano wrote: > Jonathan Tan writes: > >> That is true - I think we can take the allowed separators as an >> argument (meaning that we can have different behavior for file parsing >> and command line parsing),

[PATCH v1 17/19] t1700: test shared index file expiration

2016-10-23 Thread Christian Couder
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- t/t1700-split-index.sh | 44 1 file changed, 44 insertions(+) diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh index f03addf..f448fc1 100755 --- a/t/t1700-split-index.sh +

[PATCH v1 11/19] t1700: add tests for splitIndex.maxPercentChange

2016-10-23 Thread Christian Couder
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- t/t1700-split-index.sh | 72 ++ 1 file changed, 72 insertions(+) diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh index 507a1dd..f03addf 100755 --- a/t/t1700-split-in

[PATCH v1 18/19] Documentation/config: add splitIndex.sharedIndexExpire

2016-10-23 Thread Christian Couder
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- Documentation/config.txt | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 380eeb8..5212a97 100644 --- a/Documentation/config.txt +++ b/Documentation/conf

[PATCH v1 01/19] split-index: s/eith/with/ typo fix

2016-10-23 Thread Christian Couder
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- split-index.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/split-index.c b/split-index.c index 35da553..615f4ca 100644 --- a/split-index.c +++ b/split-index.c @@ -187,7 +187,7 @@ void prepare_to_write_split

[PATCH v1 04/19] read-cache: add and then use tweak_split_index()

2016-10-23 Thread Christian Couder
This will make us use the split-index feature or not depending on the value of the "core.splitIndex" config variable. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- read-cache.c | 17 + 1 file changed, 17 insertions(+) diff --git a/read-cache.

[PATCH v1 00/19] Add configuration options for split-index

2016-10-23 Thread Christian Couder
om/chriscool/git/commits/config-split-index7 On the mailing list the related patch series and discussions were: https://public-inbox.org/git/20160711172254.13439-1-chrisc...@tuxfamily.org/ Christian Couder (19): split-index: s/eith/with/ typo fix config: add git_config_get_split_inde

[PATCH v1 13/19] sha1_file: make check_and_freshen_file() non static

2016-10-23 Thread Christian Couder
This function will be used in a commit soon, so let's make it available globally. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- cache.h | 3 +++ sha1_file.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cache.h b/cache.h index faceceb..a625b47

[PATCH v1 02/19] config: add git_config_get_split_index()

2016-10-23 Thread Christian Couder
This new function will be used in a following commit to know if we want to use the split index feature or not. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- cache.h | 1 + config.c | 10 ++ 2 files changed, 11 insertions(+) diff --git a/cache.h b/cache.h index 0

[PATCH v1 15/19] config: add git_config_get_date_string() from gc.c

2016-10-23 Thread Christian Couder
This function will be used in a following commit to get the expiration time of the shared index files from the config, and it is generic enough to be put in "config.c". Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- builtin/gc.c | 15 ++- cache.h

[PATCH v1 03/19] split-index: add {add,remove}_split_index() functions

2016-10-23 Thread Christian Couder
Also use the functions in cmd_update_index() in builtin/update-index.c. These functions will be used in a following commit to tweak our use of the split-index feature depending on the setting of a configuration variable. Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- b

[PATCH v1 07/19] Documentation/config: add information for core.splitIndex

2016-10-23 Thread Christian Couder
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- Documentation/config.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 27069ac..96521a4 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@

<    14   15   16   17   18   19   20   21   22   23   >