Teach diff machinery to display other prefixes than "a/" and "b/"

With the new options "--src-prefix=<prefix>", "--dst-prefix=<prefix>"
and "--no-prefix", you can now control the path prefixes of the diff
machinery.  These used to by hardwired to "a/" for the source prefix
and "b/" for the destination prefix.

Initial patch by Pascal Obry.  Sane option names suggested by Linus.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Schindelin
2007-12-18 19:32:14 +00:00
committed by Junio C Hamano
parent 74f6b03c5c
commit eab9a40b6d
3 changed files with 27 additions and 8 deletions

1
diff.h
View File

@ -69,6 +69,7 @@ struct diff_options {
const char *orderfile;
const char *pickaxe;
const char *single_follow;
const char *a_prefix, *b_prefix;
unsigned flags;
int context;
int break_opt;