r libification Dscho has been making in this
thread, and that was why I didn't say much here.
Having said all that, as to --quiet/--silent, another way to surface
the "even more quiet" used is with "-q -q" (i.e. multiple levels of
quietness). I am just saying this for the record
>> In the early part of patches where it added only "const char *"
>> borrowed from the caller and fields of intregral type, the lack of
>> clear_apply_state() did not mattter, but with a few fields with
>> "string_list" type, anybody who want to make repeated
On Sat, May 14, 2016 at 8:26 AM, Johannes Schindelin
wrote:
[...]
>> >> By the way there are no tests yet for this new feature, and I am not
>> >> sure at all that "--silent" and "be_silent" are good names.
>> >
>> > If you want to follow existing code's example, we
Hi Chris,
On Fri, 13 May 2016, Christian Couder wrote:
> On Fri, May 13, 2016 at 8:32 AM, Johannes Schindelin
> <johannes.schinde...@gmx.de> wrote:
> >
> > On Wed, 11 May 2016, Christian Couder wrote:
> >
> >> I consider that the apply functionality is prop
elds of intregral type, the lack of
> clear_apply_state() did not mattter, but with a few fields with
> "string_list" type, anybody who want to make repeated call into the
> apply machinery would want a way to release the resource the
> structure holds.
>
> Because 49/94 is a
On Thu, May 12, 2016 at 9:56 PM, Junio C Hamano wrote:
> Christian Couder writes:
>
>> This is just a small cleanup.
>
> ... which may have been better happened at 09/94.
Ok, I will squash it in 09/94.
--
To unsubscribe from this list: send the
Hi Dscho,
On Fri, May 13, 2016 at 8:32 AM, Johannes Schindelin
<johannes.schinde...@gmx.de> wrote:
> Hi Chris,
>
> On Wed, 11 May 2016, Christian Couder wrote:
>
>> I consider that the apply functionality is properly libified before
>> these patches, and that they
Hi Chris,
On Wed, 11 May 2016, Christian Couder wrote:
> I consider that the apply functionality is properly libified before
> these patches, and that they should be in a separate series, but
> unfortunately using the libified apply in "git am" unmasks the fact tha
hese control what gets looked at and modified */
int apply; /* this is not a dry-run */
int check_index; /* preimage must match the indexed version */
int cached; /* apply to the index only */
/* These control cosmetic aspect of the output */
int
counterpart of init_apply_state().
In the early part of patches where it added only "const char *"
borrowed from the caller and fields of intregral type, the lack of
clear_apply_state() did not mattter, but with a few fields with
"string_list" type, anybody who want to make repeat
On Thu, May 12, 2016 at 9:41 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Christian Couder <christian.cou...@gmail.com> writes:
>
>> To libify the apply functionality the 'threeway' variable should
>> not be static and global to the file. Let's move
On Thu, May 12, 2016 at 9:28 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Christian Couder <christian.cou...@gmail.com> writes:
>
>> To libify the apply functionality the 'unidiff_zero' variable should
>> not be static and global to the file. Let's move
44
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -67,13 +67,15 @@ struct apply_state {
/* --numstat does numeric diffstat, and doesn't actually apply */
int numstat;
- const char *fake_ancestor;
-
int summary;
-
int threeway;
-
int no_add;
+ c
Christian Couder writes:
> This is just a small cleanup.
... which may have been better happened at 09/94.
Up to this point, the conversion looks quite sensible, even though I
think the organization of fields in apply_state do not look logical.
--
To unsubscribe
Christian Couder writes:
> struct apply_state {
> const char *prefix;
> int prefix_length;
> @@ -71,6 +78,8 @@ struct apply_state {
> int whitespace_error;
> int squelch_whitespace_errors;
> int applied_after_fixing_ws;
> +
> + enum
Christian Couder <christian.cou...@gmail.com> writes:
> 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'.
This and p_value belong together, I would think, so this can be
squa
Christian Couder <christian.cou...@gmail.com> writes:
> 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-of
Christian Couder <christian.cou...@gmail.com> writes:
> 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-of
Christian Couder <christian.cou...@gmail.com> writes:
> 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>
> S
Christian Couder <christian.cou...@gmail.com> writes:
> 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>
> S
Christian Couder <christian.cou...@gmail.com> writes:
> When the apply functionality will be libified, the 'struct apply_state'
> will be used by different pieces of code.
>
> To properly initialize a 'struct apply_state', let's provide a nice
> and easy to use init_a
Christian Couder writes:
> 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
Christian Couder writes:
> Let's just rename the global 'state_linenr' as it will become
> 'state->linenr' in a following patch.
>
> This also avoid errors when compiling with -Wshadow and makes
> it safer to later move global variables into a "state" struct.
Looks
Christian Couder writes:
> Let's just rename the global 'state_p_value' as it will become
> 'state->p_value' in a following patch.
>
> This also avoid errors when compiling with -Wshadow and makes
> it safer to later move global variables into a "state" struct.
Looks
me(line, NULL, p_value, TERM_TAB);
> + return;
> + }
>
> - if (orig_name) {
> - int len = strlen(orig_name);
> + if (*name) {
> + int len = strlen(*name);
> char *another;
>
Johannes Sixt writes:
> I'll also use it in production for a while, although I am not a git-am
> consumer nor do I use git-rebase without -i, hence, my tests will
> probably only show that there is no bad fall-out.
It will probably only show that you do not use the part that was
On Thu, May 12, 2016 at 7:06 PM, Johannes Sixt <j...@kdbg.org> wrote:
> Am 11.05.2016 um 15:16 schrieb Christian Couder:
>>
>> This is a patch series about libifying `git apply` functionality, and
>> using this libified functionality in `git am`, so that no 'git apply'
Am 11.05.2016 um 15:16 schrieb Christian Couder:
This is a patch series about libifying `git apply` functionality, and
using this libified functionality in `git am`, so that no 'git apply'
process is spawn anymore. This makes `git am` significantly faster, so
`git rebase`, when it uses the am
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 '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 '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/
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 | 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/
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 +
To libify `git apply` functionality we have to signal errors
to the caller instead of die()ing.
As a first step in this direction, let's make apply_patch() return
-1 in case of errors instead of dying. For now its only caller
apply_all_patches() will exit(1) when apply_patch() return -1
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 `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
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 '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/
Signed-off-by: Christian Couder
---
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 *state,
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", build_fake_ancestor() should return -1 using
error() instead of calling die().
Helped-by: Eri
* of context lines.
*/
- if ((leading != frag->leading) ||
- (trailing != frag->trailing))
+ if ((leading != frag->leading ||
+trailing != frag->trailing) && !
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", die_on_unsafe_path() should return -1 using
error() instead of calling die(), so while doing
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_conflicted_stages_file() should return -1
using error() instead of calling die().
Helpe
Signed-off-by: Christian Couder
---
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 @@ int
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(
Let's make it possible to request a silent operation on the
command line.
Signed-off-by: Christian Couder
---
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/apply.c
+++
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", write_out_one_result() should just return what
remove_file() and create_file() are returni
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, find_header() should return -1 using error()
instead of calling die().
Unfortunately find_header() already
repository"));
state->check_index = 1;
}
- if (state->apply_with_reject)
- state->apply = state->apply_verbosely = 1;
+ if (state->apply_with_reject) {
+ state->apply = 1;
+ if (!state->be_silent)
+
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
This replaces run_apply() implementation with a new one that
uses the apply api that has been previously prepared in
apply.c and apply.h.
This shoud improve performance a lot in certain cases.
As the previous implementation was creating a new `git apply`
process to apply each patch, it could
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_single_patch() should return -1 instead of
calling die().
Let's do that by using error() and let's
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 `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", gitdiff_*() functions should return -1 using
error() instead of calling die().
A previous
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", write_out_results() should return -1 instead of
calling exit().
Helped-by: Eric Sunsh
According to the lockfile API, when finished with a lockfile, one
should either commit it or roll it back.
This is even more important now that the same lockfile can be passed
to init_apply_state() many times to be reused by series of calls to
the apply lib functions.
Helped-by: Johannes
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
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", try_create_file() should return -1 in case of
error.
Unfortunately try_create_file() currently
it a/builtin/apply.c b/builtin/apply.c
index f05dc96..9ce177b 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -4448,9 +4448,6 @@ static int write_out_results(struct apply_state *state,
struct patch *list)
return errs;
}
-#define INACCURATE_EOF (1<<0)
-#define RECOUNT(
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
---
apply.c | 6 +++---
apply.h | 5 -
2 files changed, 3 insertions(+), 8
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
The gitdiff_*() functions that are called as p->fn() in parse_git_header()
should return 1 instead of -1 in case of end of header or unrecognized
input, as these are not real errors. It just instructs the parser to break
out.
This makes it possible for gitdiff_*() functions to return -1 in case
To libify `git apply` functionality we have to signal errors to the
caller instead of die()ing or exit()ing.
To do that in a compatible manner with the rest of the error handling
in builtin/apply.c, find_header() should return -1 instead of calling
die() or exit().
As parse_chunk() is called
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 `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 finish libifying the apply functionality, apply_all_patches() should not
die() or exit() in case of error, but return -1.
While doing that we must take care that file descriptors are properly closed
and, if needed, reset a sensible value.
Helped-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.
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_file() should just return what
add_conflicted_stages_file() and add_index_file() are
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
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 using error() instead of calling die().
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
refix_length;
+ /*
+* Since lockfile.c keeps a linked list of all created
+* lock_file structures, it isn't safe to free(lock_file).
+*/
+ struct lock_file *lock_file;
+
int apply;
int allow_overlap;
int apply_in_reverse;
@@ -4504,8 +4510,6 @
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 `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:
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 the 'fake_ancestor' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
By the way remove a comment about '--index-info' that was renamed
'--build-fake-ancestor' in commit 26b28007689d27a921ea90e5a29fc8eb74b0d297
(apply
This is just a small cleanup.
Signed-off-by: Christian Couder
---
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/apply.c
@@
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 '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 '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 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/
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 '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 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/
gv, const char
*prefix_)
int read_stdin = 1;
struct apply_state state;
- const char *whitespace_option = NULL;
-
struct option builtin_apply_options[] = {
{ OPTION_CALLBACK, 0, "exclude", , N_("path"),
N_(
701 - 800 of 1532 matches
Mail list logo