Merge branch 'jc/diff-sane-truncate-no-more'
Code clean-up. * jc/diff-sane-truncate-no-more: diff: retire sane_truncate_fn
This commit is contained in:
5
diff.c
5
diff.c
@ -406,8 +406,6 @@ static struct diff_tempfile {
|
|||||||
struct tempfile tempfile;
|
struct tempfile tempfile;
|
||||||
} diff_temp[2];
|
} diff_temp[2];
|
||||||
|
|
||||||
typedef unsigned long (*sane_truncate_fn)(char *line, unsigned long len);
|
|
||||||
|
|
||||||
struct emit_callback {
|
struct emit_callback {
|
||||||
int color_diff;
|
int color_diff;
|
||||||
unsigned ws_rule;
|
unsigned ws_rule;
|
||||||
@ -415,7 +413,6 @@ struct emit_callback {
|
|||||||
int blank_at_eof_in_postimage;
|
int blank_at_eof_in_postimage;
|
||||||
int lno_in_preimage;
|
int lno_in_preimage;
|
||||||
int lno_in_postimage;
|
int lno_in_postimage;
|
||||||
sane_truncate_fn truncate;
|
|
||||||
const char **label_path;
|
const char **label_path;
|
||||||
struct diff_words_data *diff_words;
|
struct diff_words_data *diff_words;
|
||||||
struct diff_options *opt;
|
struct diff_options *opt;
|
||||||
@ -1243,8 +1240,6 @@ static unsigned long sane_truncate_line(struct emit_callback *ecb, char *line, u
|
|||||||
unsigned long allot;
|
unsigned long allot;
|
||||||
size_t l = len;
|
size_t l = len;
|
||||||
|
|
||||||
if (ecb->truncate)
|
|
||||||
return ecb->truncate(line, len);
|
|
||||||
cp = line;
|
cp = line;
|
||||||
allot = l;
|
allot = l;
|
||||||
while (0 < l) {
|
while (0 < l) {
|
||||||
|
Reference in New Issue
Block a user