bug-gnulib
[Top][All Lists]
Advanced

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

Re: Mentions of GSS in gnulib.texi


From: Reuben Thomas
Subject: Re: Mentions of GSS in gnulib.texi
Date: Tue, 28 Sep 2010 18:19:03 +0100

On 26 September 2010 12:37, Simon Josefsson <address@hidden> wrote:
> Reuben Thomas <address@hidden> writes:
>
>> On 21 September 2010 21:51, Simon Josefsson <address@hidden> wrote:
>>> Thanks, applied.  I didn't see a patch for ChangeLog in there though?  I
>>> added it myself and pushed it separately.
>>
>> I used git format-patch, which seemed to put my ChangeLog entry at the
>> top. I see that that is not specifically a patch to ChangeLog, but I
>> guess it works better when the ChangeLog is generated rather than
>> maintained manually; can't it be applied anyway?
>
> Gnulib uses a manually updated ChangeLog, so you do need to write a
> ChangeLog entry manually, and include the patch to it in your git commit
> message.

Is there no way to extract the message from the message produced by
git format-patch?

For example, if I look at a typical patch file, it starts:

>From 5def4c0b997293ebdcd2e1b9268e613d2bac65cb Mon Sep 17 00:00:00 2001
From: Reuben Thomas <address@hidden>
Date: Tue, 21 Sep 2010 15:29:45 +0100
Subject: [PATCH 3/3] Manual: improve out-of-memory documentation.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

        * gnulib.texi: Rewrite “Out of memory handling” section to be
          about gnulib, not GSS.
---
 doc/gnulib.texi |   47 ++++++++++++++++++++++-------------------------
 1 files changed, 22 insertions(+), 25 deletions(-)

So, as a rough attempt:

#!/bin/sh
# git-format-patch-to-changelog
# Extract a changelog entry from a git format-patch file
GIT_PATCHFILE=$1
TEMPFILE=`mktemp`
agrep -d '^---' Subject $GIT_PATCHFILE > $TEMPFILE
echo `grep "^Subject:" $TEMPFILE | sed -e 's/.*\] //'`
grep -v "^[[:alpha:]]" $TEMPFILE

Or perhaps you have a better suggestion for integrating it into one's
git workflow in a way that one is prompted to write the ChangeLog
entry?

-- 
http://rrt.sc3d.org



reply via email to

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