To libify the apply functionality the 'applied_after_fixing_ws' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
To libify the apply functionality the 'check_index' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
To libify the apply functionality the 'line_termination' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
d the call chain.
To start let's move the "prefix" and "prefix_length" global variables into
"struct apply_state".
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 94 +
To libify the apply functionality the 'p_value' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/a
To libify the apply functionality the 'ws_ignore_action' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
To libify the apply functionality the 'symlink_changes' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
To libify the apply functionality the 'state_linenr' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
To libify the apply functionality the 'max_change' and 'max_len'
variables should not be static and global to the file. Let's move
them into 'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
To libify the apply functionality the 'squelch_whitespace_errors' variable
should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
bel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 47 +--
1 file changed, 25 insertions(+), 22 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index dd56a8e..47622be 100644
--- a/builtin/apply.c
+
To libify the apply functionality the 'apply_verbosely' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
The 'read_stdin' variable doesn't need to be static and global to the
file. It can be local to cmd_apply(), so let's move it there.
This will make it easier to libify the apply functionality.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxf
To libify the apply functionality the 'check' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 14 +++---
On Fri, May 20, 2016 at 6:10 PM, Junio C Hamano wrote:
> Junio C Hamano writes:
>
> From: Armin Kunaschik
> Date: Fri, 20 May 2016 16:31:30 +0200
> Subject: [PATCH] t0008: 4 tests fail with ksh88
>
> In t0008, we have
>
>
I am responding to this 2+ month old email because I am investigating
adding an alternate object store at the same level as loose and packed
objects. This alternate object store could be used for large files. I
am working on this for GitLab. (Yeah, I am working, as a freelance,
for both
d the call chain.
To start let's move the "prefix" and "prefix_length" global variables into
"struct apply_state".
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 94 +
The 'read_stdin' variable doesn't need to be static and global to the
file. It can be local to cmd_apply(), so let's move it there.
This will make it easier to libify the apply functionality.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxf
.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 48
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index e133b38..705a9c8 100644
--- a/builtin/apply.c
+++ b/builtin
This is just a cleanup to avoid errors when compiling with -Wshadow and
to make it safer to later move global variables into a "state" struct.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
sted rebasing 13 commits in Booking.com's
monorepo on a Red Hat 6.5 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 rebas
-1 instead of die()ing in case of error.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 26 +-
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/builtin/apply.c b/bui
viewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 23 ++-
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index ae068e7..e133033 100644
--- a/bui
To libify the apply functionality the 'unidiff_zero' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
The 'options' variable doesn't need to be static and global to the
file. It can be local to cmd_apply(), so let's move it there.
This will make it easier to libify the apply functionality.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxf
The match_fragment() function is very big and contains a big special case
algorithm that does line by line fuzzy matching. So let's extract this
algorithm in a separate line_by_line_fuzzy_match() function.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder &
happened, it is ok for parse_chunk() to do the same.
Helped-by: Eric Sunshine <sunsh...@sunshineco.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/builtin/apply
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 | 29 +
apply
To libify the apply functionality the 'max_change' and 'max_len'
variables should not be static and global to the file. Let's move
them into 'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
To libify the apply functionality the 'p_value' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/a
To libify the apply functionality the 'newfd' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff
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>
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/apply.c
index 2
To libify the apply functionality the 'symlink_changes' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
We will need this function in a later commit to redirect stdout
and stderr to /dev/null.
Helped-by: Johannes Sixt <j...@kdbg.org>
Helped-by: Johannes Schindelin <johannes.schinde...@gmx.de>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
run-command.c | 2 +-
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>
---
com>
Helped-by: Johannes Schindelin <johannes.schinde...@gmx.de>
Helped-by: Eric Sunshine <sunsh...@sunshineco.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 25 +
1 file changed, 13 insertions(+), 12 deletions(-)
diff
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 0e20467..2b562db 100644
--- a/builtin/apply
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 using
error() instead of calling die().
Signed-off-by: Christian
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 657e986..a7e 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -57,20 +57,
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 using error()
instead of calling die().
Signed-off-by: Christ
(), so that the caller can supply the same instance to
different calls. And let's alloc an instance in init_apply_state(), if the
caller doesn't want to supply one.
Helped-by: Eric Sunshine <sunsh...@sunshineco.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
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 using
error() instead of calling die().
Signed-off-by:
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 using
error() instead of calling die().
Signed-off-by: Christ
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>
To libify the apply functionality the 'has_include' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 6 ++
: get rid of --index-info in favor of --build-fake-ancestor,
Sep 17 2007).
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/bui
To libify the apply functionality the 'fn_table' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
This is just a small cleanup.
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 67c64a5..2aea8ba 100644
--- a/builtin/apply.c
+++ b/builtin/a
To libify the apply functionality the 'ws_ignore_action' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
To libify the apply functionality we should provide a function to
apply many patches. Let's move the code to do that into a new
apply_all_patches() function.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/a
To libify the apply functionality the 'apply_verbosely' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
To libify the apply functionality the 'line_termination' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
To libify the apply functionality the 'allow_overlap' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 11 ++
To libify the apply functionality the 'no_add' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 6 +++---
1
To libify the apply functionality the 'cached' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
To libify the apply functionality the 'limit_by_name' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
To libify the apply functionality the 'whitespace_error' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
To libify the apply functionality the 'unsafe_paths' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 8
To libify the apply functionality the 'p_value_known' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 9 -
To libify the apply functionality we should provide a function
to check that the values in a 'struct apply_state' instance are
coherent. Let's move the code to do that into a new
check_apply_state() function.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder &
To libify the apply functionality the 'root' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
To libify the apply functionality the 'applied_after_fixing_ws' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
This will enable further refactoring, and it is more coherent and
simpler if all the option_parse_*() functions are passed a
'struct apply_state' instance in opt->value.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
A previous change has move the whitespace_option variable from cmd_apply
into 'struct apply_state', so that we can now avoid passing it separately
to set_default_whitespace_mode().
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxf
To libify the apply functionality the 'check_index' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
To libify the apply functionality the 'squelch_whitespace_errors' variable
should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
il.com>
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 34 +-
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index fe5aebd..e133b
To libify the apply functionality the 'apply' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
To libify the apply functionality the 'apply_with_reject' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
To libify the apply functionality the 'p_context' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 8
To libify the apply functionality the 'check' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 16 +---
To libify the apply functionality the 'summary' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 9 +
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
apply.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/apply.c b/apply.c
index 5459ee1..e0fdd1d 100644
--- a/apply.c
+++ b/apply.c
@@ -4669,13 +4669,13 @@ static int apply_patch(struct apply_state
c Sunshine <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 06c1c16..a2cc099 100644
To libify the apply functionality the 'ws_error_action' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 62 +++---
To libify the apply functionality the 'patch_input_file' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
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 using
error() instead of calling exit().
Signed-off-by:
This variable should prevent anything to be printed on both stderr
and stdout.
Let's not take care of stdout and apply_verbosely for now though,
as that will be taken care of in following patches.
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
apply.
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
write_or_die.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/write_or_die.c b/write_or_die.c
index 49e80aa..c29f677 100644
--- a/write_or_die.c
+++ b/write_or_die.c
@@ -87,8 +87,7 @@ int write_or_whin
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/am.c | 29 -
1 file changed, 8 insertions(+), 21 deletions(-)
diff --git a/builtin/am.c b/builtin/am.c
index cc66a48..c158c4d 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -1526,7 +
...@gmail.com>
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 b3a9c2e..42b0a24 100644
--- a/builtin/apply.c
*/
...
/* When finished reset the index file */
set_index_file(old_index_file);
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
cache.h | 1 +
environment.c | 10 ++
2 files changed, 11 insertions(+)
diff --git a/cache.h b/cache.h
index 160f8e3..452d0ec
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 f06bf16..97bc704 100644
--- a/builtin/apply.c
that let's change
its name to check_unsafe_path().
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 42b0a24..06c1c16 100644
--- a/builtin/apply
d-by: Eric Sunshine <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 52f36c2..ca3502f 100644
--- a/builtin
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
apply.c | 29 +
apply.h | 3 +++
2 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/apply.c b/apply.c
index e0fdd1d..1dafc82 100644
--- a/apply.c
+++ b/apply.c
@@ -100,6 +100,11
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(+)
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(
Schindelin <johannes.schinde...@gmx.de>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
apply.c | 31 +--
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/apply.c b/apply.c
index 3285bf7..7480ae8 100644
--- a/apply.c
+++ b/apply.c
@@ -47
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 using error()
instead of calling die().
Signed-off-by: Christ
Let's make it possible to request a silent operation on the
command line.
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/builtin/apply.c b/builtin/apply.c
index ce12769..397ef26 100644
--- a/builtin/a
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 2b562db..f06bf16 100644
--- a/builtin/apply
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>
---
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
returns -1 when no header is found,
so let's make it return -2 instead in this case.
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 33 ++---
t/t4254-am-corrupt.sh | 2 +-
2 files changed, 23 insertions(+), 12 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 libify `git apply` functionality we have to signal errors to the
caller instead of die()ing. Let's do that by using error() instead
of die()ing in read_patch_file().
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 8 +---
1 file changed, 5 insertions
.
In a later patch, apply_all_patches() will return -1 too instead of
exiting.
Helped-by: Eric Sunshine <sunsh...@sunshineco.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 54 +++---
1 file changed, 39 inser
To libify the apply functionality the 'state_linenr' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/
1401 - 1500 of 2901 matches
Mail list logo