summaryrefslogtreecommitdiff
path: root/combine-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-03-06 22:54:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-06 22:54:07 (GMT)
commit169c9c0169a00876f699678ac66ebe9563b0c29f (patch)
tree5344fd15a9134aa92eaf79ff5959f616cceffa17 /combine-diff.c
parentc14d5f99cd91347db3978c58c4b24d60ca29af75 (diff)
parentefdfe11f4f1f901db1ebfa7ebda6337293a2e5c5 (diff)
downloadgit-169c9c0169a00876f699678ac66ebe9563b0c29f.zip
git-169c9c0169a00876f699678ac66ebe9563b0c29f.tar.gz
git-169c9c0169a00876f699678ac66ebe9563b0c29f.tar.bz2
Merge branch 'bw/c-plus-plus'
Avoid using identifiers that clash with C++ keywords. Even though it is not a goal to compile Git with C++ compilers, changes like this help use of code analysis tools that targets C++ on our codebase. * bw/c-plus-plus: (37 commits) replace: rename 'new' variables trailer: rename 'template' variables tempfile: rename 'template' variables wrapper: rename 'template' variables environment: rename 'namespace' variables diff: rename 'template' variables environment: rename 'template' variables init-db: rename 'template' variables unpack-trees: rename 'new' variables trailer: rename 'new' variables submodule: rename 'new' variables split-index: rename 'new' variables remote: rename 'new' variables ref-filter: rename 'new' variables read-cache: rename 'new' variables line-log: rename 'new' variables imap-send: rename 'new' variables http: rename 'new' variables entry: rename 'new' variables diffcore-delta: rename 'new' variables ...
Diffstat (limited to 'combine-diff.c')
-rw-r--r--combine-diff.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/combine-diff.c b/combine-diff.c
index 18c74da..1ec9af1 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -162,7 +162,7 @@ enum coalesce_direction { MATCH, BASE, NEW };
/* Coalesce new lines into base by finding LCS */
static struct lline *coalesce_lines(struct lline *base, int *lenbase,
- struct lline *new, int lennew,
+ struct lline *newline, int lennew,
unsigned long parent, long flags)
{
int **lcs;
@@ -170,12 +170,12 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase,
struct lline *baseend, *newend = NULL;
int i, j, origbaselen = *lenbase;
- if (new == NULL)
+ if (newline == NULL)
return base;
if (base == NULL) {
*lenbase = lennew;
- return new;
+ return newline;
}
/*
@@ -200,7 +200,7 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase,
directions[0][j] = NEW;
for (i = 1, baseend = base; i < origbaselen + 1; i++) {
- for (j = 1, newend = new; j < lennew + 1; j++) {
+ for (j = 1, newend = newline; j < lennew + 1; j++) {
if (match_string_spaces(baseend->line, baseend->len,
newend->line, newend->len, flags)) {
lcs[i][j] = lcs[i - 1][j - 1] + 1;
@@ -241,7 +241,7 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase,
if (lline->prev)
lline->prev->next = lline->next;
else
- new = lline->next;
+ newline = lline->next;
if (lline->next)
lline->next->prev = lline->prev;
@@ -270,7 +270,7 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase,
}
}
- newend = new;
+ newend = newline;
while (newend) {
struct lline *lline = newend;
newend = newend->next;