gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] new tarball


From: Haakon Riiser
Subject: Re: [Gnu-arch-users] new tarball
Date: Mon, 19 Dec 2005 18:24:03 +0100
User-agent: Mutt/1.5.11

[Andy Tai]

> Another addition of interest is now tla allows the -b and -w diff
> options to be used when doing tla diff, which ignore white space
> changes and should be useful when examining current changes in the
> working directory.

Great, but could you also support the -B/--ignore-blank-lines
option?  (I tend to use -Bb when reviewing diffs, since that
combination excludes changes that normally are just cosmetics.)
Here's an untested patch:

--- tla-1.3.3.99.1/src/tla/libarch/cmd-diff.c.orig      2005-12-19 
17:04:43.000000000 +0100
+++ tla-1.3.3.99.1/src/tla/libarch/cmd-diff.c   2005-12-19 18:22:26.000000000 
+0100
@@ -87,6 +87,8 @@
       N_("limit the diff to LIMITS")) \
   OP (opt_ignore_space, "b", "ignore-space-change", 0, \
       N_("ignore white space-only changes (display only)"))\
+  OP (opt_ignore_blank_lines, "B", "ignore-blank-lines", 0, \
+      N_("Ignore changes whose lines are all blank (display only)"))\
   OP (opt_ignore_all_space, "w", "ignore-all-space", 0, \
       N_("Ignore all white space (display only)"))
 
@@ -243,6 +245,14 @@
             diff_opts[1] = 0;
             break;
           }
+        case opt_ignore_blank_lines:
+          {
+            lim_free(0, diff_opts);
+            diff_opts = lim_malloc(0, 3 * sizeof(diff_opts[0]));
+            diff_opts[0] = "--ignore-blank-lines";
+            diff_opts[1] = 0;
+            break;
+          }
         case opt_ignore_all_space:
           {
             lim_free(0, diff_opts);

-- 
 Haakon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]