Fossil SCM

Comment clarification

wyoung 2021-06-22 08:45 fossil-spawn
Commit c625c259a13b9b7619d80b91bcd973c33eb41d3aec53889d2f14dde7da6e6ad3
1 file changed +5 -1
+5 -1
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -311,18 +311,22 @@
311311
* array by db_get_array(). Fortunately, most diff type
312312
* programs offer and benefit from option flags, so you
313313
* should be able to upgrade to this method by re-applying
314314
* your settings, making use of the new array storage option:
315315
*
316
- * $ fossil set diff-command colordiff -wu
316
+ * $ fossil set diff-command -- colordiff -wu
317317
*
318318
* as opposed to the legacy method:
319319
*
320320
* $ fossil set diff-command 'colordiff -wu'
321321
*
322322
* The lack of quoting around those two setting values causes
323323
* Fossil to store them as an array, which lands you in here.
324
+ *
325
+ * (Also note the need for -- in the new method, to prevent
326
+ * Fossil's non-positional option flag parser from trying to
327
+ * interpret -wu as flags for the "fossil setting" command.)
324328
*/
325329
azFullDiffCmd = fossil_malloc((nDiffCmdValues+3)*sizeof(char*));
326330
for( n=0; n<nDiffCmdValues; ++n ) azFullDiffCmd[n] = azDiffCmd[n];
327331
if( fSwapDiff ){
328332
azFullDiffCmd[n++] = zFile2;
329333
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -311,18 +311,22 @@
311 * array by db_get_array(). Fortunately, most diff type
312 * programs offer and benefit from option flags, so you
313 * should be able to upgrade to this method by re-applying
314 * your settings, making use of the new array storage option:
315 *
316 * $ fossil set diff-command colordiff -wu
317 *
318 * as opposed to the legacy method:
319 *
320 * $ fossil set diff-command 'colordiff -wu'
321 *
322 * The lack of quoting around those two setting values causes
323 * Fossil to store them as an array, which lands you in here.
 
 
 
 
324 */
325 azFullDiffCmd = fossil_malloc((nDiffCmdValues+3)*sizeof(char*));
326 for( n=0; n<nDiffCmdValues; ++n ) azFullDiffCmd[n] = azDiffCmd[n];
327 if( fSwapDiff ){
328 azFullDiffCmd[n++] = zFile2;
329
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -311,18 +311,22 @@
311 * array by db_get_array(). Fortunately, most diff type
312 * programs offer and benefit from option flags, so you
313 * should be able to upgrade to this method by re-applying
314 * your settings, making use of the new array storage option:
315 *
316 * $ fossil set diff-command -- colordiff -wu
317 *
318 * as opposed to the legacy method:
319 *
320 * $ fossil set diff-command 'colordiff -wu'
321 *
322 * The lack of quoting around those two setting values causes
323 * Fossil to store them as an array, which lands you in here.
324 *
325 * (Also note the need for -- in the new method, to prevent
326 * Fossil's non-positional option flag parser from trying to
327 * interpret -wu as flags for the "fossil setting" command.)
328 */
329 azFullDiffCmd = fossil_malloc((nDiffCmdValues+3)*sizeof(char*));
330 for( n=0; n<nDiffCmdValues; ++n ) azFullDiffCmd[n] = azDiffCmd[n];
331 if( fSwapDiff ){
332 azFullDiffCmd[n++] = zFile2;
333

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button