1/* 2 * Copyright (C) 2005 Junio C Hamano 3 */ 4#ifndef DIFF_H 5#define DIFF_H 6 7/* These two are for backward compatibility with show-diff; 8 * new users should not use them. 9 */ 10externvoidshow_differences(const struct cache_entry *ce,int reverse); 11externvoidshow_diff_empty(const struct cache_entry *ce,int reverse); 12 13struct diff_spec { 14union{ 15const char*name;/* path on the filesystem */ 16unsigned char sha1[20];/* blob object ID */ 17} u; 18unsigned short mode;/* file mode */ 19unsigned sha1_valid :1;/* if true, use u.sha1 and trust mode. 20 * (however with a NULL SHA1, read them 21 * from the file!). 22 * if false, use u.name and read mode from 23 * the filesystem. 24 */ 25unsigned file_valid :1;/* if false the file does not even exist */ 26}; 27 28externvoidrun_external_diff(const char*name, 29struct diff_spec *,struct diff_spec *); 30 31#endif/* DIFF_H */