diff options
author | Elijah Newren <newren@gmail.com> | 2022-02-02 02:37:34 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-02 18:02:28 (GMT) |
commit | 95433eeed9eac439eb21eb30105354b15e71302e (patch) | |
tree | 7eda4d13eb4ff66943c75658774038eea4f9ac8e /diff.h | |
parent | 6054d1aac36d5769461fb73b15326a900e53edb9 (diff) | |
download | git-95433eeed9eac439eb21eb30105354b15e71302e.zip git-95433eeed9eac439eb21eb30105354b15e71302e.tar.gz git-95433eeed9eac439eb21eb30105354b15e71302e.tar.bz2 |
diff: add ability to insert additional headers for paths
When additional headers are provided, we need to
* add diff_filepairs to diff_queued_diff for each paths in the
additional headers map which, unless that path is part of
another diff_filepair already found in diff_queued_diff
* format the headers (colorization, line_prefix for --graph)
* make sure the various codepaths that attempt to return early
if there are "no changes" take into account the headers that
need to be shown.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.h')
-rw-r--r-- | diff.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -395,6 +395,7 @@ struct diff_options { struct repository *repo; struct option *parseopts; + struct strmap *additional_path_headers; int no_free; }; @@ -593,7 +594,7 @@ void diffcore_fix_diff_index(void); " show all files diff when -S is used and hit is found.\n" \ " -a --text treat all files as text.\n" -int diff_queue_is_empty(void); +int diff_queue_is_empty(struct diff_options *o); void diff_flush(struct diff_options*); void diff_free(struct diff_options*); void diff_warn_rename_limit(const char *varname, int needed, int degraded_cc); |