diff options
Diffstat (limited to 'diff-no-index.c')
-rw-r--r-- | diff-no-index.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/diff-no-index.c b/diff-no-index.c index 1f8999b9ca..df762fd0f7 100644 --- a/diff-no-index.c +++ b/diff-no-index.c @@ -185,10 +185,8 @@ static int queue_diff(struct diff_options *o, struct diff_filespec *d1, *d2; if (DIFF_OPT_TST(o, REVERSE_DIFF)) { - unsigned tmp; - const char *tmp_c; - tmp = mode1; mode1 = mode2; mode2 = tmp; - tmp_c = name1; name1 = name2; name2 = tmp_c; + SWAP(mode1, mode2); + SWAP(name1, name2); } d1 = noindex_filespec(name1, mode1); @@ -281,6 +279,9 @@ void diff_no_index(struct rev_info *revs, DIFF_OPT_SET(&revs->diffopt, NO_INDEX); + DIFF_OPT_SET(&revs->diffopt, RELATIVE_NAME); + revs->diffopt.prefix = prefix; + revs->max_count = -2; diff_setup_done(&revs->diffopt); |