X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=diff.c;h=f8e3cbf1a652de273ee3a9b98c09eefc268f9977;hb=2ab706a38fbe6f4adb2fd09806a5d5faf33d355f;hp=9015c81d76b4038bf5cc567aa2e055370b6ffee8;hpb=8c1f5f0f1f9c36ef5465512753efeff36758ba7d;p=git.git diff --git a/diff.c b/diff.c index 9015c81d..f8e3cbf1 100644 --- a/diff.c +++ b/diff.c @@ -32,10 +32,10 @@ static const char *external_diff(void) * * GIT_DIFF_OPTS="-c"; */ - external_diff_cmd = gitenv("GIT_EXTERNAL_DIFF"); + external_diff_cmd = getenv("GIT_EXTERNAL_DIFF"); /* In case external diff fails... */ - env_diff_opts = gitenv("GIT_DIFF_OPTS"); + env_diff_opts = getenv("GIT_DIFF_OPTS"); if (env_diff_opts) diff_opts = env_diff_opts; done_preparing = 1; @@ -704,7 +704,7 @@ static int parse_num(const char **cp_p) scale *= 10; num = num * 10 + ch - '0'; } - *cp++; + cp++; } *cp_p = cp; @@ -955,7 +955,9 @@ static void diff_resolve_rename_copy(void) } /* See if there is some other filepair that * copies from the same source as us. If so - * we are a copy. Otherwise we are a rename. + * we are a copy. Otherwise we are either a + * copy if the path stays, or a rename if it + * does not, but we already handled "stays" case. */ for (j = i + 1; j < q->nr; j++) { pp = q->queue[j];