Author: rhuijben
Date: Tue Feb 17 12:52:43 2015
New Revision: 1660369
URL: http://svn.apache.org/r1660369
Log:
Fix a few more cases where we don't handle no-config properly
(found via code review)
* subversion/svn/diff-cmd.c
(svn_cl__diff): Just to be sure, check config for NULL like in other places.
* subversion/svn/util.c
(svn_cl__make_log_msg_baton): Avoid not setting struct members when config
unavailable (and use pcalloc to avoid future similar problems)
Modified:
subversion/trunk/subversion/svn/diff-cmd.c
subversion/trunk/subversion/svn/util.c
Modified: subversion/trunk/subversion/svn/diff-cmd.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/diff-cmd.c?rev=1660369&r1=1660368&r2=1660369&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/diff-cmd.c (original)
+++ subversion/trunk/subversion/svn/diff-cmd.c Tue Feb 17 12:52:43 2015
@@ -344,7 +344,7 @@ svn_cl__diff(apr_getopt_t *os,
{
ignore_content_type = TRUE;
}
- else
+ else if (ctx->config)
{
SVN_ERR(svn_config_get_bool(svn_hash_gets(ctx->config,
SVN_CONFIG_CATEGORY_CONFIG),
@@ -353,6 +353,10 @@ svn_cl__diff(apr_getopt_t *os,
SVN_CONFIG_OPTION_DIFF_IGNORE_CONTENT_TYPE,
FALSE));
}
+ else
+ {
+ ignore_content_type = FALSE;
+ }
svn_opt_push_implicit_dot_target(targets, pool);
Modified: subversion/trunk/subversion/svn/util.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/util.c?rev=1660369&r1=1660368&r2=1660369&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/util.c (original)
+++ subversion/trunk/subversion/svn/util.c Tue Feb 17 12:52:43 2015
@@ -204,7 +204,7 @@ svn_cl__make_log_msg_baton(void **baton,
apr_hash_t *config,
apr_pool_t *pool)
{
- struct log_msg_baton *lmb = apr_palloc(pool, sizeof(*lmb));
+ struct log_msg_baton *lmb = apr_pcalloc(pool, sizeof(*lmb));
if (opt_state->filedata)
{
@@ -237,6 +237,8 @@ svn_cl__make_log_msg_baton(void **baton,
SVN_CONFIG_OPTION_LOG_ENCODING,
NULL);
}
+ else
+ lmb->message_encoding = NULL;
lmb->base_dir = base_dir ? base_dir : "";
lmb->tmpfile_left = NULL;