diff-merges: new function diff_merges_set_dense_combined_if_unset()
Call it where given functionality is needed instead of direct checking/tweaking of diff merges related fields. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
09322b1da9
commit
3b6c17b5c0
@ -7,6 +7,7 @@
|
||||
#include "cache.h"
|
||||
#include "config.h"
|
||||
#include "diff.h"
|
||||
#include "diff-merges.h"
|
||||
#include "commit.h"
|
||||
#include "revision.h"
|
||||
#include "builtin.h"
|
||||
@ -69,9 +70,9 @@ int cmd_diff_files(int argc, const char **argv, const char *prefix)
|
||||
* was not asked to. "diff-files -c -p" should not densify
|
||||
* (the user should ask with "diff-files --cc" explicitly).
|
||||
*/
|
||||
if (rev.max_count == -1 && !rev.combine_merges &&
|
||||
if (rev.max_count == -1 &&
|
||||
(rev.diffopt.output_format & DIFF_FORMAT_PATCH))
|
||||
rev.combine_merges = rev.dense_combined_merges = 1;
|
||||
diff_merges_set_dense_combined_if_unset(&rev);
|
||||
|
||||
if (read_cache_preload(&rev.diffopt.pathspec) < 0) {
|
||||
perror("read_cache_preload");
|
||||
|
Reference in New Issue
Block a user