git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [OT] perhaps we want to support copied-context diff output

From
Mike Hommey <mh@glandium.org>
Date
Dec 8, 2007, 08:53 UTC
Message-ID
<20071208085302.GA13432@glandium.org>
In-Reply-To
<7vmyslwqdr.fsf@gitster.siamese.dyndns.org>
> Perhaps we may want to add "diff -c" (copied context) output format as
> an option, which may be easier to read.
Or maybe use the patience diff.
On a testcase I had a few months ago, patience diff would give:
@@ -42,11 +42,10 @@

 include $(DEPTH)/config/autoconf.mk

+EXTRA_COMPONENTS = nsKillAll.js
+
 include $(topsrcdir)/config/rules.mk

-libs::
-       $(INSTALL) $(srcdir)/nsKillAll.js $(DIST)/bin/components
-
 clean::
        rm -f $(DIST)/bin/components/nsKillAll.js

Where "normal" diff would give:
@@ -42,10 +42,9 @@

 include $(DEPTH)/config/autoconf.mk

-include $(topsrcdir)/config/rules.mk
+EXTRA_COMPONENTS = nsKillAll.js

-libs::
-       $(INSTALL) $(srcdir)/nsKillAll.js $(DIST)/bin/components
+include $(topsrcdir)/config/rules.mk

 clean::
        rm -f $(DIST)/bin/components/nsKillAll.js

git outputs the same as the normal diff, bzr and svn seem to use the
patience diff. Mercurial outputs almost the same as bzr and svn:
@@ -42,10 +42,9 @@

 include $(DEPTH)/config/autoconf.mk

+EXTRA_COMPONENTS = nsKillAll.js
+
 include $(topsrcdir)/config/rules.mk
-
-libs::
-       $(INSTALL) $(srcdir)/nsKillAll.js $(DIST)/bin/components

 clean::
        rm -f $(DIST)/bin/components/nsKillAll.js

Mike
Previous: Junio C HamanoNext: Peter Baumann
Message 3 of 4 in “pack-objects: reverse the delta search sort list”
  1. 1/2 pack-objects: reverse the delta search sort listNicolas Pitre, Dec 8, 2007
  2. [OT] perhaps we want to support copied-context diff outputJunio C Hamano, Dec 8, 2007
  3. Mike HommeyDec 8, 2007
  4. Peter BaumannDec 8, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.