Feature request: Add 'Generated-by header' to diff output

Jari Aalto jari.aalto at cante.net
Sun Aug 5 23:33:30 BST 2007


Consider typical bzr diff output:

    === added file 'Makefile'
    --- Makefile    1970-01-01 00:00:00 +0000
    +++ Makefile    2007-08-05 21:38:10 +0000

I propose that a "header" is added to the beginning of diff
to announce that this diff/patch was generated byg bzr:

    Generated-by: bazaar 0.18
    === added file 'Makefile'
    --- Makefile    1970-01-01 00:00:00 +0000
    +++ Makefile    2007-08-05 21:38:10 +0000

I assume here that patch(1) will skip over the added 1st line.

REASONING

I use a tool that deal with various version control sources and
sometimes there is need to detect from which source certain patch
comes from. E.g. Mercurial uses extra pseudo directories in output:

    --- a/Makefile.in       Sun Aug 05 20:45:37 2007 +0300
    +++ b/Makefile.in       Sun Aug 05 23:55:17 2007 +0300

For a tool, it is most difficult to tell if "a/" is genuine directory
or not and if --strip option would be needed or not during patching.

Having a separate header would simplify auto-detecting things. And
make bzr more know when patches start circulate :-)

Jari




More information about the bazaar mailing list