subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject svn commit: r1618663 - in /subversion/trunk/subversion: include/svn_diff.h libsvn_diff/diff_file.c
Date Mon, 18 Aug 2014 16:47:32 GMT
Author: breser
Date: Mon Aug 18 16:47:32 2014
New Revision: 1618663

URL: http://svn.apache.org/r1618663
Log:
Support allowing no context lines to be printed with a diff.

* subversion/libsvn_diff/diff_file.c
  (svn_diff_file_output_unified4): Only default if negative.

* subversion/include/svn_diff.h
  (svn_diff_file_options_t): Update documented constraints on the context_size
    member to match the new behavior.
  (svn_diff_file_output_unified4): Update docs accordingly.
  (svn_diff_file_output_unified3): Make doc slightly clearer.

Modified:
    subversion/trunk/subversion/include/svn_diff.h
    subversion/trunk/subversion/libsvn_diff/diff_file.c

Modified: subversion/trunk/subversion/include/svn_diff.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_diff.h?rev=1618663&r1=1618662&r2=1618663&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_diff.h (original)
+++ subversion/trunk/subversion/include/svn_diff.h Mon Aug 18 16:47:32 2014
@@ -479,7 +479,7 @@ typedef struct svn_diff_file_options_t
   svn_boolean_t show_c_function;
 
   /** The number of context lines produced above and below modifications, if
-   * available. The number of context lines must be >= 1.
+   * available. The number of context lines must be >= 0.
    *
    * @since New in 1.9 */
   int context_size;
@@ -623,7 +623,7 @@ svn_diff_file_diff4(svn_diff_t **diff,
  * path of the target, an error is returned. Finally, if @a relative_to_dir
  * is a URL, an error will be returned.
  *
- * If @a context_size is greater than 0, then this number of context lines
+ * If @a context_size is not negative, then this number of context lines
  * will be used in the generated diff output. Otherwise the legacy compile
  * time default will be used.
  *
@@ -645,7 +645,7 @@ svn_diff_file_output_unified4(svn_stream
                               apr_pool_t *scratch_pool);
 
 /** Similar to svn_diff_file_output_unified3(), but without cancel
- * support and with @a context_size -1.
+ * support and with @a context_size set to -1.
  *
  * @since New in 1.5.
  * @deprecated Provided for backwards compatibility with the 1.8 API.

Modified: subversion/trunk/subversion/libsvn_diff/diff_file.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/diff_file.c?rev=1618663&r1=1618662&r2=1618663&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_diff/diff_file.c (original)
+++ subversion/trunk/subversion/libsvn_diff/diff_file.c Mon Aug 18 16:47:32 2014
@@ -1852,7 +1852,7 @@ svn_diff_file_output_unified4(svn_stream
       baton.hunk = svn_stringbuf_create_empty(pool);
       baton.show_c_function = show_c_function;
       baton.extra_context = svn_stringbuf_create_empty(pool);
-      baton.context_size = (context_size > 0) ? context_size
+      baton.context_size = (context_size >= 0) ? context_size
                                               : SVN_DIFF__UNIFIED_CONTEXT_SIZE;
 
       if (show_c_function)



Mime
View raw message