Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
diff: fix output of total-rewrite diff.
author
Junio C Hamano
<junkio@cox.net>
Sun, 9 Apr 2006 02:45:39 +0000
(19:45 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Sun, 9 Apr 2006 03:32:40 +0000
(20:32 -0700)
We did not read in the file data before emitting the
total-rewrite diff. Noticed by Pasky.
Signed-off-by: Junio C Hamano <junkio@cox.net>
diff.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
f085383
)
diff --git
a/diff.c
b/diff.c
index ce98a90805f881fa9ef161448af22e859db0d93d..30e4d50b951257829d2727c6076f7baa6488a473 100644
(file)
--- a/
diff.c
+++ b/
diff.c
@@
-142,11
+142,12
@@
static void copy_file(int prefix, const char *data, int size)
static void emit_rewrite_diff(const char *name_a,
const char *name_b,
static void emit_rewrite_diff(const char *name_a,
const char *name_b,
- struct diff_filespec *one,
+ struct diff_filespec *one,
struct diff_filespec *two)
{
struct diff_filespec *two)
{
- /* Use temp[i].name as input, name_a and name_b as labels */
int lc_a, lc_b;
int lc_a, lc_b;
+ diff_populate_filespec(one, 0);
+ diff_populate_filespec(two, 0);
lc_a = count_lines(one->data, one->size);
lc_b = count_lines(two->data, two->size);
printf("--- %s\n+++ %s\n@@ -", name_a, name_b);
lc_a = count_lines(one->data, one->size);
lc_b = count_lines(two->data, two->size);
printf("--- %s\n+++ %s\n@@ -", name_a, name_b);