Commit 0ee6b03
authored
patch: raise error for incompatible format options
* The Getopt library makes the original order of options invisible, i.e. we can't tell if -e comes before or after -c
* By default, patch attempts to guess the type of the input diff
* Options -c, -e, -n & -u direct the program to look for a certain diff format
* Specifying -c and -e results in undefined behaviour in this version so raise an error
* In GNU patch, the order of -c and -e matters, i.e. -e will win if it appears after -c
* type_conflict() function will print the long-option names of the conflicting diff types1 parent 26ba18f commit 0ee6b03
1 file changed
+18
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
43 | 57 | | |
44 | 58 | | |
45 | 59 | | |
| |||
76 | 90 | | |
77 | 91 | | |
78 | 92 | | |
79 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
80 | 96 | | |
81 | 97 | | |
82 | 98 | | |
| |||
0 commit comments