Author: rinrab Date: Wed May 28 12:31:55 2025 New Revision: 1925902 URL: http://svn.apache.org/viewvc?rev=1925902&view=rev Log: On the 'utf8-cmdline-prototype' branch: avoid double coping of arguments after encoding conversion.
This is a follow-up to r1925836. * subversion/svn/svn.c (--diff-cmd, --merge-cmd, --editor-cmd): Ditto. Modified: subversion/branches/utf8-cmdline-prototype/subversion/svn/svn.c Modified: subversion/branches/utf8-cmdline-prototype/subversion/svn/svn.c URL: http://svn.apache.org/viewvc/subversion/branches/utf8-cmdline-prototype/subversion/svn/svn.c?rev=1925902&r1=1925901&r2=1925902&view=diff ============================================================================== --- subversion/branches/utf8-cmdline-prototype/subversion/svn/svn.c (original) +++ subversion/branches/utf8-cmdline-prototype/subversion/svn/svn.c Wed May 28 12:31:55 2025 @@ -2521,19 +2521,19 @@ sub_main(int *exit_code, opt_state.extensions = apr_pstrdup(pool, utf8_opt_arg); break; case opt_diff_cmd: - SVN_ERR(svn_utf_cstring_from_utf8(&opt_arg, utf8_opt_arg, pool)); - opt_state.diff.diff_cmd = apr_pstrdup(pool, opt_arg); + SVN_ERR(svn_utf_cstring_from_utf8(&opt_state.diff.diff_cmd, + utf8_opt_arg, pool)); break; case opt_merge_cmd: - SVN_ERR(svn_utf_cstring_from_utf8(&opt_arg, utf8_opt_arg, pool)); - opt_state.merge_cmd = apr_pstrdup(pool, opt_arg); + SVN_ERR(svn_utf_cstring_from_utf8(&opt_state.merge_cmd, + utf8_opt_arg, pool)); break; case opt_record_only: opt_state.record_only = TRUE; break; case opt_editor_cmd: - SVN_ERR(svn_utf_cstring_from_utf8(&opt_arg, utf8_opt_arg, pool)); - opt_state.editor_cmd = apr_pstrdup(pool, opt_arg); + SVN_ERR(svn_utf_cstring_from_utf8(&opt_state.editor_cmd, + utf8_opt_arg, pool)); break; case opt_old_cmd: if (opt_state.used_change_arg)