File: diffstat.1

package info (click to toggle)
diffstat 1.39-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 532 kB
  • ctags: 120
  • sloc: sh: 2,769; ansic: 1,102; makefile: 130
file content (119 lines) | stat: -rw-r--r-- 4,456 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
.\"*****************************************************************************
.\" Copyright 1994-2003,2004 by Thomas E. Dickey                               *
.\" All Rights Reserved.                                                       *
.\"                                                                            *
.\" Permission to use, copy, modify, and distribute this software and its      *
.\" documentation for any purpose and without fee is hereby granted, provided  *
.\" that the above copyright notice appear in all copies and that both that    *
.\" copyright notice and this permission notice appear in supporting           *
.\" documentation, and that the name of the above listed copyright holder(s)   *
.\" not be used in advertising or publicity pertaining to distribution of the  *
.\" software without specific, written prior permission.                       *
.\"                                                                            *
.\" THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD   *
.\" TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND  *
.\" FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE  *
.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES          *
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN      *
.\" 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.16 2004/11/09 01:53:01 tom Exp $
.TH DIFFSTAT 1
.SH NAME
\fBdiffstat\fP \- make histogram from diff-output
.SH SYNOPSIS
\fBdiffstat\fP\fI [options] [file-specifications]\fP
.SH DESCRIPTION
This program reads the output of \fBdiff\fP and displays a histogram
of the insertions, deletions, and modifications per-file.
Diffstat is a program that is useful for reviewing large, complex patch files.
It reads from one or more input files which contain output from \fBdiff\fP,
producing a histogram of the total lines changed for each file referenced.
If the input filename ends with .bz2, .Z or .gz, diffstat will read the
uncompressed data via a pipe.
.PP
Diffstat recognizes the most popular types of output from diff:
.RS
.TP
unified
preferred by the \fBpatch\fP utility.
.TP
context
best for readability, but not very compact.
.TP
default
not good for much, but simple to generate.
.RE
.PP
\fBDiffstat\fP detects the lines that are output by \fBdiff\fP to
tell which files are compared, and then counts the markers in the
first column that denote the type of change (insertion, deletion
or modification).
These are shown in the histogram as "+", "-" and "!" characters.
.PP
If no filename is given on the command line,
\fBdiffstat\fP reads the differences from the standard input.
.SH OPTIONS
.TP
.B -c
prefix each line of output with "#", making it a comment-line for shell
scripts.
.TP
.BI -e " file"
redirect standard error to \fIfile\fR.
.TP
.BI -f " format"
specify 0 for concise, 1 for normal output.
.TP
.B -h
prints the usage message and exits.
.TP
.B -k
suppress the merging of filenames in the report.
.TP
.BI -n " number"
specify the minimum width used for filenames.
If you don't specify this, \fBdiffstat\fP uses the length of the longest
filename, after stripping common prefixes.
.TP
.BI -o " file"
redirect standard output to \fIfile\fR.
.TP
.BI -p " number"
override the logic that strips common pathnames, simulating the \fBpatch\fP
"-p" option.
.TP
.B -u
suppress the sorting of filenames in the report.
.TP
.B -v
show progress,
e.g., if the output is redirected to a file,
write progress messages to the standard error.
.TP
.B -V
prints the current version number and exits.
.TP
.BI -w " number"
specify the maximum width of the histogram.
The plot will never be shorter than 10 columns, just in case
the filenames get too large.
.SH ENVIRONMENT
.PP
\fBDiffstat\fP runs in a portable UNIX\*R environment.
.SH FILES
.PP
\fBDiffstat\fP is a single binary module, which uses no auxiliary files.
.SH BUGS
.PP
\fBDiffstat\fP makes a lot of assumptions about the format of a \fBdiff\fP file.
.PP
There's no easy way to determine the degree of overlap between the
"before" and "after" displays of modified lines.
.SH SEE ALSO
.PP
diff (1).
.SH AUTHOR
.PP
Thomas Dickey <dickey@invisible-island.net>.