Writing patches for git-ignored files

Christian Lohmaier lohmaier+libreoffice at googlemail.com
Sat Feb 18 03:33:54 PST 2012


Hi Wei Ming, *,

On Sat, Feb 18, 2012 at 11:36 AM, Khoo Wei Ming <weimzz at gmail.com> wrote:
> I followed the patching guidelines on
>
> http://wiki.documentfoundation.org/Development/Patch_Handling_Guidelines
>
> What is procedure for git-ignored files? E.g.
>
> ~/libo-git/moz$ git add
> unxlngi6.pro/misc/build/mozilla/xpcom/glue/nsBaseHashtable.h

You really should not add a file from the output trees. What ends up
in unxlngi6.pro is already a processed result, not the actual source.

To create patches for external modules that get build as part of
building LibreOffice, use

* "dmake patch" to unpack the sources and apply already existing patches,
* do your changes to the file
* use "dmake create_patch" to create a patch to be included into the
makefile (rename it to a descriptive name and add it to PATCH_FILES

If it is meant as a correction to an already existing patch, please
use solenv/bin/patch_sanitizer.pl to reduce noise between the old and
new version of the patch.

(with new build system you use something like
make cmd="dmake patch"
previously you had to source the Environment file, but that was
integrated to a config.mk)

> The following paths are ignored by one of your .gitignore files:
> moz/unxlngi6.pro
> Use -f if you really want to add them.
> fatal: no files added
>
> I'm assuming the '-f' option isn't the answer.

Indeed. You don't add the file, but you need to create a patch that
will be applied before building that module as described above.

ciao
Christian


More information about the LibreOffice mailing list