• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

tests/H30-Sep-2005-44,60240,067

CHANGELOGH A D30-Sep-2005735 1713

READMEH A D30-Sep-20052.9 KiB8254

mpH A D03-May-20225.7 KiB242209

qpH A D03-May-20226 KiB257224

rejH A D03-May-202228.7 KiB1,071887

runtests.shH A D03-May-2022300 1712

vimrcH A D30-Sep-2005892 1814

README

1
2rej tries to merge simple rejects and then run a merge program so the
3changes can be verified.  It is not meant to resolve complex problems
4that would not be immediately obvious to the programmer, the goal instead
5is to quickly fix the easy problems.
6
7rej understands both unified and context diffs.
8
9There are four basic rejects fixable via rej.
10
111) missing context at the top or bottom of the hunk
122) different context in the middle of the hunk
133) slightly different lines removed by the hunk than exist in the file
144) Large hunks that might apply if they were broken up into smaller ones.
15
16rej also allows you to tag hunks in a reject with special processing
17hints.  Those are defined in the HUNK HINTS section below.
18
19[ USAGE: ]
20
21rej filename filename.rej
22
23This will merge filename.rej into filename, and then start the default
24merge program (gvimdiff) to compare them.  Look at vimrc in this directory
25for vimdiff commands to copy chunks from one vimdiff window to another.
26
27rej -m kdiff3 filename filename.rej
28
29Same as above, but will use kdiff3 instead of gvimdiff.  Almost any
30merging program can be supplied to -m, vimdiff, kdiff3, meld and tkdiff
31have been tested.  Defining $REJMERGE in your environment will do the
32same as -m.
33
34rej -o output_file filename filename.rej
35
36-o skips the merge program and just stores the merged stream into output_file
37
38-a will turn on auto mode, which stores the merge stream directly back into
39filename.  filename.mergebackup is created with the old file contents.
40The merge program is run showing the differences between filename and
41filename.mergebackup.  Use this mode with caution.
42
43-c will turn on context mode, which prefers context from the reject file
44over context in the source.  This might make it more clear what the reject
45was trying to do, but will make the differences between the source file
46and the merge stream larger.
47
48-i enables interactive mode, which lets you repeat the merge over
49again after tweaking the source or reject file.  Type help for the
50various commands.
51
52-r opens the reject in $REJEDITOR or $EDITOR or gvim automatically
53
54There are few more options, see rej -h for the details.
55
56rej allows for some lazy typing.  "rej filename" will guess the name of
57the reject file.  "rej filename.rej" will guess the name of the source
58file.
59
60[ HUNK HINTS ]
61
62Hints allow you to specify special instructions for each hunk.  The
63hints are appended on the end of the first line of the hunk, using
64'###' as the control sequence that signals the start of the hint.
65
66Hints can be given in any order and should be separated by whitespace.  The
67supported hints are:
68
69only	-- process only this hunk, ignoring every other hunk
70last	-- stop processing after this hunk
71context	-- enable -c for this hunk only
72exclude	-- skip this hunk completely but continue processing others
73
74Example hinted unified hunk:
75
76@@ -2675,21 +2673,33 @@ static int foo( ### only context
77
78For context hunks:
79
80*** 961,971 **** ### exclude
81
82