Re: [PATCH 0/3] Teach Git about the patience diff algorithm

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Clemens Buchacher
Date: Friday, January 2, 2009 - 3:58 am

Only two choices, and I still get it wrong. The diffs should be labeled the
other way around, of course.

*** git diff --patience ******************** git diff ********************
 #include <stdio.h>                   | #include <stdio.h>
                                      |
+int fib(int n)                       |-// Frobs foo heartily
+{                                    |-int frobnitz(int foo)
+    if(n > 2)                        |+int fib(int n)
+    {                                | {
+        return fib(n-1) + fib(n-2);  |-    int i;
+    }                                |-    for(i = 0; i < 10; i++)
+    return 1;                        |+    if(n > 2)
+}                                    |     {
+                                     |-        printf("Your answer is: ");
 // Frobs foo heartily                |-        printf("%d\n", foo);
 int frobnitz(int foo)                |+        return fib(n-1) + fib(n-2);
 {                                    |     }
     int i;                           |+    return 1;
     for(i = 0; i < 10; i++)          | }
     {                                |
-        printf("Your answer is: ");  |-int fact(int n)
         printf("%d\n", foo);         |+// Frobs foo heartily
     }                                |+int frobnitz(int foo)
 }                                    | {
                                      |-    if(n > 1)
-int fact(int n)                      |+    int i;
-{                                    |+    for(i = 0; i < 10; i++)
-    if(n > 1)                        |     {
-    {                                |-        return fact(n-1) * n;
-        return fact(n-1) * n;        |+        printf("%d\n", foo);
-    }                                |     }
-    return 1;                        |-    return 1;
-}                                    | }
-                                     |
 int main(int argc, char **argv)      | int main(int argc, char **argv)
 {                                    | {
-    frobnitz(fact(10));              |-    frobnitz(fact(10));
+    frobnitz(fib(10));               |+    frobnitz(fib(10));
 }                                    | }
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
libxdiff and patience diff, Pierre Habouzit, (Mon Nov 3, 5:40 pm)
Re: libxdiff and patience diff, Davide Libenzi, (Mon Nov 3, 8:17 pm)
Re: libxdiff and patience diff, Johannes Schindelin, (Mon Nov 3, 10:39 pm)
Re: libxdiff and patience diff, Pierre Habouzit, (Tue Nov 4, 1:30 am)
Re: libxdiff and patience diff, Pierre Habouzit, (Tue Nov 4, 1:33 am)
Re: libxdiff and patience diff, Johannes Schindelin, (Tue Nov 4, 7:34 am)
Re: libxdiff and patience diff, Pierre Habouzit, (Tue Nov 4, 8:23 am)
Re: libxdiff and patience diff, Johannes Schindelin, (Tue Nov 4, 8:57 am)
Re: libxdiff and patience diff, Pierre Habouzit, (Tue Nov 4, 9:15 am)
[PATCH 0/3] Teach Git about the patience diff algorithm, Johannes Schindelin, (Thu Jan 1, 9:38 am)
[PATCH 1/3] Implement the patience diff algorithm, Johannes Schindelin, (Thu Jan 1, 9:38 am)
[PATCH 2/3] Introduce the diff option '--patience', Johannes Schindelin, (Thu Jan 1, 9:39 am)
[PATCH 3/3] bash completions: Add the --patience option, Johannes Schindelin, (Thu Jan 1, 9:39 am)
Re: [PATCH 0/3] Teach Git about the patience diff algorithm, Clemens Buchacher, (Fri Jan 2, 3:55 am)
Re: [PATCH 0/3] Teach Git about the patience diff algorithm, Clemens Buchacher, (Fri Jan 2, 3:58 am)
Re: [PATCH 0/3] Teach Git about the patience diff algorithm, Johannes Schindelin, (Fri Jan 2, 11:17 am)
Re: [PATCH 0/3] Teach Git about the patience diff algorithm, Johannes Schindelin, (Fri Jan 2, 11:46 am)
Re: [PATCH 0/3] Teach Git about the patience diff algorithm, Johannes Schindelin, (Fri Jan 2, 12:07 pm)
Re: [PATCH 0/3] Teach Git about the patience diff algorithm, Johannes Schindelin, (Fri Jan 2, 12:22 pm)
Re: [PATCH 0/3] Teach Git about the patience diff algorithm, Johannes Schindelin, (Fri Jan 2, 2:59 pm)
[PATCH 1/3 v2] Implement the patience diff algorithm, Johannes Schindelin, (Fri Jan 2, 2:59 pm)
Re: [PATCH 1/3 v2] Implement the patience diff algorithm, Johannes Schindelin, (Fri Jan 2, 2:59 pm)
Bazaar's patience diff as GIT_EXTERNAL_DIFF, Adeodato , (Sat Jan 3, 9:24 am)
Re: [PATCH 0/3] Teach Git about the patience diff algorithm, Johannes Schindelin, (Tue Jan 6, 12:40 pm)
Re: [PATCH 0/3] Teach Git about the patience diff algorithm, Johannes Schindelin, (Wed Jan 7, 10:01 am)
[PATCH v3 1/3] Implement the patience diff algorithm, Johannes Schindelin, (Wed Jan 7, 10:04 am)
Re: [PATCH v3 1/3] Implement the patience diff algorithm, Davide Libenzi, (Wed Jan 7, 11:10 am)
Re: [PATCH v3 1/3] Implement the patience diff algorithm, Johannes Schindelin, (Wed Jan 7, 11:32 am)
Re: [PATCH v3 1/3] Implement the patience diff algorithm, Linus Torvalds, (Wed Jan 7, 11:59 am)
Re: [PATCH v3 1/3] Implement the patience diff algorithm, Johannes Schindelin, (Wed Jan 7, 1:00 pm)
Re: [PATCH v3 1/3] Implement the patience diff algorithm, Davide Libenzi, (Wed Jan 7, 1:09 pm)
Re: [PATCH v3 1/3] Implement the patience diff algorithm, Davide Libenzi, (Wed Jan 7, 1:11 pm)
Re: [PATCH v3 1/3] Implement the patience diff algorithm, Johannes Schindelin, (Wed Jan 7, 1:19 pm)
Re: [PATCH 0/3] Teach Git about the patience diff algorithm, Johannes Schindelin, (Wed Jan 7, 1:38 pm)
Re: [PATCH 0/3] Teach Git about the patience diff algorithm, Johannes Schindelin, (Wed Jan 7, 3:00 pm)
Re: [PATCH 0/3] Teach Git about the patience diff algorithm, Johannes Schindelin, (Wed Jan 7, 4:03 pm)