[darcs-users] darcs patch: Add Patch-salt as ignored prefix

David Roundy droundy at darcs.net
Wed Oct 8 17:08:07 UTC 2008

On Wed, Oct 08, 2008 at 09:50:48AM -0400, Nathan Gray wrote:
> On Wed, Oct 08, 2008 at 07:25:49AM -0600, zooko wrote:
> > For example, let  
> > us require that the "Ignore-this-patch-salt: BLAHBLAHBLAH" field is  
> > always the last line of the patch comment, and that it gets hidden  
> > only if it is the last line and only if BLAHBLAHBLAH matches the  
> > pattern of a a hex encoded random string of the right length.
> This starts to sound scary when the user could cause their
> 'Ignore-this' line to get absorbed instead of the
> 'Ignore-this-patch-salt', just by putting theirs at the end of the
> comment:
>   Ignore-this-count-of-entries-to-ignore: 2
>   Ignore-this-patch-salt: BLAHBLAHBLAH
>   Ignore-this-my-own-metadata: this messes up the ordering
> I think the simplest solution is probably just to document what the
> 'Ignore-this' string is, and make sure it is not likely to be
> accidentally used.

I agree.  It's entirely reasonable for tools other than darcs to want
to add their own ignored data to darcs patches.  Another option would
be to check user comments for Ignore-this: strings and modify them
somewhat so they won't be ignored.  But personally, I think it's best
to just document it and let users create ignored information in their
patch logs.

Among other features, this would mean that tailor could encode useful
information in its patches by default in such a way that users didn't
get annoyed by it.  If we'd had this feature ages ago, more people
probably would have stuck with tailor's safe defaults rather than
corrupting their repositories.


More information about the darcs-users mailing list