wok diff busybox/stuff/busybox-1.27-diff.u @ rev 21015

updated gujin (2.8.6 -> 2.8.7)
author Hans-G?nter Theisgen
date Sun Mar 10 08:09:36 2019 +0100 (2019-03-10)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/busybox/stuff/busybox-1.27-diff.u	Sun Mar 10 08:09:36 2019 +0100
     1.3 @@ -0,0 +1,53 @@
     1.4 +--- busybox-1.26/editors/diff.c
     1.5 ++++ busybox-1.26/editors/diff.c
     1.6 +@@ -111,6 +111,7 @@
     1.7 + //usage:     "\n	-B	Ignore changes whose lines are all blank"
     1.8 + //usage:     "\n	-d	Try hard to find a smaller set of changes"
     1.9 + //usage:     "\n	-i	Ignore case differences"
    1.10 ++//usage:     "\n	-l	Ignore symbolic links"
    1.11 + //usage:     "\n	-L	Use LABEL instead of the filename in the unified header"
    1.12 + //usage:     "\n	-N	Treat absent files as empty"
    1.13 + //usage:     "\n	-q	Output only whether files differ"
    1.14 +@@ -142,6 +143,7 @@
    1.15 + 	FLAG_b,
    1.16 + 	FLAG_d,
    1.17 + 	FLAG_i,
    1.18 ++	FLAG_l,
    1.19 + 	FLAG_L,         /* never used, handled by getopt32 */
    1.20 + 	FLAG_N,
    1.21 + 	FLAG_q,
    1.22 +@@ -756,6 +758,14 @@
    1.23 + 		j = fread(buf1, 1, sz, fp[1]);
    1.24 + 		if (i != j) {
    1.25 + 			differ = true;
    1.26 ++			/* Ensure we detect binary file even if a file is empty or very
    1.27 ++			   short. */
    1.28 ++			for (k = 0; k < i; k++)
    1.29 ++				if (!buf0[k])
    1.30 ++					binary = true;
    1.31 ++			for (k = 0; k < j; k++)
    1.32 ++				if (!buf1[k])
    1.33 ++					binary = true;
    1.34 + 			i = MIN(i, j);
    1.35 + 		}
    1.36 + 		if (i == 0)
    1.37 +@@ -869,7 +879,9 @@
    1.38 + 		 * Using list.len to specify its length,
    1.39 + 		 * add_to_dirlist will remove it. */
    1.40 + 		list[i].len = strlen(p[i]);
    1.41 +-		recursive_action(p[i], ACTION_RECURSE | ACTION_FOLLOWLINKS,
    1.42 ++		recursive_action(p[i],
    1.43 ++				(option_mask32 & FLAG(l)) ? ACTION_RECURSE :
    1.44 ++				ACTION_RECURSE | ACTION_FOLLOWLINKS,
    1.45 + 				add_to_dirlist, skip_dir, &list[i], 0);
    1.46 + 		/* Sort dl alphabetically.
    1.47 + 		 * GNU diff does this ignoring any number of trailing dots.
    1.48 +@@ -983,7 +995,7 @@
    1.49 + #if ENABLE_FEATURE_DIFF_LONG_OPTIONS
    1.50 + 	applet_long_options = diff_longopts;
    1.51 + #endif
    1.52 +-	getopt32(argv, "abdiL:*NqrsS:tTU:+wupBE",
    1.53 ++	getopt32(argv, "abdilL:*NqrsS:tTU:+wupBE",
    1.54 + 			&L_arg, &s_start, &opt_U_context);
    1.55 + 	argv += optind;
    1.56 + 	while (L_arg)