Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 41 +++--
1 file changed, 23 insertions(+), 18 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 8508607..f2dffa9 100644
--- a/builtin/apply.c
+++ b/builtin/a
This negative number can be -2 if no patch header has been found,
otherwise it is -1.
As parse_chunk() is called only by apply_patch() which already
returns -1 when an error happened, let's make it return -1 when
parse_chunk() returns -1.
Signed-off-by: Christian Couder <chrisc...@tuxfamily.
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 50 --
1 file changed, 28 insertions(+), 22 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index b4c2bd8..8508607 100644
--- a/builtin/apply.c
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 45 +++--
1 file changed, 23 insertions(+), 22 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index f387340..b4c2bd8 100644
--- a/builtin/apply.c
+++ b/b
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 ab311c1..c8b9bf0 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -68,6
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 699cabf..be237d1 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -96,7 +96,6 @@ static enum ws_
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 38 ++
1 file changed, 30 insertions(+), 8 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 49ef4c9..32c38f0 100644
--- a/builtin/apply.c
+++ b/builtin/a
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 37 -
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 7d91454..fa07b33 100644
--- a/builtin/apply.c
+++ b/builtin/a
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 75 ++---
1 file changed, 40 insertions(+), 35 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index bb58174..f387340 100644
--- a/builtin/apply.c
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
apply.h | 124
builtin/apply.c | 121 +-
2 files changed, 125 insertions(+), 120 deletions(-)
create mode
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 36 +---
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 32c38f0..5bd5154 100644
--- a/builtin/apply.c
+++ b/builtin/a
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 23 +--
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index eab5ae1..73247c7 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 259f256..52602af 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -79,6 +79,7 @@
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 787426f..6c0b153 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -4670,10 +4670,10 @@ stat
This will enable further refactoring.
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 9c4f67f..64bc3e9 100644
--- a/builtin/apply.c
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 ba828df..d90948a 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -33,6 +33,9 @@
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 16d78f9..e488879 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -39,6 +39,8 @@
Let's just rename the global 'state_p_value' as it will become
'state->p_value' in a following patch.
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 34 +-
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 62 +++--
1 file changed, 34 insertions(+), 28 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 52602af..7d91454 100644
--- a/builtin/apply.c
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 82 ++---
1 file changed, 49 insertions(+), 33 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index fecdb66..209a1b4 100644
--- a/builtin/apply.c
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 64bc3e9..401e111 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -147,10 +147,9 @@ stati
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 979849c..fecdb66 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -66,6 +66,7 @@
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 42 --
1 file changed, 24 insertions(+), 18 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 51e6af4..ad81210 100644
--- a/builtin/apply.c
+++ b/b
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 69 +
1 file changed, 40 insertions(+), 29 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 6c628f6..3f8671c 100644
--- a/builtin/apply.c
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/builtin/apply.c
index 67560e4..154679e 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -27,6
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 02239d9..8fd8dbc 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -79,7 +79,6 @@ static enum ws_
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 33a1f8f..506357c 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -43,6 +43,8 @@ struct apply
p of next, the rebase took 3.044529494 s, with
the git am command launched by the rebase command taking 0.583521168
s.
No tests on Windows have been performed, but it could be interesting
to test on this platform.
Christian Couder (83):
builtin/apply: make gitdiff_verify_name() return void
builtin/a
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index f69f982..b6d2343 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -63,6 +63,8 @@
By the way remove a comment about '--index-info' that was renamed
'--build-fake-ancestor' in commit 26b28007689d27a921ea90e5a29fc8eb74b0d297
(apply: get rid of --index-info in favor of --build-fake-ancestor,
Sep 17 2007).
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
b
As the value returned by gitdiff_verify_name() is put into the
same variable that is passed as a parameter to this function,
it is simpler to pass the address of the variable and have
gitdiff_verify_name() change the variable itself.
Signed-off-by: Christian Couder <chrisc...@tuxfamily.
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 755e0e3..67560e4 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -26,6 +26,7 @@
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 e133b38..7115dc2 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -1516,7 +1516,7 @@ stat
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 28 ++--
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index be237d1..ab311c1 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 401e111..259f256 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -78,6
On Sun, Apr 24, 2016 at 5:23 PM, Ramsay Jones
<ram...@ramsayjones.plus.com> wrote:
>
>
> On 24/04/16 14:33, Christian Couder wrote:
>> This is a patch series about libifying `git apply` functionality, and
>> using this libified functionality in `git am`, so that no 'git
On Sun, Apr 24, 2016 at 6:27 PM, Christian Couder
<christian.cou...@gmail.com> wrote:
> On Sun, Apr 24, 2016 at 5:23 PM, Ramsay Jones
> <ram...@ramsayjones.plus.com> wrote:
>>
>>
>> On 24/04/16 14:33, Christian Couder wrote:
>>> This is a patch ser
On Wed, Apr 27, 2016 at 6:27 PM, Junio C Hamano wrote:
>
> I think 02/83 that renamed the global-to-be-moved-to-state to
> state_p_value was brilliant, and this should follow suit; you would
> be moving linenr into the state eventually in later steps, right?
Yeah, ok, I will
_char_line", but otherwise you
can add "Reviewed-by: Christian Couder <chrisc...@tuxfamily.org>".
Thanks!
> Signed-off-by: Rafal Klys <rafalk...@wp.pl>
> ---
> trailer.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/trailer.c b/tr
On Tue, Apr 26, 2016 at 12:00 AM, Stefan Beller <sbel...@google.com> wrote:
> On Sun, Apr 24, 2016 at 6:33 AM, Christian Couder
> <christian.cou...@gmail.com> wrote:
>> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
>
> Up to this patch, have
On Mon, Apr 25, 2016 at 11:40 PM, Stefan Beller <sbel...@google.com> wrote:
> On Sun, Apr 24, 2016 at 6:33 AM, Christian Couder
> <christian.cou...@gmail.com> wrote:
>> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
>> ---
>> builtin/appl
On Mon, Apr 25, 2016 at 9:32 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote:
> On Sun, Apr 24, 2016 at 9:33 AM, Christian Couder
> <christian.cou...@gmail.com> wrote:
>> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
>> ---
>> diff
On Tue, Apr 26, 2016 at 10:20 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Christian Couder <christian.cou...@gmail.com> writes:
>
>>> It's not clear why we need to declare buf here? Oh wait it is. It's just
>>> moved from the start of the function. But w
On Tue, Apr 26, 2016 at 10:28 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Christian Couder <christian.cou...@gmail.com> writes:
>
>> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
>> ---
>> builtin/apply.c | 2 +-
>> 1 file change
On Tue, Apr 26, 2016 at 10:36 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Christian Couder <christian.cou...@gmail.com> writes:
>
>> +enum ws_error_action {
>> + nowarn_ws_error,
>> + warn_on_ws_error,
>> + die_on_ws_error,
>&g
On Tue, Apr 26, 2016 at 10:27 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Christian Couder <christian.cou...@gmail.com> writes:
>
>> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
>> ---
>> builtin/apply.c | 9 +
>> 1 file cha
On Mon, Apr 25, 2016 at 11:02 AM, Duy Nguyen <pclo...@gmail.com> wrote:
> On Sun, Apr 24, 2016 at 8:33 PM, Christian Couder
> <christian.cou...@gmail.com> wrote:
>> Sorry if this patch series is a bit long. I can split it into two or
>> more series if it is prefered.
On Mon, Apr 25, 2016 at 2:14 AM, Duy Nguyen <pclo...@gmail.com> wrote:
> On Mon, Apr 25, 2016 at 12:42 AM, Ramsay Jones
> <ram...@ramsayjones.plus.com> wrote:
>>
>>
>> On 24/04/16 17:56, Christian Couder wrote:
>>> On Sun, Apr 24, 2016 at 6:27 PM, Chr
On Mon, Apr 25, 2016 at 9:50 AM, Eric Sunshine wrote:
>> @@ -4515,8 +4521,6 @@ static int write_out_results(struct apply_state
>> *state, struct patch *list)
>> return errs;
>> }
>>
>> -static struct lock_file lock_file;
>
> Does the static lock_file in
On Tue, Apr 26, 2016 at 3:20 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote:
> On Sun, Apr 24, 2016 at 9:33 AM, Christian Couder
> <christian.cou...@gmail.com> wrote:
>> To libify `git apply` functionality we have to signal errors
>> to the caller instead of d
On Thu, Apr 28, 2016 at 10:00 PM, Rafal Klys wrote:
> Fall throught git_default_config when reading config to update the
> comment_line_char from default '#' to possible different value set in
> core.commentChar.
>
> Signed-off-by: Rafal Klys
> ---
>
> Added
On Mon, Apr 25, 2016 at 7:55 PM, Junio C Hamano wrote:
> Eric Sunshine writes:
>
>>> + /*
>>> +* Since lockfile.c keeps a linked list of all created
>>> +* lock_file structures, it isn't safe to free(lock_file).
>>> +*/
On Tue, Apr 26, 2016 at 6:09 PM, Ævar Arnfjörð Bjarmason
wrote:
> On Tue, Apr 26, 2016 at 3:40 PM, Marc Branchaud wrote:
>> On 2016-04-26 06:58 AM, Ævar Arnfjörð Bjarmason wrote:
>>>
>>> Makes sense to have an experimental.* config tree for git for stuff
On Mon, Apr 25, 2016 at 8:57 PM, Stefan Beller <sbel...@google.com> wrote:
> On Sun, Apr 24, 2016 at 6:33 AM, Christian Couder
> <christian.cou...@gmail.com> wrote:
>> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
>> ---
>> builtin/apply.c |
On Mon, Apr 25, 2016 at 8:50 PM, Stefan Beller wrote:
>> @@ -2251,7 +2319,7 @@ static int match_fragment(struct image *img,
>> int match_beginning, int match_end)
>> {
>> int i;
>> - char *fixed_buf, *buf, *orig, *target;
>> +
On Mon, Apr 25, 2016 at 11:50 PM, Stefan Beller <sbel...@google.com> wrote:
> On Sun, Apr 24, 2016 at 6:33 AM, Christian Couder
> <christian.cou...@gmail.com> wrote:
>
>> @@ -4630,9 +4644,10 @@ static int option_parse_whitespace(const struct
>> option *opt,
>
On Mon, May 23, 2016 at 2:55 AM, Yotam Gingold wrote:
> Pierre-François CLEMENT gmail.com> writes:
>> 2014-06-10 17:27 GMT+02:00 David Kastrup gnu.org>:
>>> Pierre-François CLEMENT gmail.com> writes:
>>>
...
Hm I see. Even though the documentation doesn't
On Mon, May 23, 2016 at 1:07 PM, Johannes Schindelin
wrote:
>
> On Fri, 20 May 2016, Pranit Bauva wrote:
>
>> Frankly, I have no idea what you mean by libification but I will use
>> error() since efforts for libification have already started.
>
> The term
On Sun, May 22, 2016 at 1:00 PM, wrote:
[...]
> +#
> +# Run Git bisect
> +#
> +run_bisect () {
> + TEST_SCRIPT=$1
> + BAD_REV=$2
> + GOOD_RV=$3
> + TMPDIR=$(mktemp -d -t "ci-report-bisect-XX" 2>/dev/null)
> + cat >
ebase 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 0.583521168
s.
Christian Couder (49):
builtin/apply: make gitdiff_verify_name() return void
builtin/apply: avoid parameter shadowing
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
-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
On Sat, May 14, 2016 at 8:27 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Christian Couder <christian.cou...@gmail.com> writes:
>
>> On Thu, May 12, 2016 at 10:43 PM, Junio C Hamano <gits...@pobox.com> wrote:
>>> Junio C Hamano <gits...@po
On Tue, May 24, 2016 at 10:10 AM, Christian Couder
<christian.cou...@gmail.com> wrote:
>
> I will send a diff between this version and the 50 first patches of v2
> soon as a reply to this email.
Here is the diff:
diff --git a/builtin/apply.c b/builtin/apply.c
index ec55768.
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 ++
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 '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 the apply functionality the 'threeway' 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 +
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/
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>
---
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 'numstat' 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 the 'diffstat' 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 '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/
: 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 '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 '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 '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 | 8
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 '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 | 7 +++
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/
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 '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/
com>
Reviewed-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
builtin/apply.c | 32 ++--
1 file changed, 22 insertions(+), 10 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index ae068
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 &
On Fri, May 13, 2016 at 9:42 PM, Christian Couder
<christian.cou...@gmail.com> wrote:
> On Thu, May 12, 2016 at 9:56 PM, Junio C Hamano <gits...@pobox.com> wrote:
>> Christian Couder <christian.cou...@gmail.com> writes:
>>
>>> This is just a small cle
.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>
---
hell
> function to C so as to use the existing test suite. As more functions
> are ported, this subcommand will be retired and will be called by some
> other method.
>
> Mentored-by: Lars Schneider <larsxschnei...@gmail.com>
> Mentored-by: Christian Couder <chrisc...@tuxfamil
On Mon, May 23, 2016 at 11:16 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Christian Couder <christian.cou...@gmail.com> writes:
>
>>> This should be clarified to define what a tracked file is. I propose
>>> appending:
>>>
>>> A fil
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
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 'update_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/
(), 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 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 | 61 +++---
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
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 '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 the 'apply_in_reverse' 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 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
1301 - 1400 of 2901 matches
Mail list logo