summaryrefslogtreecommitdiffstats
path: root/subversion/svn/diff-cmd.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2015-10-12 08:54:49 +0000
committerpeter <peter@FreeBSD.org>2015-10-12 08:54:49 +0000
commitc18b5d7f26f112be58bb1c4660799dea49f219ba (patch)
tree013c2e6845398e5a9ca4901dcc077769c7520e1d /subversion/svn/diff-cmd.c
parent91308aec6ca93cab82659cd43b3f6a83d366350b (diff)
downloadFreeBSD-src-c18b5d7f26f112be58bb1c4660799dea49f219ba.zip
FreeBSD-src-c18b5d7f26f112be58bb1c4660799dea49f219ba.tar.gz
Vendor import of subversion-1.9.2
Diffstat (limited to 'subversion/svn/diff-cmd.c')
-rw-r--r--subversion/svn/diff-cmd.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/subversion/svn/diff-cmd.c b/subversion/svn/diff-cmd.c
index 2cbd202..7a84736 100644
--- a/subversion/svn/diff-cmd.c
+++ b/subversion/svn/diff-cmd.c
@@ -37,6 +37,7 @@
#include "svn_types.h"
#include "svn_cmdline.h"
#include "svn_xml.h"
+#include "svn_hash.h"
#include "cl.h"
#include "svn_private_config.h"
@@ -117,7 +118,7 @@ summarize_xml(const svn_client_diff_summarize_t *summary,
"kind", svn_cl__node_kind_str_xml(summary->node_kind),
"item", kind_to_word(summary->summarize_kind),
"props", summary->prop_changed ? "modified" : "none",
- NULL);
+ SVN_VA_NULL);
svn_xml_escape_cdata_cstring(&sb, path, pool);
svn_xml_make_close_tag(&sb, pool, "path");
@@ -179,6 +180,7 @@ svn_cl__diff(apr_getopt_t *os,
const char *old_target, *new_target;
apr_pool_t *iterpool;
svn_boolean_t pegged_diff = FALSE;
+ svn_boolean_t ignore_content_type;
svn_boolean_t show_copies_as_adds =
opt_state->diff.patch_compatible || opt_state->diff.show_copies_as_adds;
svn_boolean_t ignore_properties =
@@ -211,7 +213,7 @@ svn_cl__diff(apr_getopt_t *os,
SVN_ERR(svn_cl__xml_print_header("diff", pool));
sb = svn_stringbuf_create_empty(pool);
- svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "paths", NULL);
+ svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "paths", SVN_VA_NULL);
SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout));
}
@@ -337,6 +339,25 @@ svn_cl__diff(apr_getopt_t *os,
}
+ /* Should we ignore the content-type when deciding what to diff? */
+ if (opt_state->force)
+ {
+ ignore_content_type = TRUE;
+ }
+ else if (ctx->config)
+ {
+ SVN_ERR(svn_config_get_bool(svn_hash_gets(ctx->config,
+ SVN_CONFIG_CATEGORY_CONFIG),
+ &ignore_content_type,
+ SVN_CONFIG_SECTION_MISCELLANY,
+ SVN_CONFIG_OPTION_DIFF_IGNORE_CONTENT_TYPE,
+ FALSE));
+ }
+ else
+ {
+ ignore_content_type = FALSE;
+ }
+
svn_opt_push_implicit_dot_target(targets, pool);
iterpool = svn_pool_create(pool);
@@ -399,7 +420,7 @@ svn_cl__diff(apr_getopt_t *os,
opt_state->diff.no_diff_added,
opt_state->diff.no_diff_deleted,
show_copies_as_adds,
- opt_state->force,
+ ignore_content_type,
ignore_properties,
opt_state->diff.properties_only,
opt_state->diff.use_git_diff_format,
@@ -450,7 +471,7 @@ svn_cl__diff(apr_getopt_t *os,
opt_state->diff.no_diff_added,
opt_state->diff.no_diff_deleted,
show_copies_as_adds,
- opt_state->force,
+ ignore_content_type,
ignore_properties,
opt_state->diff.properties_only,
opt_state->diff.use_git_diff_format,
OpenPOWER on IntegriCloud