[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-backports
Subject:    Re: GNU diff and git diff - difference on myers algorithm?
From:       "Luis R. Rodriguez" <mcgrof () do-not-panic ! com>
Date:       2015-07-16 19:07:50
Message-ID: CAB=NE6UFMv0qu8fJ1P2-pJCF0tSGKoW+uKhfwt0jV5fj2wZGSQ () mail ! gmail ! com
[Download RAW message or body]

On Fri, Jun 12, 2015 at 11:52 AM, Luis R. Rodriguez
<mcgrof@do-not-panic.com> wrote:
> OK wells I'm curious about more research / effort when trying to
> evaluate a diff with two seprate but adjoining preprocessor directives
> and if anyone has implemented an optimizaiton option to let the diff
> generator join them.
>
> For example, to let it infer that:
>
> --- a/test.c
> +++ b/test.c
> @@ -10,8 +10,6 @@ int main(int argc, char *argv[])
>
>  #ifdef FOO
>         a = 4;
> -#endif /* FOO */
> -#ifdef FOO
>         a = 5;
>  #endif /* FOO */
>
> is possible.

Anyone familiar if any tool exists today that would optimize this? Is
anyone working on it? Would git be a good place for such a thing? I'd
consider it as an option to optimize a diff. This for example is
extremely useful for us working with Coccinelle where we have a tool
writing code for us, while such an optimization might be useful to
Coccinelle it would seem like a rather generic feature, its just not
clear to me where to give such a tool a proper home.

 Luis
--
To unsubscribe from this list: send the line "unsubscribe backports" in
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic