Browse Source

Merge branch 'fix'

* fix:
  diff_flush(): leakfix.
  parse_date(): fix parsing 03/10/2006
maint
Junio C Hamano 19 years ago
parent
commit
12d81ce598
  1. 4
      date.c
  2. 16
      diff.c

4
date.c

@ -255,10 +255,10 @@ static int match_multi_number(unsigned long num, char c, const char *date, char
break; break;
} }
/* mm/dd/yy ? */ /* mm/dd/yy ? */
if (is_date(num3, num2, num, tm)) if (is_date(num3, num, num2, tm))
break; break;
/* dd/mm/yy ? */ /* dd/mm/yy ? */
if (is_date(num3, num, num2, tm)) if (is_date(num3, num2, num, tm))
break; break;
return 0; return 0;
} }

16
diff.c

@ -1280,11 +1280,14 @@ void diff_flush(struct diff_options *options)


for (i = 0; i < q->nr; i++) { for (i = 0; i < q->nr; i++) {
struct diff_filepair *p = q->queue[i]; struct diff_filepair *p = q->queue[i];
if ((diff_output_format == DIFF_FORMAT_NO_OUTPUT) ||
(p->status == DIFF_STATUS_UNKNOWN)) switch (p->status) {
continue; case DIFF_STATUS_UNKNOWN:
if (p->status == 0) break;
case 0:
die("internal error in diff-resolve-rename-copy"); die("internal error in diff-resolve-rename-copy");
break;
default:
switch (diff_output_format) { switch (diff_output_format) {
case DIFF_FORMAT_PATCH: case DIFF_FORMAT_PATCH:
diff_flush_patch(p, options); diff_flush_patch(p, options);
@ -1300,8 +1303,11 @@ void diff_flush(struct diff_options *options)
inter_name_termination, inter_name_termination,
line_termination); line_termination);
break; break;
case DIFF_FORMAT_NO_OUTPUT:
break;
} }
diff_free_filepair(q->queue[i]); }
diff_free_filepair(p);
} }
free(q->queue); free(q->queue);
q->queue = NULL; q->queue = NULL;

Loading…
Cancel
Save