diff -Nru diffstat-1.53/CHANGES diffstat-1.54/CHANGES --- diffstat-1.53/CHANGES 2010-07-19 09:50:32.000000000 +0000 +++ diffstat-1.54/CHANGES 2010-10-10 23:29:13.000000000 +0000 @@ -1,4 +1,14 @@ --- $Id: CHANGES,v 1.64 2010/07/19 09:50:32 tom Exp $ +-- $Id: CHANGES,v 1.66 2010/10/10 23:29:13 tom Exp $ + +2010/10/10 (diffstat 1.54) + + change Debian package script to use native format. + + + correct counts used for new files when -S/-D options are used. + + + minor typography improvement to manpage (patch by Solaris Designer) + + + remove the temporary directory on error, introduced in 1.48+ (patch + by Solaris Designer). 2010/07/19 (diffstat 1.53) diff -Nru diffstat-1.53/debian/changelog diffstat-1.54/debian/changelog --- diffstat-1.53/debian/changelog 2010-07-19 11:10:53.000000000 +0000 +++ diffstat-1.54/debian/changelog 2010-12-22 00:33:02.000000000 +0000 @@ -1,3 +1,14 @@ +diffstat (1.54-1) unstable; urgency=low + + * New upstream release: + + correct counts used for new files when -S/-D options are used + + remove the temporary directory on error + + * Bump Standards-Version up to 3.9.1 + * Bump debhelper compatibility to 8 + + -- Francois Marier Wed, 22 Dec 2010 13:32:45 +1300 + diffstat (1.53-1) unstable; urgency=low * New upstream release: diff -Nru diffstat-1.53/debian/compat diffstat-1.54/debian/compat --- diffstat-1.53/debian/compat 2010-07-19 11:10:53.000000000 +0000 +++ diffstat-1.54/debian/compat 2010-12-22 00:33:02.000000000 +0000 @@ -1 +1 @@ -7 +8 diff -Nru diffstat-1.53/debian/control diffstat-1.54/debian/control --- diffstat-1.53/debian/control 2010-07-19 11:10:53.000000000 +0000 +++ diffstat-1.54/debian/control 2010-12-22 00:33:02.000000000 +0000 @@ -2,8 +2,8 @@ Section: devel Priority: optional Maintainer: Francois Marier -Build-Depends: debhelper (>= 7) -Standards-Version: 3.9.0 +Build-Depends: debhelper (>= 8) +Standards-Version: 3.9.1 Homepage: http://invisible-island.net/diffstat/ Vcs-Git: git://git.debian.org/git/collab-maint/diffstat.git Vcs-Browser: http://git.debian.org/?p=collab-maint/diffstat.git;a=summary diff -Nru diffstat-1.53/diffstat.1 diffstat-1.54/diffstat.1 --- diffstat-1.53/diffstat.1 2010-07-16 09:58:01.000000000 +0000 +++ diffstat-1.54/diffstat.1 2010-10-10 17:13:40.000000000 +0000 @@ -18,7 +18,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR * .\" IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * .\"***************************************************************************** -.\" $Id: diffstat.1,v 1.28 2010/07/16 09:58:01 tom Exp $ +.\" $Id: diffstat.1,v 1.29 2010/10/10 17:13:40 Solar.Designer Exp $ .TH DIFFSTAT 1 .SH NAME \fBdiffstat\fP \- make histogram from diff-output @@ -226,7 +226,7 @@ to approximate modified lines for the \fB\-m\fP option. .SH SEE ALSO .PP -diff (1). +.BR diff (1). .SH AUTHOR .PP Thomas Dickey . diff -Nru diffstat-1.53/diffstat.c diffstat-1.54/diffstat.c --- diffstat-1.53/diffstat.c 2010-07-19 09:49:21.000000000 +0000 +++ diffstat-1.54/diffstat.c 2010-10-10 21:38:34.000000000 +0000 @@ -20,7 +20,7 @@ ******************************************************************************/ #ifndef NO_IDENT -static const char *Id = "$Id: diffstat.c,v 1.53 2010/07/19 09:49:21 tom Exp $"; +static const char *Id = "$Id: diffstat.c,v 1.54 2010/10/10 21:38:34 tom Exp $"; #endif /* @@ -28,6 +28,10 @@ * Author: T.E.Dickey * Created: 02 Feb 1992 * Modified: + * 10 Oct 2010, correct display of new files when -S/-D options + * are used. Remove the temporary directory on + * error, introduced in 1.48+ (patch by Solaris + * Designer). * 19 Jul 2010, add missing "break" statement which left "-c" * option falling-through into "-C". * 16 Jul 2010, configure "xz" path explicitly, in case lzcat @@ -911,7 +915,40 @@ int ch; if ((filename = malloc(want)) != 0) { - sprintf(filename, "%s/%s", path_opt, filetail); + int merge = 0; + + if (path_dest) { + size_t path_len = strlen(path_opt); + size_t tail_len; + char *tail_sep = strchr(filetail, PATHSEP); + + if (tail_sep != 0) { + tail_len = (size_t) (tail_sep - filetail); + if (tail_len != 0 && tail_len <= path_len) { + if (tail_len < path_len + && path_opt[path_len - tail_len - 1] != PATHSEP) { + merge = 0; + } else if (!strncmp(path_opt + path_len - tail_len, + filetail, + tail_len - 1)) { + merge = 1; + if (path_len > tail_len) { + sprintf(filename, "%.*s%c%s", + (int) (path_len - tail_len), + path_opt, + PATHSEP, + filetail); + } else { + strcpy(filename, filetail); + } + } + } + } + } + if (!merge) { + sprintf(filename, "%s%c%s", path_opt, PATHSEP, filetail); + } + TRACE(("count_lines %s\n", filename)); if ((fp = fopen(filename, "r")) != 0) { result = 0; @@ -1259,7 +1296,7 @@ case 'd': /* diff command trace */ CASE_TRACE(); if (match(buffer, "diff ") - && *(s = skip_options(buffer + 5)) != '\0') { + && *skip_options(buffer + 5) != '\0') { s = strrchr(buffer, BLANK); s = skip_blanks(s); dequote(s); @@ -1776,12 +1813,10 @@ if (count >= 0) { EqlOf(p) = count - ModOf(p); - if (path_dest) { + if (path_dest != 0) { EqlOf(p) -= InsOf(p); - InsOf(p) = 0; } else { EqlOf(p) -= DelOf(p); - DelOf(p) = 0; } if (EqlOf(p) < 0) EqlOf(p) = 0; @@ -1988,7 +2023,13 @@ } else { free(result); result = 0; + rmdir(*dirpath); /* Assume that the /stdin file was not created */ + free(*dirpath); + *dirpath = 0; } + } else { + free(*dirpath); + *dirpath = 0; } return result; } @@ -2299,7 +2340,11 @@ free(command); unlink(myfile); + free(myfile); + myfile = 0; rmdir(stdin_dir); + free(stdin_dir); + stdin_dir = 0; } else if (which != dcEmpty) #endif do_file(stdin, "stdin"); diff -Nru diffstat-1.53/package/debian/changelog diffstat-1.54/package/debian/changelog --- diffstat-1.53/package/debian/changelog 2010-07-19 09:51:36.000000000 +0000 +++ diffstat-1.54/package/debian/changelog 2010-10-10 23:09:59.000000000 +0000 @@ -1,3 +1,10 @@ +diffstat (1.54) unstable; urgency=low + + * Fix counts for -S/-D options. + * change source format to native. + + -- Thomas E. Dickey Sun, 10 Oct 2010 14:13:13 -0400 + diffstat (1.53) unstable; urgency=low * Fix regression in "-c" option. diff -Nru diffstat-1.53/package/debian/source/format diffstat-1.54/package/debian/source/format --- diffstat-1.53/package/debian/source/format 2010-01-01 16:39:30.000000000 +0000 +++ diffstat-1.54/package/debian/source/format 2010-10-10 23:05:32.000000000 +0000 @@ -1 +1 @@ -3.0 (quilt) +3.0 (native) diff -Nru diffstat-1.53/package/diffstat.spec diffstat-1.54/package/diffstat.spec --- diffstat-1.53/package/diffstat.spec 2010-07-19 09:50:47.000000000 +0000 +++ diffstat-1.54/package/diffstat.spec 2010-10-10 18:09:56.000000000 +0000 @@ -1,7 +1,7 @@ Summary: diffstat - make histogram from diff-output %define AppProgram diffstat -%define AppVersion 1.53 -# $XTermId: diffstat.spec,v 1.2 2010/07/19 09:50:47 tom Exp $ +%define AppVersion 1.54 +# $XTermId: diffstat.spec,v 1.3 2010/10/10 18:09:56 tom Exp $ Name: %{AppProgram} Version: %{AppVersion} Release: 1