[darcs-users] darcs patch: Add Patch-salt as ignored prefix
zooko at zooko.com
Wed Oct 8 13:03:49 UTC 2008
On Oct 8, 2008, at 3:10 AM, Eric Kow wrote:
>> obnoxiously named Ignore-this-patch-salt:, with future additions
>> like Ignore-this-hash-signature:,
>> Ignore-this-<mytool>-<my>-<fancy>-<metadata>:, etc.
> I'd like us to make a decision on this by tomorrow if possible.
> Is Tommy's "obnoxious" idea acceptable to everyone?
The thing I'm worried about is someone writing "Ignore-this-part:
this patch is a really important change to X functionality, but you
can ignore it if you are just looking at Y functionality. Thanks",
and then having that line disappear from their patch comment.
It would be really nice if there were an unambiguous encoding so that
no patch comment could be misinterpreted by darcs as an "ignore this"
There is a way to make this true: define an unambiguous encoding.
For example: make it so that darcs always appends the following to
the end of the patch comment: "Ignore-this-count-of-entries-to-
ignore: 1". If someone writes a line of comment such as the above
that superficially looks like an "Ignore-this", then it will *not*
get hidden, because darcs will have appended "Ignore-this-count-of-
entries-to-ignore: 1" to the comment when producing the patch, and so
when displaying the patch darcs will see that only one (the Ignore-
this-count-of-entries-to-ignore itself) should be hidden, and it will
not hide the other one.
The key thing that makes this unambiguous is that darcs itself
appends the "Ignore-this-count-of-entries-to-ignore:" field, so it is
impossible for a user or a program invoking darcs to generate a patch
comment which would be misinterpreted as containing Ignore-this
fields that it shouldn't.
(This is the difference between "in-band" vs. "out-of-band"
signalling, or between ambiguous and unambiguous encoding.)
http://allmydata.org -- Tahoe, the Least-Authority Filesystem
http://allmydata.com -- back up all your files for $5/month
More information about the darcs-users