On Thu, Jun 29, 2017 at 03:11:37PM -0700, Luck, Tony wrote:
> So there is a "--cc-cmd" option that can do the same as those "-cc" arguments.
> Combine that with --suppress-cc=bodycc and things get a bit more automated.
Yeah, whatever works for you.
I did play with cc-cmd somewhat but can't be bot
On Fri, Jun 30, 2017 at 09:00:14AM +0300, Сергей Шестаков wrote:
> I am trying to make an automated processing of "git status" results.
> I execute the command
>
> git status -z -uno
>
> I expect that it has stable output format. However, it still can print
> warnings like
>
> warning: CRLF wil
On Thu, Jun 29, 2017 at 05:07:10PM -0700, Stefan Beller wrote:
> + Small blocks of 3 moved lines or fewer are skipped.
If I read the commit messages correctly, this "skipping" process
applies to the move detection in general for those smaller blocks
and therefore doesn't mean a malicious move
On 29 June 2017 at 23:41, miguel torroja wrote:
> On Thu, Jun 29, 2017 at 8:59 AM, Luke Diamand wrote:
>> On 28 June 2017 at 14:14, miguel torroja wrote:
>>> Thanks Luke,
>>>
>>> regarding the error in t9800 (not ok 18 - unresolvable host in P4PORT
>>> should display error), for me it's very wei
The Latest patch I sent was already the squashed version with the fix
to pass the tests.
Thanks,
On Fri, Jun 30, 2017 at 9:56 AM, Luke Diamand wrote:
> On 29 June 2017 at 23:41, miguel torroja wrote:
>> On Thu, Jun 29, 2017 at 8:59 AM, Luke Diamand wrote:
>>> On 28 June 2017 at 14:14, miguel t
> On 30 Jun 2017, at 00:46, miguel torroja wrote:
>
> The option -G of p4 (python marshal output) gives more context about the
> data being output. That's useful when using the command "change -o" as
> we can distinguish between warning/error line and real change description.
>
> Some p4 trigge
Сергей Шестаков writes:
> I understand that we can turn off core.safecrlf, but it's
> inconvinient.
Note that you can do that without actually changing the config file:
git -c core.safecrlf=false status ...
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
On 30/06/17 11:09, Matthieu Moy wrote:
Сергей Шестаков writes:
I understand that we can turn off core.safecrlf, but it's
inconvinient.
Note that you can do that without actually changing the config file:
git -c core.safecrlf=false status ...
Beside that, I would recommend to set up a
On Fri, Jun 30, 2017 at 10:26 AM, Lars Schneider
wrote:
>
>> On 30 Jun 2017, at 00:46, miguel torroja wrote:
>>
>> The option -G of p4 (python marshal output) gives more context about the
>> data being output. That's useful when using the command "change -o" as
>> we can distinguish between warni
From: Phillip Wood
This is what the other routines in Git.pm do if there's an error.
Signed-off-by: Phillip Wood
---
perl/Git.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/perl/Git.pm b/perl/Git.pm
index
f075b500c510d183074c0358fb24fefc72248125..baf80d1ab038590c85
From: Phillip Wood
Move unquote_path() from git-add--interactive to Git.pm so it can be
used by other scripts. Note this is a straight copy, it does not
handle '\a'. That will be fixed in the next commit.
Signed-off-by: Phillip Wood
---
git-add--interactive.perl | 43 +-
From: Phillip Wood
The version copied from git-add--interactive did not handle quoted
paths containing '\a'.
Signed-off-by: Phillip Wood
---
perl/Git.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/perl/Git.pm b/perl/Git.pm
index
35188842ef82c67f83f6d72fd37e38edb89532
From: Phillip Wood
Check that unquote_path() handles spaces and escape sequences properly
Signed-off-by: Phillip Wood
---
t/t9700/test.pl | 7 +++
1 file changed, 7 insertions(+)
diff --git a/t/t9700/test.pl b/t/t9700/test.pl
index
1b75c919651a8126e2a327f3d9645d4377823726..34cd01366f9216
From: Phillip Wood
Thanks for the review Junio, I've amended the patches as you suggested.
The first patch now removes unquote_path() from add -i as well as
adding it to Git.pm. I've fixed the naming issues (the version I sent
previously was copied from another script rather than directly from
a
On 23/06/17 00:18, Jeff King wrote:
> On Thu, Jun 22, 2017 at 11:26:17AM +0100, Phillip Wood wrote:
>
>> From: Phillip Wood
>>
>> I'm using this in some scripts and it would be more convenient to have
>> it available from Git.pm rather than copying and pasting it each time
>> I need it. I think i
> On 30 Jun 2017, at 11:41, Miguel Torroja wrote:
>
> On Fri, Jun 30, 2017 at 10:26 AM, Lars Schneider
> wrote:
>>
>>> On 30 Jun 2017, at 00:46, miguel torroja wrote:
>>>
>>> The option -G of p4 (python marshal output) gives more context about the
>>> data being output. That's useful when us
The notice that "git commit " default to "git commit
--only " was there since 756e3ee0 ("Merge branch
'jc/commit'", 2006-02-14). Back then, existing users of Git
expected the command doing "git commit --include ", and
after the behaviour of the command was changed to align with
other people's "$sc
The commit template adds the status information without
adding a new line to distinguish them in the absence
of optional parts. This results in difficulty in interpreting
it's content, specifically for inexperienced users.
Unconditionally, add new lines to separate the status message
from the othe
Hi
I'm running git version 2.13.1 on Ubuntu 16.04 (x64)
I'm connecting over a very slow (international link) to a very busy gerrit
server (gerrit.libreoffice.org) using ssh.
Ping types are on the order of 200ms.
Using GIT_TRACE_PACKET=true, what I am seeing is that the bulk of the time is spen
Thanks, both looks good. Will queue.
--
Dear Beloved Friend
I am Mrs Nicole Benoite Marois and I have been suffering from ovarian
cancer disease and the doctor says that i have just few weeks to leave.
I am from (Paris) France but based in Benin republic since eleven years
ago as a business woman dealing with gold exportation b
Looks good. Will queue.
Thanks.
The sample hook to prepare the commit message before
a commit allows users to opt-in to add the signature
to the commit message. The signature is added at a place
that isn't consistent with the "-s" option of "git commit".
Further, it could go out of view in certain cases.
Add the signature to the
On Fri, Jun 30, 2017 at 12:13 PM, Lars Schneider
wrote:
>
>> On 30 Jun 2017, at 11:41, Miguel Torroja wrote:
>>
>> On Fri, Jun 30, 2017 at 10:26 AM, Lars Schneider
>> wrote:
>>>
On 30 Jun 2017, at 00:46, miguel torroja wrote:
The option -G of p4 (python marshal output) gives more
On Fri, Jun 30, 2017 at 12:26 AM, Simon Ruderich wrote:
> On Thu, Jun 29, 2017 at 05:07:10PM -0700, Stefan Beller wrote:
>> + Small blocks of 3 moved lines or fewer are skipped.
>
> If I read the commit messages correctly, this "skipping" process
> applies to the move detection in general for
If you supply a non-standard format to the date configuration for git
log, something like:
[log]
date = format:%Y-%m-%d %H:%M
then, when you run 'git log' inside a script, or when using gitk
(anywhere), it fails on decoding the format.
fatal: unknown date format format: %Y-%m-%d %H:%M
H
When status is called with '--porcelain' (as implied by '-z'), we promise
to output only messages as described in the man page.
Suppress CRLF warnings.
Signed-off-by: Stefan Beller
---
Maybe something like this?
builtin/commit.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/builtin
Am 30.06.2017 um 18:06 schrieb Shaun Uldrikis:
If you supply a non-standard format to the date configuration for git
log, something like:
[log]
date = format:%Y-%m-%d %H:%M
then, when you run 'git log' inside a script, or when using gitk
(anywhere), it fails on decoding the format.
fat
On Fri, Jun 30, 2017 at 9:06 AM, Shaun Uldrikis wrote:
> If you supply a non-standard format to the date configuration for git
> log, something like:
> [log]
> date = format:%Y-%m-%d %H:%M
So I ran
$ git config log.date "format:%Y-%m-%d %H:%M"
$ git config --list |grep log.date
Kaartic Sivaraam writes:
> The sample hook to prepare the commit message before
> a commit allows users to opt-in to add the signature
> to the commit message. The signature is added at a place
> that isn't consistent with the "-s" option of "git commit".
> Further, it could go out of view in cer
Ævar Arnfjörð Bjarmason writes:
> @@ -169,6 +167,24 @@ void grep_init(struct grep_opt *opt, const char *prefix)
>
> static void grep_set_pattern_type_option(enum grep_pattern_type
> pattern_type, struct grep_opt *opt)
> {
> + /*
> + * When committing to the pattern type by setting
Stefan Beller writes:
> Yes it was a last minute squash before sending it out, as the fix was only
> two lines whereas the conversion is a lot. If it were separated I could have
> claimed the introduction to be a rather mechanical patch, but I did not
> make use of coccinelle or such, so the like
Yes. That is the case. Just confirmed it. I'll remove the old version.
Sorry to have bothered the mailing list.
Thank you.
-Shaun
On Fri, Jun 30, 2017 at 12:43 PM, Stefan Beller wrote:
> On Fri, Jun 30, 2017 at 9:06 AM, Shaun Uldrikis wrote:
>> If you supply a non-standard format to the date c
Stefan Beller writes:
> When using the hashmap a common need is to have access to arbitrary data
> in the compare function. A couple of times we abuse the keydata field
> to pass in the data needed. This happens for example in patch-ids.c.
It is not "arbitrary data"; it is very important to stre
Stefan Beller writes:
> diff --git a/patch-ids.c b/patch-ids.c
> index 9c0ab9e67a..b9b2ebbad0 100644
> --- a/patch-ids.c
> +++ b/patch-ids.c
> @@ -37,6 +37,7 @@ int commit_patch_id(struct commit *commit, struct
> diff_options *options,
> */
> static int patch_id_cmp(struct patch_id *a,
>
On Fri, Jun 30, 2017 at 10:34 AM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> When using the hashmap a common need is to have access to arbitrary data
>> in the compare function. A couple of times we abuse the keydata field
>> to pass in the data needed. This happens for example in patch-i
Stefan Beller writes:
> +static int next_byte(const char **cp, const char **endp,
> + const struct diff_options *diffopt)
> +{
> + int retval;
> +
> + if (DIFF_XDL_TST(diffopt, IGNORE_WHITESPACE_AT_EOL)) {
> + while (*endp > *cp && isspace(**endp))
> +
Stefan Beller writes:
> Instead of implementing this on our own, just use a convenience macro.
>
> Signed-off-by: Stefan Beller
> ---
Good eyes. Thanks.
> merge-recursive.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/merge-recursive.c b/merge-recursive.c
>
On Fri, Jun 30, 2017 at 10:39 AM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> diff --git a/patch-ids.c b/patch-ids.c
>> index 9c0ab9e67a..b9b2ebbad0 100644
>> --- a/patch-ids.c
>> +++ b/patch-ids.c
>> @@ -37,6 +37,7 @@ int commit_patch_id(struct commit *commit, struct
>> diff_options *opt
On Fri, Jun 30, 2017 at 10:54 AM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> +static int next_byte(const char **cp, const char **endp,
>> + const struct diff_options *diffopt)
>> +{
>> + int retval;
>> +
>> + if (DIFF_XDL_TST(diffopt, IGNORE_WHITESPACE_AT_EOL)) {
Lars Schneider writes:
>> On 29 Jun 2017, at 20:34, Junio C Hamano wrote:
>>
>> You seem to have squashed an unrelated "table-driven" clean-up into
>> this step. While I think the end result looks good, I would have
>> liked to see it as a separate step, either as a preparatory "now we
>> are
On 6/29/2017 2:48 PM, Jonathan Tan wrote:
As some of you may know, I'm currently working on support for partial
clones/fetches in Git (where blobs above a user-specified size threshold
are not downloaded - only their names and sizes are downloaded). To do
this, the client repository needs to be
Thank you for your feedback.
I suppose that turning a hypothetical confirmation option 'on' would
impact a stash pop for instance as it automatically drops the stash if
it was applied without conflicts.
What about a --confirm flag? You could then simply alias 'git stash
drop --confirm' locally a
--
Cher: Grenoble Institute of Technology Webmail,
Nous vous annonons que votre compte de messagerie a dépassé son stockage
limite. Vous ne pourrez pas envoyer et recevoir des mails et votre
compte de messagerie
Seront supprimés de notre serveur. Pour éviter ce problème, il est
conseillé de
Stefan Beller writes:
> I am at a loss here after re-reading your answer over and over,
> but I think you are asking if patch_id_cmp can break, as
> we have a callchain like
>
> patch_id_cmp
> commit_patch_id
> (diff_root_tree_oid)
> diff_tree_oid
> ll_diff_tree_oid
Stefan Beller writes:
> On Fri, Jun 30, 2017 at 10:54 AM, Junio C Hamano wrote:
>> Stefan Beller writes:
>>
>>> +static int next_byte(const char **cp, const char **endp,
>>> + const struct diff_options *diffopt)
>>> +{
>>> + int retval;
>>> +
>>> + if (DIFF_XDL_TST(diff
Stefan Beller writes:
> Ok, let me redo the patch to have fndata at the front.
>
> Looking at other places (that have a similar mechanism mechanically,
> but are semantically different), such as the callback functions for
> the diff machinery, we have the user provided pointer at the end
> of the
On Fri, Jun 30, 2017 at 11:47 AM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> Ok, let me redo the patch to have fndata at the front.
>>
>> Looking at other places (that have a similar mechanism mechanically,
>> but are semantically different), such as the callback functions for
>> the diff
When using the hashmap a common need is to have access to caller provided
data in the compare function. A couple of times we abuse the keydata field
to pass in the data needed. This happens for example in patch-ids.c.
This patch changes the function signature of the compare function
to have one mo
v3:
* fixed first patch to call the data 'caller provided' instead of arbitrary.
* moved the position of the caller provided data to first position
* split up the rather mechanical change of function signature with
fixing the API usage of patch-ids.c
v2:
addressed all but the last point of Jon
As eluded to in the previous patch, the code in patch-ids.c is using
the hashmaps API wrong.
Luckily we do not have a bug, as all hashmap functionality that we use
here (hashmap_get) passes through the keydata. If hashmap_get_next were
to be used, a bug would occur as that passes NULL for the key
While at it, clarify the use of `key`, `keydata`, `entry_or_key` as well
as documenting the new data pointer for the compare function.
Rework the example.
Signed-off-by: Stefan Beller
---
Documentation/technical/api-hashmap.txt | 309
hashmap.h
Laurent Humblet writes:
> Thank you for your feedback.
>
> I suppose that turning a hypothetical confirmation option 'on' would
> impact a stash pop for instance as it automatically drops the stash if
> it was applied without conflicts.
>
> What about a --confirm flag? You could then simply alia
This aims to make git-submodule 'status' a built-in. Hence, the function
cmd_status() is ported from shell to C. This is done by introducing
three functions: module_status(), submodule_status() and print_status().
The function module_status() acts as the front-end of the subcommand.
It parses subc
Introduce function for_each_submodule_list() and
replace a loop in module_init() with a call to it.
The new function will also be used in other parts of the
system in later patches.
Mentored-by: Christian Couder
Mentored-by: Stefan Beller
Signed-off-by: Prathamesh Chavan
---
builtin/submodule
Port the submodule subcommand 'sync' from shell to C using the same
mechanism as that used for porting submodule subcommand 'status'.
Hence, here the function cmd_sync() is ported from shell to C.
This is done by introducing three functions: module_sync(),
sync_submodule() and print_default_remote(
Function set_name_rev() is ported from git-submodule to the
submodule--helper builtin. The function get_name_rev() generates the
value of the revision name as required, and the function
print_name_rev() handles the formating and printing of the obtained
revision name.
Mentored-by: Christian Couder
Stefan Beller writes:
> As eluded to in the previous patch, the code in patch-ids.c is using
> the hashmaps API wrong.
>
> Luckily we do not have a bug, as all hashmap functionality that we use
> here (hashmap_get) passes through the keydata. If hashmap_get_next were
> to be used, a bug would oc
Introduce function get_submodule_displaypath() to replace the code
occurring in submodule_init() for generating displaypath of the
submodule with a call to it.
This new function will also be used in other parts of the system
in later patches.
Mentored-by: Christian Couder
Mentored-by: Stefan Bel
On Fri, Jun 30, 2017 at 12:47 PM, Prathamesh Chavan wrote:
> Port the submodule subcommand 'sync' from shell to C using the same
> mechanism as that used for porting submodule subcommand 'status'.
> Hence, here the function cmd_sync() is ported from shell to C.
> This is done by introducing three
On Fri, Jun 30, 2017 at 09:04:50AM -0700, Stefan Beller wrote:
> [snip]
>
> However
>
> context
> + moved line, block A or B
> + moved line, block A or B
> context
>
> is omitted, because the number of lines
> here is fewer than 3 ignoring the block
> type.
>
> Maybe
>
> If there are
On Fri, Jun 30, 2017 at 1:31 PM, Simon Ruderich wrote:
> On Fri, Jun 30, 2017 at 09:04:50AM -0700, Stefan Beller wrote:
>> [snip]
>>
>> However
>>
>> context
>> + moved line, block A or B
>> + moved line, block A or B
>> context
>>
>> is omitted, because the number of lines
>> here is
Hi,
here is the 9th iteration of my "status delayed" topic. I think that
might be the final one :-)
Patch 1 to 3 are minor t0021 test adjustments. Patch 4 to 6 are convert
refactorings to prepare the new feature. Patch 7 is the new feature.
### Changes since v7:
* extracted capabilities negotiat
Refactoring the filter error handling is useful for the subsequent patch
'convert: add "status=delayed" to filter process protocol'.
In addition, replace the parentheses around the empty "if" block with a
single semicolon to adhere to the Git style guide.
Signed-off-by: Lars Schneider
---
conve
Suggested-by: Jeff King
Signed-off-by: Lars Schneider
---
convert.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/convert.c b/convert.c
index f1e168bc30..9907e3b9ba 100644
--- a/convert.c
+++ b/convert.c
@@ -597,12 +597,12 @@ static int apply_multi_file_filter(co
"rot13-filter.pl" always writes "OUT " to the debug log at the end
of a response.
This works perfectly for the existing responses "abort", "error", and
"success". A new response "delayed", that will be introduced in a
subsequent patch, accepts the input without giving the filtered result
right awa
The filter log files are modified on comparison. That might be
unexpected by the caller. It would be even undesirable if the caller
wants to reuse the original log files.
Address these issues by using temp files for modifications. This is
useful for the subsequent patch 'convert: add "status=delay
Some `clean` / `smudge` filters may require a significant amount of
time to process a single blob (e.g. the Git LFS smudge filter might
perform network requests). During this process the Git checkout
operation is blocked and Git needs to wait until the filter is done to
continue with the checkout.
The code to negotiate long running filter capabilities was very
repetitive for new capabilities. Replace the repetitive conditional
statements with a table-driven approach. This is useful for the
subsequent patch 'convert: add "status=delayed" to filter process
protocol'.
Suggested-by: Junio C Ham
The "rot13-filter.pl" helper wrote its debug logs always to "rot13-filter.log".
Make this configurable by defining the log file as first parameter of
"rot13-filter.pl".
This is useful if "rot13-filter.pl" is configured multiple times similar to the
subsequent patch 'convert: add "status=delayed" t
> On 30 Jun 2017, at 20:19, Junio C Hamano wrote:
>
> Lars Schneider writes:
>
>>> On 29 Jun 2017, at 20:34, Junio C Hamano wrote:
>>>
>>> You seem to have squashed an unrelated "table-driven" clean-up into
>>> this step. While I think the end result looks good, I would have
>>> liked to se
v2:
* on top of the new hashmap patches[3]. It compiles when put on older versions
of the hashmap series, as the hashmap compare function just swapped void
pointers
in the definition.
* better documentation, Thanks Simon!
... If there
are fewer than 3 adjacent moved lines, they are
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
diff.c | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/diff.c b/diff.c
index 6e48a129ed..488096b757 100644
--- a/diff.c
+++ b/diff.c
@@ -561,6 +561,7 @@ static void emit_line(struct diff_optio
We already have dereferenced 'p->two' into a local variable 'two'.
Use that.
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
diff.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/diff.c b/diff.c
index 00b4c86698..2874dfc6fc 100644
--- a/diff.c
+++ b/diff.
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
diff.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/diff.c b/diff.c
index 4637368d59..75b996c4cf 100644
--- a/diff.c
+++ b/diff.c
@@ -561,13 +561,20 @@ static void emit_line(struct diff_options *o, co
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
diff.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/diff.c b/diff.c
index 75b996c4cf..6e48a129ed 100644
--- a/diff.c
+++ b/diff.c
@@ -561,6 +561,7 @@ static void emit_line(struct diff_options *o, const
The emit_hunk_header() function is responsible for assembling a
hunk header and calling emit_line() to send the hunk header
to the output file. Its only caller fn_out_consume() needs
to prepare for a case where the function emits an incomplete
line and add the terminating LF.
Instead make sure em
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
diff.c | 71 ++
1 file changed, 41 insertions(+), 30 deletions(-)
diff --git a/diff.c b/diff.c
index 5a9c55736d..2db0d7c0f5 100644
--- a/diff.c
+++ b/diff.c
@@ -572,6 +
We call print_stat_summary from builtin/apply, so we still
need the version with a file pointer, so introduce
print_stat_summary_0 that uses emit_string machinery and
keep print_stat_summary with the same arguments around.
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
diff.c |
The word diffing is not line oriented and would need some serious
effort to be transformed into a line oriented approach, so
just go with a symbol DIFF_SYMBOL_WORD_DIFF that is a partial line.
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
diff.c | 79 +++
we could save a little bit of memory when buffering in a later mode
by just passing the inner part ("%s and %s", file1, file 2), but
those a just a few bytes, so instead let's reuse the implementation from
DIFF_SYMBOL_HEADER and keep the whole line around.
Signed-off-by: Stefan Beller
Signed-off-
As the submodule process is no longer attached to the same file pointer
'o->file' as the superprojects process, there is a different result in
color.c::check_auto_color. That is why we need to pass coloring explicitly,
such that the submodule coloring decision will be made by the child process
proc
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
diff.c | 35 +--
1 file changed, 21 insertions(+), 14 deletions(-)
diff --git a/diff.c b/diff.c
index 1d0f8b509f..5c428e02b6 100644
--- a/diff.c
+++ b/diff.c
@@ -561,6 +561,7 @@ static void emit_line(
The header is constructed lazily including line breaks, so just emit
the raw string as is.
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
diff.c | 28
1 file changed, 20 insertions(+), 8 deletions(-)
diff --git a/diff.c b/diff.c
index 49b45fef29..78
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
diff.c | 42 ++
1 file changed, 26 insertions(+), 16 deletions(-)
diff --git a/diff.c b/diff.c
index e5430d56da..85bfd9310d 100644
--- a/diff.c
+++ b/diff.c
@@ -561,6 +561,8 @@ static void emi
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
diff.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/diff.c b/diff.c
index e0d39d04da..5a9c55736d 100644
--- a/diff.c
+++ b/diff.c
@@ -571,6 +571,7 @@ enum diff_symbol {
DIFF_SYMBOL_STATS_SUMM
Any lines inside a moved block of code are not interesting. Boundaries
of blocks are only interesting if they are next to another block of moved
code.
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
color.h| 2 +
diff.c | 132
Signed-off-by: Stefan Beller
---
Documentation/config.txt | 15 +--
Documentation/diff-options.txt | 36
2 files changed, 49 insertions(+), 2 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 06898a7498..743
Introduce a new option 'emitted_symbols' in the struct diff_options which
controls whether all output is buffered up until all output is available.
It is set internally in diff.c when necessary.
We'll have a new struct 'emitted_string' in diff.c which will be used to
buffer each line. The emitted
When a patch consists mostly of moving blocks of code around, it can
be quite tedious to ensure that the blocks are moved verbatim, and not
undesirably modified in the move. To that end, color blocks that are
moved within the same patch differently. For example (OM, del, add,
and NM are different c
Add the 'plain' mode for move detection of code. This omits the checking
for adjacent blocks, so it is not as useful. If you have a lot of the
same blocks moved in the same patch, the 'Zebra' would end up slow as it
is O(n^2) (n is number of same blocks). So this may be useful there and
is generall
We have to use fprintf instead of emit_line, because we want to emit the
tab after the color. This is important for ancient versions of gnu patch
AFAICT, although we probably do not want to feed colored output to the
patch utility, such that it would not matter if the trailing tab is
colored. Keep
The context marker use the exact same output pattern, so reuse it.
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
diff.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/diff.c b/diff.c
index 85bfd9310d..b2b2a19fcf 100644
--- a/diff.c
+++ b/diff.c
@@ -56
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
diff.c | 63 ++-
1 file changed, 46 insertions(+), 17 deletions(-)
diff --git a/diff.c b/diff.c
index 48f719fb07..f5a14359ae 100644
--- a/diff.c
+++ b/diff.c
@@ -561,6 +561
In a later patch we want to do more things before and after all filepairs
are flushed. So factor flushing out all file pairs into its own function
that the new code can be plugged in easily.
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
diff.c | 17 -
1 file cha
Add a new flags field to emit_diff_symbol, that will be used by
context lines for:
* white space rules that are applicable (The first 12 bits)
Take a note in cahe.c as well, when this ws rules are extended we have
to fix the bits in the flags field.
* how the rules are evaluated (actually this
In a later patch we want to buffer all output before emitting it as a
new feature ("markup moved lines") conceptually cannot be implemented
in a single pass over the output.
There are different approaches to buffer all output such as:
* Buffering on the char level, i.e. we'd have a char[] which wo
Stefan Beller writes:
> +static int next_byte(const char **cp, const char **endp,
> + const struct diff_options *diffopt)
> +{
> + int retval;
> +
> + if (*cp > *endp)
> + return -1;
> +
> + if (DIFF_XDL_TST(diffopt, IGNORE_WHITESPACE_CHANGE)) {
> +
On Fri, Jun 30, 2017 at 2:11 PM, Junio C Hamano wrote:
>> + return (int)' ';
>
> Do we need a cast here?
No, I figured it is good to have it here explicitly, though.
We can drop that if you have strong preferences one way or another.
>
>> +static unsigned get_string_hash(struct emitt
Will queue. I personally feel that this is polished enough for 'next'.
Thanks.
1 - 100 of 122 matches
Mail list logo