summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD20
-rw-r--r--exclude-directory.patch70
3 files changed, 59 insertions, 41 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e83c938f844a..77d14af20bfa 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,23 @@
-# Generated by mksrcinfo v8
-# Mon Oct 17 14:44:05 UTC 2016
pkgbase = diffutils-patched-exclude-directory-git
pkgdesc = Utility programs used for creating patch files, including exclude directory feature
- pkgver = 3.5.r8.g1c1de41
+ pkgver = 3.7.r11.g3600e8d
pkgrel = 1
url = http://www.gnu.org/software/diffutils
arch = i686
arch = x86_64
license = GPL3
makedepends = gperf
+ makedepends = git
+ makedepends = help2man
+ makedepends = rsync
+ makedepends = wget
depends = libsigsegv
provides = diffutils
conflicts = diffutils
source = diffutils-patched-exclude-directory-git::git+git://git.savannah.gnu.org/diffutils.git
source = exclude-directory.patch
sha256sums = SKIP
- sha256sums = 97ac78bc61718cba9ae0387b9882042a4e59086f14c8964c75aa467d68e5de34
+ sha256sums = f13ddfff73dd85a8051c9196cecd900162ce496f924b60bee7ec086871c4d572
pkgname = diffutils-patched-exclude-directory-git
diff --git a/PKGBUILD b/PKGBUILD
index d10a117b12e4..313af9620676 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,23 @@
# Maintainer: David Parrish <daveparrish@tutanota.com>
pkgname=diffutils-patched-exclude-directory-git
-pkgver=3.5.r8.g1c1de41
+pkgver=3.7.r11.g3600e8d
pkgrel=1
pkgdesc='Utility programs used for creating patch files, including exclude directory feature'
arch=('i686' 'x86_64')
url='http://www.gnu.org/software/diffutils'
license=('GPL3')
depends=('libsigsegv')
-makedepends=('gperf')
+makedepends=('gperf' 'git' 'help2man' 'rsync' 'wget')
provides=('diffutils')
conflicts=('diffutils')
source=("${pkgname}::git+git://git.savannah.gnu.org/diffutils.git"
'exclude-directory.patch')
sha256sums=('SKIP'
- '97ac78bc61718cba9ae0387b9882042a4e59086f14c8964c75aa467d68e5de34')
+ 'f13ddfff73dd85a8051c9196cecd900162ce496f924b60bee7ec086871c4d572')
pkgver() {
- cd "$pkgname"
+ cd "$pkgname" || exit
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
@@ -25,26 +25,26 @@ prepare() {
msg 'Applying exclude directory patch ...'
patch -d "$pkgname" -p1 <exclude-directory.patch
- cd "$pkgname"
+ cd "$pkgname" || exit
- msg 'Bootstrapping diffutils ...'
+ # Bootstrap diffutils
./bootstrap
}
build() {
- cd "$pkgname"
+ cd "$pkgname" || exit
./configure --prefix=/usr
make
}
check() {
- cd "$pkgname"
+ cd "$pkgname" || exit
make check
}
package() {
- cd "$pkgname"
+ cd "$pkgname" || exit
make DESTDIR="$pkgdir" install
}
-# vim:set ts=2 sw=2 et:
+# vim:set ts=2 sw=2 et:
diff --git a/exclude-directory.patch b/exclude-directory.patch
index feb3dea28e9b..78ec33190feb 100644
--- a/exclude-directory.patch
+++ b/exclude-directory.patch
@@ -1,8 +1,24 @@
+diff --git a/doc/diffutils.texi b/doc/diffutils.texi
+index 3a780db..0553937 100644
+--- a/doc/diffutils.texi
++++ b/doc/diffutils.texi
+@@ -1827,6 +1827,11 @@ patterns in a file, one pattern per line, and use the
+ @option{--exclude-from=@var{file}} (@option{-X @var{file}}) option.
+ Trailing white space and empty lines are ignored in the pattern file.
+
++To ignore whole directories with exclude pattern instead of only
++basenames use the @option{--exclude-directory} option in addition to
++@option{--exclude=@var{pattern}} or
++@option{--exclude-from=@var{file}} options.
++
+ If you have been comparing two directories and stopped partway through,
+ later you might want to continue where you left off. You can do this by
+ using the @option{--starting-file=@var{file}} (@option{-S @var{file}})
diff --git a/src/diff.c b/src/diff.c
-index 9bc1d96..4420623 100644
+index e9c2b11..8e4e2ba 100644
--- a/src/diff.c
+++ b/src/diff.c
-@@ -122,6 +122,7 @@ enum
+@@ -124,6 +124,7 @@ enum
NO_IGNORE_FILE_NAME_CASE_OPTION,
NORMAL_OPTION,
SDIFF_MERGE_ASSIST_OPTION,
@@ -10,7 +26,7 @@ index 9bc1d96..4420623 100644
STRIP_TRAILING_CR_OPTION,
SUPPRESS_BLANK_EMPTY_OPTION,
SUPPRESS_COMMON_LINES_OPTION,
-@@ -208,6 +209,7 @@ static struct option const longopts[] =
+@@ -210,6 +211,7 @@ static struct option const longopts[] =
{"show-function-line", 1, 0, 'F'},
{"side-by-side", 0, 0, 'y'},
{"speed-large-files", 0, 0, 'H'},
@@ -18,18 +34,18 @@ index 9bc1d96..4420623 100644
{"starting-file", 1, 0, 'S'},
{"strip-trailing-cr", 0, 0, STRIP_TRAILING_CR_OPTION},
{"suppress-blank-empty", 0, 0, SUPPRESS_BLANK_EMPTY_OPTION},
-@@ -592,6 +594,10 @@ main (int argc, char **argv)
- sdiff_merge_assist = true;
- break;
+@@ -596,6 +598,10 @@ main (int argc, char **argv)
+ sdiff_merge_assist = true;
+ break;
+ case EXCLUDE_DIRECTORY_OPTION:
+ exclude_directory = true;
+ break;
+
- case STRIP_TRAILING_CR_OPTION:
- strip_trailing_cr = true;
- break;
-@@ -911,6 +917,7 @@ static char const * const option_help_msgid[] = {
+ case STRIP_TRAILING_CR_OPTION:
+ strip_trailing_cr = true;
+ break;
+@@ -921,6 +927,7 @@ static char const * const option_help_msgid[] = {
N_(" --no-ignore-file-name-case consider case when comparing file names"),
N_("-x, --exclude=PAT exclude files that match PAT"),
N_("-X, --exclude-from=FILE exclude files that match any pattern in FILE"),
@@ -38,7 +54,7 @@ index 9bc1d96..4420623 100644
N_(" --from-file=FILE1 compare FILE1 to all operands;\n"
" FILE1 can be a directory"),
diff --git a/src/diff.h b/src/diff.h
-index 0983e7c..413790a 100644
+index 5eb3008..dd73517 100644
--- a/src/diff.h
+++ b/src/diff.h
@@ -224,6 +224,9 @@ XTERN bool speed_large_files;
@@ -52,27 +68,27 @@ index 0983e7c..413790a 100644
slower) but will find a guaranteed minimal set of changes. */
XTERN bool minimal;
diff --git a/src/dir.c b/src/dir.c
-index c8aa6a5..e9c70d6 100644
+index b02099a..ace29f2 100644
--- a/src/dir.c
+++ b/src/dir.c
@@ -96,8 +96,15 @@ dir_read (struct file_data const *dir, struct dirdata *dirdata)
- && (d_name[1] == 0 || (d_name[1] == '.' && d_name[2] == 0)))
- continue;
+ && (d_name[1] == 0 || (d_name[1] == '.' && d_name[2] == 0)))
+ continue;
-- if (excluded_file_name (excluded, d_name))
-- continue;
-+ /* Exclude filename matches from diff */
-+ if (exclude_directory) {
-+ if (excluded_file_name (excluded,
-+ file_name_concat(dir->name, d_name, NULL)))
-+ continue;
-+ } else {
-+ if (excluded_file_name (excluded, d_name))
-+ continue;
-+ }
+- if (excluded_file_name (excluded, d_name))
+- continue;
++ /* Exclude filename matches from diff */
++ if (exclude_directory) {
++ if (excluded_file_name (excluded,
++ file_name_concat(dir->name, d_name, NULL)))
++ continue;
++ } else {
++ if (excluded_file_name (excluded, d_name))
++ continue;
++ }
- while (data_alloc < data_used + d_size)
- {
+ while (data_alloc < data_used + d_size)
+ {
diff --git a/tests/exclude-directory b/tests/exclude-directory
new file mode 100755
index 0000000..825154a