summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/diff.c2
-rw-r--r--diff-no-index.c4
-rw-r--r--diff.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/builtin/diff.c b/builtin/diff.c
index 4326fa5..7b9917b 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -341,7 +341,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
}
if (no_index)
/* If this is a no-index diff, just run it and exit there. */
- diff_no_index(&rev, argc, argv, prefix);
+ diff_no_index(&rev, argc, argv);
/* Otherwise, we are doing the usual "git" diff */
rev.diffopt.skip_stat_unmatch = !!diff_auto_refresh_index;
diff --git a/diff-no-index.c b/diff-no-index.c
index 0320605..8edc6f3 100644
--- a/diff-no-index.c
+++ b/diff-no-index.c
@@ -239,12 +239,12 @@ static void fixup_paths(const char **path, struct strbuf *replacement)
}
void diff_no_index(struct rev_info *revs,
- int argc, const char **argv,
- const char *prefix)
+ int argc, const char **argv)
{
int i, prefixlen;
const char *paths[2];
struct strbuf replacement = STRBUF_INIT;
+ const char *prefix = revs->prefix;
diff_setup(&revs->diffopt);
for (i = 1; i < argc - 2; ) {
diff --git a/diff.h b/diff.h
index f7208ad..f61ee54 100644
--- a/diff.h
+++ b/diff.h
@@ -345,7 +345,7 @@ extern int diff_flush_patch_id(struct diff_options *, unsigned char *);
extern int diff_result_code(struct diff_options *, int);
-extern void diff_no_index(struct rev_info *, int, const char **, const char *);
+extern void diff_no_index(struct rev_info *, int, const char **);
extern int index_differs_from(const char *def, int diff_flags);