Libify diff-files.
This is the first installment to libify diff brothers. The updated diff-files uses revision.c::setup_revisions() infrastructure to parse its command line arguments, which means the pathname arguments are checked more strictly than before. The tests are adjusted to separate possibly missing paths from the rest of arguments with double-dashes, to show the kosher way. As Linus pointed out, renaming diff.c to diff-lib.c was simply stupid, so I am renaming it back. The new diff-lib.c is to contain pieces extracted from diff brothers. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
7
diff.h
7
diff.h
@ -28,10 +28,11 @@ struct diff_options {
|
||||
with_raw:1,
|
||||
with_stat:1,
|
||||
tree_in_recursive:1,
|
||||
full_index:1;
|
||||
full_index:1,
|
||||
silent_on_remove:1,
|
||||
find_copies_harder:1;
|
||||
int break_opt;
|
||||
int detect_rename;
|
||||
int find_copies_harder;
|
||||
int line_termination;
|
||||
int output_format;
|
||||
int pickaxe_opts;
|
||||
@ -168,4 +169,6 @@ extern void diff_flush(struct diff_options*);
|
||||
|
||||
extern const char *diff_unique_abbrev(const unsigned char *, int);
|
||||
|
||||
extern int run_diff_files(struct rev_info *revs, int silent_on_removed);
|
||||
|
||||
#endif /* DIFF_H */
|
||||
|
||||
Reference in New Issue
Block a user