Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
combine-diff: add a bit more comments.
author
Junio C Hamano
<junkio@cox.net>
Tue, 31 Jan 2006 00:34:29 +0000
(16:34 -0800)
committer
Junio C Hamano
<junkio@cox.net>
Fri, 3 Feb 2006 01:53:25 +0000
(17:53 -0800)
Signed-off-by: Junio C Hamano <junkio@cox.net>
combine-diff.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
30d08b3
)
diff --git
a/combine-diff.c
b/combine-diff.c
index 36363bddac0e23bf23a923d8bab5c6ea261c894e..a698475e8d1676c93714a912f7dcff3d12adac41 100644
(file)
--- a/
combine-diff.c
+++ b/
combine-diff.c
@@
-68,6
+68,7
@@
static struct combine_diff_path *intersect_paths(struct combine_diff_path *curr,
return curr;
}
return curr;
}
+/* Lines lost from parent */
struct lline {
struct lline *next;
int len;
struct lline {
struct lline *next;
int len;
@@
-75,10
+76,15
@@
struct lline {
char line[FLEX_ARRAY];
};
char line[FLEX_ARRAY];
};
+/* Lines surviving in the merge result */
struct sline {
struct lline *lost_head, **lost_tail;
char *bol;
int len;
struct sline {
struct lline *lost_head, **lost_tail;
char *bol;
int len;
+ /* bit 0 up to (N-1) are on if the parent does _not_
+ * have this line (i.e. we changed it).
+ * bit N is used for "interesting" lines, including context.
+ */
unsigned long flag;
};
unsigned long flag;
};
@@
-242,7
+248,7
@@
static void combine_diff(const unsigned char *parent, const char *ourtmp,
continue;
}
if (!lost_bucket)
continue;
}
if (!lost_bucket)
- continue;
+ continue;
/* not in any hunk yet */
switch (line[0]) {
case '-':
append_lost(lost_bucket, n, line+1);
switch (line[0]) {
case '-':
append_lost(lost_bucket, n, line+1);