[PATCH] git-merge-one-file-script cleanups from Cogito
[git.git] / diffcore.h
index 194d40c..ac159d7 100644 (file)
@@ -17,7 +17,7 @@
  */
 #define MAX_SCORE 60000
 #define DEFAULT_RENAME_SCORE 30000 /* rename/copy similarity minimum (50%) */
-#define DEFAULT_BREAK_SCORE  59400 /* minimum for break to happen (99%)*/
+#define DEFAULT_BREAK_SCORE  30000 /* minimum for break to happen (50%)*/
 #define DEFAULT_MERGE_SCORE  48000 /* maximum for break-merge to happen (80%)*/
 
 #define MINIMUM_BREAK_SIZE     400 /* do not break a file smaller than this */
@@ -33,7 +33,7 @@ struct diff_filespec {
                                  * if false, use the name and read from
                                  * the filesystem.
                                  */
-#define DIFF_FILE_VALID(spec) (((spec)->mode) != 0)
+#define DIFF_FILE_VALID(spec) ((spec) && ((spec)->mode) != 0)
        unsigned should_free : 1; /* data should be free()'ed */
        unsigned should_munmap : 1; /* data should be munmap()'ed */
 };