aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-12-16 10:22:56 +0900
committerJunio C Hamano <gitster@pobox.com>2025-12-16 10:22:56 +0900
commitc0c4dc0b700f0f97cbe7a06ab555cd6912dc924c (patch)
tree5005b815e45118299eb1e03903bffce6a4241424 /diff.c
parent9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed (diff)
parent38f88051dae6ddb2f1cdb9c7415d4ba6caef04af (diff)
downloadgit-c0c4dc0b700f0f97cbe7a06ab555cd6912dc924c.tar.xz
Merge branch 'rs/diff-index-find-copies-harder-optim' into rs/diff-files-r-find-copies-fix
* rs/diff-index-find-copies-harder-optim: diff-index: don't queue unchanged filepairs with diff_change()
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index a1961526c0..c3063d827e 100644
--- a/diff.c
+++ b/diff.c
@@ -7347,6 +7347,26 @@ void diff_change(struct diff_options *options,
concatpath, old_dirty_submodule, new_dirty_submodule);
}
+void diff_same(struct diff_options *options,
+ unsigned mode,
+ const struct object_id *oid,
+ const char *concatpath)
+{
+ struct diff_filespec *one;
+
+ if (S_ISGITLINK(mode) && is_submodule_ignored(concatpath, options))
+ return;
+
+ if (options->prefix &&
+ strncmp(concatpath, options->prefix, options->prefix_length))
+ return;
+
+ one = alloc_filespec(concatpath);
+ fill_filespec(one, oid, 1, mode);
+ one->count++;
+ diff_queue(&diff_queued_diff, one, one);
+}
+
struct diff_filepair *diff_unmerge(struct diff_options *options, const char *path)
{
struct diff_filepair *pair;