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>
This commit is contained in:

committed by
Junio C Hamano

parent
6054d1aac3
commit
95433eeed9
3
diff.h
3
diff.h
@ -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);
|
||||
|
Reference in New Issue
Block a user