diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-03-26 16:26:09 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-03-26 16:26:09 +0900 |
| commit | f50df872a45c4a1010dc5378055b1be0e844add1 (patch) | |
| tree | fe68490cf5058c4386c4ecc1fc86350f0f19d447 /diff.h | |
| parent | Git 2.49 (diff) | |
| parent | builtin/diff-pairs: allow explicit diff queue flush (diff) | |
| download | git-f50df872a45c4a1010dc5378055b1be0e844add1.tar.gz git-f50df872a45c4a1010dc5378055b1be0e844add1.zip | |
Merge branch 'jt/diff-pairs'
A post-processing filter for "diff --raw" output has been
introduced.
* jt/diff-pairs:
builtin/diff-pairs: allow explicit diff queue flush
builtin: introduce diff-pairs command
diff: add option to skip resolving diff statuses
diff: return diff_filepair from diff queue helpers
Diffstat (limited to 'diff.h')
| -rw-r--r-- | diff.h | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -353,6 +353,14 @@ struct diff_options { /* to support internal diff recursion by --follow hack*/ int found_follow; + /* + * By default, diffcore_std() resolves the statuses for queued diff file + * pairs by calling diff_resolve_rename_copy(). If status information + * has already been manually set, this option prevents diffcore_std() + * from resetting statuses. + */ + int skip_resolving_statuses; + /* Callback which allows tweaking the options in diff_setup_done(). */ void (*set_default)(struct diff_options *); @@ -508,6 +516,31 @@ void diff_set_default_prefix(struct diff_options *options); int diff_can_quit_early(struct diff_options *); +/* + * Stages changes in the provided diff queue for file additions and deletions. + * If a file pair gets queued, it is returned. + */ +struct diff_filepair *diff_queue_addremove(struct diff_queue_struct *queue, + struct diff_options *, + int addremove, unsigned mode, + const struct object_id *oid, + int oid_valid, const char *fullpath, + unsigned dirty_submodule); + +/* + * Stages changes in the provided diff queue for file modifications. + * If a file pair gets queued, it is returned. + */ +struct diff_filepair *diff_queue_change(struct diff_queue_struct *queue, + struct diff_options *, + unsigned mode1, unsigned mode2, + const struct object_id *old_oid, + const struct object_id *new_oid, + int old_oid_valid, int new_oid_valid, + const char *fullpath, + unsigned dirty_submodule1, + unsigned dirty_submodule2); + void diff_addremove(struct diff_options *, int addremove, unsigned mode, |
