summaryrefslogtreecommitdiff
path: root/combine-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-01-30 16:34:29 -0800
committerJunio C Hamano <junkio@cox.net>2006-02-02 17:53:25 -0800
commitb469d8b6f7a8dd90527c43f345a1b5cf2e72f666 (patch)
treef53799d53b3c74b62980edd07b3f19d0c5c99e7d /combine-diff.c
parent30d08b34aa268e3bd4c93fa712e2eac66f1a15b3 (diff)
downloadgit-b469d8b6f7a8dd90527c43f345a1b5cf2e72f666.tar.gz
combine-diff: add a bit more comments.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'combine-diff.c')
-rw-r--r--combine-diff.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/combine-diff.c b/combine-diff.c
index 36363bddac..a698475e8d 100644
--- 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;
}
+/* Lines lost from parent */
struct lline {
struct lline *next;
int len;
@@ -75,10 +76,15 @@ struct lline {
char line[FLEX_ARRAY];
};
+/* Lines surviving in the merge result */
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;
};
@@ -242,7 +248,7 @@ static void combine_diff(const unsigned char *parent, const char *ourtmp,
continue;
}
if (!lost_bucket)
- continue;
+ continue; /* not in any hunk yet */
switch (line[0]) {
case '-':
append_lost(lost_bucket, n, line+1);