+static int diff_tree_sha1_top(const unsigned char *old,
+ const unsigned char *new, const char *base)
+{
+ int ret;
+ if (generate_patch)
+ diff_setup(detect_rename, 0, 0, 0, 0);
+ ret = diff_tree_sha1(old, new, base);
+ if (generate_patch)
+ diff_flush();
+ return ret;
+}
+