git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Luis R. Rodriguez" <mcgrof-3uybbJdB1yH774rrrx3eTA@public.gmane.org>
To: Johannes Schindelin <johannes.schindelin-Mmb7MZpHnFY@public.gmane.org>
Cc: git-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Julia Lawall <julia.lawall-L2FTfq7BK8M@public.gmane.org>,
	"Luis R. Rodriguez" <mcgrof-IBi9RG/b67k@public.gmane.org>,
	"cocci-/FJkirnvOdkvYVN+rsErww@public.gmane.org"
	<cocci-/FJkirnvOdkvYVN+rsErww@public.gmane.org>,
	"backports-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<backports-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: GNU diff and git diff - difference on myers algorithm?
Date: Thu, 16 Jul 2015 12:07:50 -0700	[thread overview]
Message-ID: <CAB=NE6UFMv0qu8fJ1P2-pJCF0tSGKoW+uKhfwt0jV5fj2wZGSQ@mail.gmail.com> (raw)
In-Reply-To: <CAB=NE6VGX332=CvhQM4sc27AM8ae5S1kdRnm5sMfoqkU=b=ebg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Fri, Jun 12, 2015 at 11:52 AM, Luis R. Rodriguez
<mcgrof-3uybbJdB1yH774rrrx3eTA@public.gmane.org> 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

  parent reply	other threads:[~2015-07-16 19:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-08 18:34 GNU diff and git diff - difference on myers algorithm? Luis R. Rodriguez
2015-06-09  8:25 ` Johannes Schindelin
2015-06-12 18:52   ` Luis R. Rodriguez
     [not found]     ` <CAB=NE6VGX332=CvhQM4sc27AM8ae5S1kdRnm5sMfoqkU=b=ebg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-16 19:07       ` Luis R. Rodriguez [this message]
     [not found]         ` <CAB=NE6UFMv0qu8fJ1P2-pJCF0tSGKoW+uKhfwt0jV5fj2wZGSQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-17  4:22           ` Jacob Keller
     [not found]             ` <CA+P7+xrOPS6NeQhte-ATdm2Nqo0PpmUAxS+XYzWDvZGtwPtWMw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-17  4:23               ` Jacob Keller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAB=NE6UFMv0qu8fJ1P2-pJCF0tSGKoW+uKhfwt0jV5fj2wZGSQ@mail.gmail.com' \
    --to=mcgrof-3uybbjdb1yh774rrrx3eta@public.gmane.org \
    --cc=backports-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=cocci-/FJkirnvOdkvYVN+rsErww@public.gmane.org \
    --cc=git-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=johannes.schindelin-Mmb7MZpHnFY@public.gmane.org \
    --cc=julia.lawall-L2FTfq7BK8M@public.gmane.org \
    --cc=mcgrof-IBi9RG/b67k@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).