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>
---
To avoid printing anything when applying with
`state->apply_verbosity == verbosity_silent`, let's save the
existing warn and error routines before applying and replace
them with a routine that does nothing.
Then after applying, let's restore the saved routines.
Signed-off-by: Christian Cou
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
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 877610c..6a0818b 100644
--- a/builtin/apply.c
+++ b/builtin/appl
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(
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>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
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 55f6e48..6087195 100644
--- a/builtin
On Fri, Jul 29, 2016 at 12:10 PM, Richard Ipsum
wrote:
> On Thu, Jul 28, 2016 at 11:40:55PM -0700, Josh Triplett wrote:
> [snip]
>>
>> I'd welcome any feedback, whether on the interface and workflow, the
>> internals and collaboration, ideas on presenting diffs of
On Mon, Aug 1, 2016 at 12:02 PM, Oleg Taranenko wrote:
> Guys,
>
> further investigation shows, git bisect is broken from its core... really.
> Let consider 3rd a bit more complicated scenario
>
> #cd ..
> #rm -rf bisect3
> mkdir bisect3
> cd bisect3
> git init
> git
On Mon, Jul 25, 2016 at 6:04 PM, Duy Nguyen wrote:
>
> Hmm.. can you do the counting separately? A shared cache_entry must
> have its field "index" greater than zero. By counting the number of
> entries whose index is zero (i.e. not shared) against the total number
> of real
On Mon, Aug 1, 2016 at 10:40 PM, Junio C Hamano wrote:
> Junio C Hamano writes:
>
>> Stefan Beller writes:
>>
>>> In cache.h we have a NO_THE_INDEX_COMPATIBILITY_MACROS,
>>> and lots of
>>> #define foo_bar(..) frob_bar(_index, (..))
On Mon, Aug 1, 2016 at 7:24 PM, Stefan Beller <sbel...@google.com> wrote:
> On Sat, Jul 30, 2016 at 10:25 AM, Christian Couder
> <christian.cou...@gmail.com> wrote:
>
> I have reviewed briefly all 41 patches and generally they look good to me.
> There were some nits, wh
On Thu, Aug 11, 2016 at 10:58 AM, <stefan.na...@atlas-elektronik.com> wrote:
> Am 11.08.2016 um 10:52 schrieb 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
>
> s/api/
On Wed, Aug 10, 2016 at 7:34 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Christian Couder <christian.cou...@gmail.com> writes:
>
>>> Isn't the mention on NO_THE_INDEX_COMPATIBILITY_MACROS in the added
>>> comments (there are two) pure red-herring?
>&
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(-)
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 -
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
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
-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
apply.c | 10 --
apply.h | 1 +
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/apply.c b/apply.c
index 2ec2a8a..7e561a4 100644
--- a/apply.c
+++ b/apply.c
@@ -4674,8 +4674,14 @@ static int apply_patch(struct apply
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(
server with split-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 c
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(
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>
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
@@
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(+)
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
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
On Wed, Aug 3, 2016 at 9:13 PM, Jeff King wrote:
> On Mon, Aug 01, 2016 at 03:31:45PM -0700, Junio C Hamano wrote:
>
>> Jeff King writes:
>>
>> >> *1* I have a slight suspicion that this is cultural, i.e. how
>> >> arithmetic is taught in grade schools. When an
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-18.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
Hi Stephen,
On Wed, Aug 10, 2016 at 9:21 PM, Stephen Morton
wrote:
>
> Formatting on previous email was terrible, plus the diff wasn't performed
> against origin. Re-sending.
Thanks for working on this...
> (Finally getting back to this.)
>
> Something like the diff
On Mon, Aug 15, 2016 at 1:10 AM, Eric Wong <e...@80x24.org> wrote:
> Philip Oakley <philipoak...@iee.org> wrote:
>> From: "Christian Couder" <christian.cou...@gmail.com>
>> >You can also reply to this email.
>>
>> I see you ment
On Sun, Aug 14, 2016 at 10:58 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Christian Couder <christian.cou...@gmail.com> writes:
>
>> You can also reply to this email.
>
> I am not sure that is to be recommended, as that ends up going to
> the list, but anyway
On Wed, Aug 10, 2016 at 11:57 PM, Pranit Bauva wrote:
>
> @@ -431,6 +434,244 @@ static int bisect_terms(struct bisect_terms *terms,
> const char **argv, int argc)
> return 0;
> }
>
> +static int bisect_start(struct bisect_terms *terms, int no_checkout,
> +
On Tue, Aug 9, 2016 at 12:13 AM, Junio C Hamano <gits...@pobox.com> wrote:
> Christian Couder <christian.cou...@gmail.com> writes:
>
>> Now if someone really needs to use this new function, it should be
>> used like this:
>>
>> /* Save c
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(
To prepare for some structs and constants being moved from
builtin/apply.c to apply.h, we should give them some more
specific names to avoid possible name collisions in the global
namespace.
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
I am sending only 01/40 and 28/40 f
On Tue, Aug 9, 2016 at 4:51 PM, <stefan.na...@atlas-elektronik.com> wrote:
> Am 08.08.2016 um 23:02 schrieb Christian Couder:
>> To prepare for some structs and constants being moved from
>> builtin/apply.c to apply.h, we should give them some more
>> specific n
On Wed, Jul 13, 2016 at 5:16 PM, Duy Nguyen <pclo...@gmail.com> wrote:
> On Tue, Jul 12, 2016 at 9:45 PM, Christian Couder
> <christian.cou...@gmail.com> wrote:
>> On Tue, Jul 12, 2016 at 5:12 PM, Duy Nguyen <pclo...@gmail.com> wrote:
>>>
>>>
Hi Pranit,
On Wed, Jul 13, 2016 at 12:35 AM, Pranit Bauva wrote:
> Hey Junio,
>
> A small mistake got unnoticed by me which Lars recently pointed out.
> The naming convention is "git_path_" and underscore
> instead of spaces.
It's a good thing to resend when you find
On Wed, Jul 20, 2016 at 10:40 PM, Junio C Hamano <gits...@pobox.com> wrote:
> On Wed, Jul 20, 2016 at 1:38 PM, Christian Couder
> <christian.cou...@gmail.com> wrote:
>>> Micronit. 2.9.1 (or 2.9.2) would not be a "major release". 2.9.0 was,
>>&g
On Wed, Jul 20, 2016 at 8:05 PM, Junio C Hamano <gits...@pobox.com> wrote:
> On Wed, Jul 20, 2016 at 5:58 AM, Christian Couder
> <christian.cou...@gmail.com> wrote:
>> Hi everyone,
>>
>> I'm happy announce that the 17th edition of Git Rev News is now published:
Hi everyone,
I'm happy announce that the 17th edition of Git Rev News is now published:
https://git.github.io/rev_news/2016/07/20/edition-17/
Thanks a lot to all the contributors and helpers, especially Jakub and
Dscho!
Enjoy,
Christian, Thomas and Nicola.
--
To unsubscribe from this list:
On Tue, Jul 12, 2016 at 5:12 PM, Duy Nguyen wrote:
>
> No. People could create an index file anywhere in theory. So you don't
> know how many index files there are.
Maybe when an index file is created, its path and its sharedindex file
could be appended into a log file.
We
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-17.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
Hi,
It seems to me that there are many current topics/patch series in
flight that are about making Git interact with external code/processes
and that it could be interesting to step back a bit and see if we
could find a common approach/mechanism for at least some of these
current topics.
(This
On Tue, Jun 28, 2016 at 3:22 PM, Lars Schneider
wrote:
>
> @Christian/Peff:
> Is there a place to look for more info about your remote-object-store idea?
You may want to take a look at:
https://github.com/chriscool/git/commits/external-odb
I just updated it and I may
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
t/t0400-external-odb.sh | 9 +
1 file changed, 9 insertions(+)
diff --git a/t/t0400-external-odb.sh b/t/t0400-external-odb.sh
index 0f1bb97..6c6da5c 100755
--- a/t/t0400-external-odb.sh
+++ b/t/t0400-external-odb.sh
@@
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
t/t0400-external-odb.sh | 14 ++
1 file changed, 14 insertions(+)
diff --git a/t/t0400-external-odb.sh b/t/t0400-external-odb.sh
index fe85413..0f1bb97 100755
--- a/t/t0400-external-odb.sh
+++ b/t/t0400-external-
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
t/t0410-transfer-e-odb.sh | 136 ++
1 file changed, 136 insertions(+)
create mode 100755 t/t0410-transfer-e-odb.sh
diff --git a/t/t0410-transfer-e-odb.sh b/t/t0410-transfer-e-odb.
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
external-odb.c | 15 +++
external-odb.h | 2 ++
odb-helper.c | 41 +
odb-helper.h | 3 +++
sha1_file.c| 2 ++
5 files changed, 59 insertions(+), 4 deletions(-)
diff
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
cache.h| 9 +
environment.c | 4
external-odb.c | 6 ++
sha1_file.c| 3 +++
4 files changed, 22 insertions(+)
diff --git a/cache.h b/cache.h
index cc0a934..b0fe2bc 100644
--- a/cache.h
+++ b/c
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
t/t0400-external-odb.sh | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/t/t0400-external-odb.sh b/t/t0400-external-odb.sh
index 2b01617..fe85413 100755
--- a/t/t0400-external-odb.sh
+++ b/t/t0400-external-
/288151/focus=295160
Version 1 of this RFC/PATCH series is here:
http://thread.gmane.org/gmane.comp.version-control.git/297164
Links
~
This patch series is available here:
https://github.com/chriscool/git/commits/external-odb
Version 1 is here:
https://github.com/chriscool/git/commits/gl-exter
From: Jeff King <p...@peff.net>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
Makefile| 2 +
cache.h | 9 ++
external-odb.c | 115 +++
external-odb.h | 8 ++
odb-helper.c
From: Jeff King
---
external-odb.c | 14 ++
external-odb.h | 6 ++
odb-helper.c | 15 +++
odb-helper.h | 4
4 files changed, 39 insertions(+)
diff --git a/external-odb.c b/external-odb.c
index 1ccfa99..42978a3 100644
--- a/external-odb.c
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
external-odb.c | 4
1 file changed, 4 insertions(+)
diff --git a/external-odb.c b/external-odb.c
index bb70fe3..6dd7b25 100644
--- a/external-odb.c
+++ b/external-odb.c
@@ -133,6 +133,10 @@ int external_odb_write_object
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
t/t0400-external-odb.sh | 8
1 file changed, 8 insertions(+)
diff --git a/t/t0400-external-odb.sh b/t/t0400-external-odb.sh
index 6c6da5c..3c868ca 100755
--- a/t/t0400-external-odb.sh
+++ b/t/t0400-external-odb.sh
@@
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.c b/read-cache.c
Everytime split index is turned on, it creates a "sharedindex."
file in the git directory. This makes sure that old sharedindex
files are removed after a new one has been created.
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
read-cache.
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
t/t1700-split-index.sh | 37 +
1 file changed, 37 insertions(+)
diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh
index 8aef49f..f1af0d5 100755
--- a/t/t1700-split-index.sh
+++ b/t
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
Documentation/git-update-index.txt | 6 ++
1 file changed, 6 insertions(+)
diff --git a/Documentation/git-update-index.txt
b/Documentation/git-update-index.txt
index c6cbed1..2293140 100644
--- a/Documentation/git-
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 e208af1..aec8ecb 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/update-index.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/builtin/update-index.c b/builtin/update-index.c
index f06fe80..2b8aaa6 100644
--- a/builtin/update-index.c
+++ b/builtin/
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 f1dc289..5296a50 100644
--- a/cache.h
+++ b/cache.h
@@ -1695,6 +1695,7 @@ extern int git_config_get_bool_or_int
Also use the functions in cmd_update_index() in
builtin/update-index.c.
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/update-index.c | 17 -
split-index.c | 18 ++
split-index.h | 2 ++
3 files changed, 24 inse
l.git/298344/
This patch series is also available here:
https://github.com/chriscool/git/commits/config-split-index
Christian Couder (8):
config: add git_config_get_split_index()
split-index: add {add,remove}_split_index() functions
read-cache: add and then use tweak_split_index()
update-index:
On Thu, Aug 4, 2016 at 11:28 PM, Junio C Hamano wrote:
> Jeff King writes:
>
>> I wondered if that would then let us drop set_warn_routine(), but it
>> looks like there are other warning() calls it cares about. So that would
>> invalidate the last paragraph
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
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
On Mon, Aug 8, 2016 at 11:02 PM, Christian Couder
<christian.cou...@gmail.com> wrote:
>
> I will send a diff between this version and the previous one, as a
> reply to this email.
Here is the diff:
diff --git a/apply.c b/apply.c
index a73889e..2ec2a8a 100644
--- a/apply.
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
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
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
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
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", remove_file() should return -1 instead of
calling die().
Signed-off-by: Christian Coud
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(
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(+)
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
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
@@
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
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
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(
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
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(-)
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
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
To prepare for some structs and constants being moved from
builtin/apply.c to apply.h, we should give them some more
specific names to avoid possible name collisions in th global
namespace.
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 20 ++---
to init_apply_state() many times to be reused by series of calls to
the apply lib functions.
Helped-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com>
Helped-by: Johannes Schindelin <johannes.schinde...@gmx.de>
Helped-by: Eric Sunshine <sunsh...@sunshineco.com>
Signed-off-by: Christian Couder <ch
() 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
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
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>
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
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
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>
---
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
() 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
-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 &
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
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
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
1601 - 1700 of 2901 matches
Mail list logo