[Libguestfs] [libnbd PATCH] maint: Suggest better diff output for API.ml

Eric Blake eblake at redhat.com
Fri Dec 3 14:44:03 UTC 2021


On Fri, Dec 03, 2021 at 08:35:18AM -0600, Eric Blake wrote:
> Git diff is able to customize the regex used to locate "function
> headers", or the text to output on @@ lines of a patch to make it
> easier to determine which portion of a file the patch touches.  This
> is done by coupling .gitattributes contents with the user running the
> right 'git config' command.  We don't have a bootstrap script, so we
> don't have an automated place to forcefully ensure the right setup for
> new contributors, but we can at least document the steps a developer
> can do to make our lives easier.
> 
> For the API.ml file, not only do we want to highlight typical
> top-level OCaml 'let' statements, we also want to highlight the start
> of each of our API definitions.
> 
> Thanks: Laszlo Ersek <lersek at redhat.com>
> ---
>  .gitattributes | 3 +++
>  README         | 4 ++++

Hmm. Should .gitattributes be included or excluded from a tarball?
It's odd to have the tarball mention a file that does not exist if you
aren't using git, but then again, the file has no use outside of git
development.  If we do want it in the tarball, it should probably
include a copyright blurb.  For comparison, .gitignore has no
copyright blurb, but IS included in our tarball (see
Makefile.am:EXTRA_DIST).

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org




More information about the Libguestfs mailing list