From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Mon, 26 Feb 2007 14:12:24 -0600 Subject: [U-Boot-Users] Submitting patches In-Reply-To: <528646bc0702261206h69e69da4udf2698740c6676f5@mail.gmail.com> References: <131AF8573CF31945B5B11E4201D3F1E142BB34@mail3.Avidyne.com> <45E3351F.1000809@freescale.com> <528646bc0702261206h69e69da4udf2698740c6676f5@mail.gmail.com> Message-ID: <45E33F28.2040408@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Grant Likely wrote: > I had a double take when I read this; I assume you're talking about > the commit log at the top of the patch file, and your not talking > about including modifications to the CHANGELOG file. Correct? Yes, don't touch the CHANGELOG file - that gets automatically updated by WD. When you create the patch with git-format-patch, you need to edit that patchfile and insert a changelog description before sending it. This script can make your life easier: #!/bin/sh CHANGELOG=git-changelog.txt COMMENT=git-comment.txt # Check to see if your version of git-diff supports --ignore-space-at-eol if [ "`git-diff --ignore-space-at-eol --name-only -p HEAD | grep \"$usage: git-diff\"`" == "" ] then IGNOREEOL=--ignore-space-at-eol fi function catfile() { count=0 while read line do let count++ lines[$count]="$line" done < $1 firstline=1 lastline=$count while [ "${lines[$firstline]}" == "" ] do let firstline++ done while [ "${lines[$lastline]}" == "" ] do let lastline-- done i=$firstline while [ $i -le $lastline ] do echo "${lines[$i]}" let i++ done } if [ "$1" == "" ] then echo "Usage: $0 \"git-commit-comment-in-quotes\"" exit fi echo "Commiting these files:" FILES=`git-diff-index --name-only -p HEAD` # We always update the index, because having it not updated is just confusing git-update-index $FILES ls -1 $FILES # Also display a list of diffs with extra spaces git-diff-index --check -p HEAD echo "Ready?" read line git-commit -a -m "$1" PATCHFILE=`git-format-patch -s $IGNOREEOL HEAD^ ` # If a changelog or comment file exists, then insert it if [ -r $CHANGELOG -o -r $COMMENT ] then rm -f /tmp/$PATCHFILE IFS="" while read line do echo "$line" >> /tmp/$PATCHFILE if [ "${line:0:9}" == "Subject: " ] then if [ -r $CHANGELOG ] then echo "" >> /tmp/$PATCHFILE catfile $CHANGELOG >> /tmp/$PATCHFILE echo "" >> /tmp/$PATCHFILE fi fi if [ "$line" == "---" ] then if [ -r $COMMENT ] then echo "" >> /tmp/$PATCHFILE catfile $COMMENT >> /tmp/$PATCHFILE echo "" >> /tmp/$PATCHFILE fi fi done < $PATCHFILE mv -f /tmp/$PATCHFILE $PATCHFILE fi echo "Created patchfile $PATCHFILE" -- Timur Tabi Linux Kernel Developer @ Freescale