Trying It
| ←Older revision | Revision as of 06:24, 21 January 2026 | ||
| Line 53: | Line 53: | ||
The '''-p''' argument is very important. Without it [[patch]] command doesn't know how to interpret the header and locate the ''Channel.java'' file. In such case the [[patch]] command switches to interactive mode - which is quite annoying (but it shows how old the [[patch]] command is - it comes from ages when interactions with user were happening in terminal and not a [[GUI]]). Using '''-p''' argument avoids the interactivity. | The '''-p''' argument is very important. Without it [[patch]] command doesn't know how to interpret the header and locate the ''Channel.java'' file. In such case the [[patch]] command switches to interactive mode - which is quite annoying (but it shows how old the [[patch]] command is - it comes from ages when interactions with user were happening in terminal and not a [[GUI]]). Using '''-p''' argument avoids the interactivity. | ||
| + | |||
| + | With '''-p0''' the above patch seeks for ''channels/Channel.java'' file. One can use '''-p1''' to instruct [[patch]] utility to strip one level from the specified directories. Then the utility would be looking for ''Channel.java'' file only. By default use '''-p1''' for diffs generated by [[git]] '''diff''' command. | ||
=== Pipe It! === | === Pipe It! === | ||