From: Mario Lang <mlang@teleweb.at>
To: blinux-list@redhat.com
Subject: diff and patch Was: Re: need help with yasr patch
Date: Fri, 23 May 2003 12:58:07 +0200 [thread overview]
Message-ID: <87n0hec4lc.fsf@lexx.delysid.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0305221040360.2631-100000@maranatha.chartermi.net> (Cheryl Homiak's message of "Thu, 22 May 2003 11:03:38 -0500 (CDT)")
Cheryl Homiak <chomiak@chartermi.net> writes:
> Just be sure you cut it off at the right place when you edited it out of the
> email.
Tip of the day: patch is smart enough to detect if
you got extra, irrelevant, lines of text in your patch file.
So usually, you should be able to just save the mail, and apply
it, as long as the patch wasn't base64 encoded or something like that.
Looking at "cvs diff" output is an example for that. cvs outputs
additional lines of information about the patch, which are not
part of a normal diff file. patch happily ignores those without the need
to manually edit the diff, or filter it in some way.
Another related trick is executable patch files. Since
patch ignores irrelevant, non-diff text lines, you can begin
your patch file like
#!/bin/sh
and write a little interactive script which applies "patch" on itself,
something like
patch -p1 <$0
This way you can put safety checks in your patch to avoid
common user errors. You just need to set the executable bit
on your patch file, and off you go.
--
CYa,
Mario | Debian Developer <URL:http://debian.org/>
| Get my public key via finger mlang@db.debian.org
| 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44
prev parent reply other threads:[~ UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
jude dashiell
` Cheryl Homiak
` jude dashiell
` Mike Gorse
` Cheryl Homiak
` Cheryl Homiak
` jude dashiell
` Mario Lang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87n0hec4lc.fsf@lexx.delysid.org \
--to=mlang@teleweb.at \
--cc=blinux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).