diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-12-16 10:22:56 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-12-16 10:22:56 +0900 |
| commit | c0c4dc0b700f0f97cbe7a06ab555cd6912dc924c (patch) | |
| tree | 5005b815e45118299eb1e03903bffce6a4241424 /diff.c | |
| parent | 9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed (diff) | |
| parent | 38f88051dae6ddb2f1cdb9c7415d4ba6caef04af (diff) | |
| download | git-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.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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; |
