poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/4] maint: Saner diff output


From: Jose E. Marchesi
Subject: Re: [PATCH 1/4] maint: Saner diff output
Date: Wed, 26 Feb 2020 10:58:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Eric.

    Gnulib's bootstrap script is already set up to prefer the use of
    git-merge-changelog as long as we hand-maintain that file (until we
    follow through with the thread of switching to gnulib's
    gitlog-to-changelog script to autogenerate ChangeLog from our git
    history).

I intend to switch to Siddesh's script soon, once we determine how well
it handles our codebase.  Since we use pretty standard GNU C, I don't
expect many difficulties there...
    
    Meanwhile, providing some hints to git makes our diff output easier to
    parse, with nicer chunk support for *.texi and with nicer overall
    patch ordering.
    
    * .gitattributes: New file.
    * etc/git.orderfile: New file.
    * bootstrap.conf (bootstrap_post_import_hook): Set it up.

This is OK for master.
Thanks!

    ---
     .gitattributes    |  4 ++++
     ChangeLog         |  7 +++++++
     bootstrap.conf    |  5 +++++
     etc/git.orderfile | 53 +++++++++++++++++++++++++++++++++++++++++++++++
     4 files changed, 69 insertions(+)
     create mode 100644 .gitattributes
     create mode 100644 etc/git.orderfile
    
    diff --git a/.gitattributes b/.gitattributes
    new file mode 100644
    index 00000000..68d2d121
    --- /dev/null
    +++ b/.gitattributes
    @@ -0,0 +1,4 @@
    +# See ./bootstrap for some helpful ~/.gitconfig or .git/config settings
    +# needed for using these attributes effectively.
    +ChangeLog merge=merge-changelog
    +*.texi* diff=texinfo
    diff --git a/ChangeLog b/ChangeLog
    index 67847c20..5797cb0f 100644
    --- a/ChangeLog
    +++ b/ChangeLog
    @@ -1,3 +1,10 @@
    +2020-02-25  Eric Blake  <address@hidden>
    +
    +   maint: Saner diff output
    +   * .gitattributes: New file.
    +   * etc/git.orderfile: New file.
    +   * bootstrap.conf (bootstrap_post_import_hook): Set it up.
    +
     2020-02-25  Eric Blake  <address@hidden>
    
        * .gitignore: Allow './configure -C'.
    diff --git a/bootstrap.conf b/bootstrap.conf
    index 2a3417e2..c9e959b1 100644
    --- a/bootstrap.conf
    +++ b/bootstrap.conf
    @@ -138,4 +138,9 @@ bootstrap_post_import_hook ()
       done
       IFS=$oIFS
       die 'Cannot find pkg.m4; perhaps you need to install pkg-config'
    +
    +  # Set up saner diff order
    +  if ! (git config --get diff.orderFile) >/dev/null 2>&1; then
    +     git config diff.orderFile etc/git.orderfile
    +  fi
     }
    diff --git a/etc/git.orderfile b/etc/git.orderfile
    new file mode 100644
    index 00000000..55db71ed
    --- /dev/null
    +++ b/etc/git.orderfile
    @@ -0,1 +1,54 @@
    +# Saner diff output for GNU poke
    +# Copyright (C) 2020 Eric Blake
    +
    +# This program is free software: you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation, either version 3 of the License, or
    +# (at your option) any later version.
    +#
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +#
    +# You should have received a copy of the GNU General Public License
    +# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    +
    +# You can use this to change the ordering of files within patches to
    +# make them easier to follow.
    +#
    +# Use:
    +#   git diff -O etc/git.orderfile
    +#
    +# Or make the change permanently by doing:
    +#   git config diff.orderFile etc/git.orderfile
    +
    +# Documentation.
    +docs/*
    +HACKING
    +NEWS
    +README
    +TODO
    +
    +# Build files.
    +configure.ac
    +Makefile.am
    +bootstrap.conf
    +build-aux/*
    +cfg.mk
    +m4/*
    +
    +# Source files.
    +src/*.h
    +src/*.c
    +src/*.pk
    +src/*
    +run.in
    +
    +# Pickle files.
    +pickles/*
    +
    +# Testsuite.
    +testsuite/*
    +
    +# Anything else last.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]