]> Sergey Matveev's repositories - public-inbox.git/blob - Documentation/lei-rediff.pod
4d5e8168bb38ed7491efb6199cf564e326c26566
[public-inbox.git] / Documentation / lei-rediff.pod
1 =head1 NAME
2
3 lei-rediff - regenerate a diff with different options
4
5 =head1 SYNOPSIS
6
7 lei rediff [OPTIONS] LOCATION [LOCATION...]
8
9 lei rediff [OPTIONS] (--stdin|-)
10
11 =head1 DESCRIPTION
12
13 Read a message from C<LOCATION> or stdin and regenerate its diff with
14 the specified L<git-diff(1)> options.  This is useful if you want to
15 change the display of the original patch (e.g., increasing context,
16 coloring moved lines differently, or using an external diff viewer).
17
18 It relies on the contents of the .git directory of your current
19 project working tree.  In other words, it works anywhere
20 L<git-am(1)> works.  Otherwise, C<--git-dir=> may be specified
21 any number of times to add repositories to build blob data from.
22
23 =head1 OPTIONS
24
25 In addition to many L<git-diff(1)> options (e.g. C<-W>, C<-w>,
26 C<-U $LINES>) the following options are supported:
27
28 =over
29
30 =item --stdin
31
32 Read message from stdin.  This is implicit if no arguments are given
33 and stdin is a pipe or regular file.
34
35 For users of text editors and pagers capable of piping its
36 buffer to arbitrary commands, it is useful to pipe a patch email
37 to C<lei rediff> before piping it to L<git-am(1)>.  The output
38 of C<lei rediff> is compatible with C<git am> if its input was a
39 patch email.
40
41 =item --drq[=COUNT]
42
43 De-Re-Quote.  De-quotes the input and re-quotes (the output).
44 Removes COUNT levels of C<E<gt> > email reply prefixes and
45 re-adds them upon regenerating the diff.
46
47 This switch is intended as a convenience for running inside a
48 pipe-capable text editor when writing replies to a patch email.
49 Note: this may over-add C<E<gt> > prefixes if some input lines
50 are missing C<E<gt> > prefixes.
51
52 COUNT is 1 if unspecified; in other words, C<--drq=1> and
53 C<--drq> are equivalent.
54
55 It implies L</--quiet> unless L</--verbose> is specified
56 since text editors tend to combine stderr with stdout.
57
58 =item --dequote-only[=COUNT]
59
60 Like L</--drq>, but does not re-add quote prefixes to the output.
61
62 This can be useful for feeding a hunk to L<git-apply(1)>
63 or L<patch(1)> while writing a reply or further processing
64 by another diff viewer.
65
66 Unlike L</--drq>, it does NOT imply L</--quiet>.
67
68 =item --git-dir=DIR
69
70 Specify an additional .git/ directory to scan.  This option may be
71 given multiple times.
72
73 Default: the output of C<git rev-parse --git-dir>
74
75 =item --no-cwd
76
77 Do not look in the git repository of the current working directory.
78
79 =item -q
80
81 =item --quiet
82
83 Suppress progress output.
84
85 =item -v
86
87 =item --verbose
88
89 Provide more feedback on stderr.
90
91 =back
92
93 The options below, described in L<lei-q(1)>, are also supported.
94
95 =over
96
97 =item --[no-]remote
98
99 =item --no-local
100
101 =item --no-external
102
103 =item --no-import-remote
104
105 =item --torsocks=auto|no|yes, --no-torsocks
106
107 =item --proxy=PROTO://HOST[:PORT]
108
109 =back
110
111 =head1 CONTACT
112
113 Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
114
115 The mail archives are hosted at L<https://public-inbox.org/meta/>
116 and L<http://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/>
117
118 =head1 COPYRIGHT
119
120 Copyright 2021 all contributors L<mailto:meta@public-inbox.org>
121
122 License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
123
124 =head1 SEE ALSO
125
126 L<lei-q(1)>, L<lei-blob(1)>, L<lei-p2q(1)>