X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=diffcore.h;h=fed9b151b5b7818b0f211787e11b61b784ec9ade;hb=48c250a121a425a1860226b6a7061aecfbab5246;hp=66687c3fe5ea4552cff2b864b73696460ca40b1e;hpb=28bf4ba014c9b41679f41580fa9e1cc294b240d9;p=git.git diff --git a/diffcore.h b/diffcore.h index 66687c3fe..fed9b151b 100644 --- a/diffcore.h +++ b/diffcore.h @@ -18,7 +18,7 @@ #define MAX_SCORE 60000.0 #define DEFAULT_RENAME_SCORE 30000 /* rename/copy similarity minimum (50%) */ #define DEFAULT_BREAK_SCORE 30000 /* minimum for break to happen (50%) */ -#define DEFAULT_MERGE_SCORE 36000 /* maximum for break-merge to happen 60%) */ +#define DEFAULT_MERGE_SCORE 36000 /* maximum for break-merge to happen (60%) */ #define MINIMUM_BREAK_SIZE 400 /* do not break a file smaller than this */ @@ -42,7 +42,9 @@ struct diff_filespec { #define DIFF_FILE_VALID(spec) (((spec)->mode) != 0) unsigned should_free : 1; /* data should be free()'ed */ unsigned should_munmap : 1; /* data should be munmap()'ed */ - unsigned dirty_submodule : 1; /* For submodules: its work tree is dirty */ + unsigned dirty_submodule : 2; /* For submodules: its work tree is dirty */ +#define DIRTY_SUBMODULE_UNTRACKED 1 +#define DIRTY_SUBMODULE_MODIFIED 2 struct userdiff_driver *driver; /* data should be considered "binary"; -1 means "don't know yet" */ @@ -89,7 +91,14 @@ struct diff_queue_struct { struct diff_filepair **queue; int alloc; int nr; + int run; }; +#define DIFF_QUEUE_CLEAR(q) \ + do { \ + (q)->queue = NULL; \ + (q)->nr = (q)->alloc = 0; \ + (q)->run = 0; \ + } while(0); extern struct diff_queue_struct diff_queued_diff; extern struct diff_filepair *diff_queue(struct diff_queue_struct *,