linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/5] libxfs-apply: don't add duplicate headers
Date: Wed, 25 Nov 2020 15:12:39 -0600	[thread overview]
Message-ID: <4bc2eb57-a5e8-59e5-9c69-0d8767df4796@sandeen.net> (raw)
In-Reply-To: <160633668210.634603.16132006317248436755.stgit@magnolia>

On 11/25/20 2:38 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> When we're backporting patches from libxfs, don't add a S-o-b header if
> there's already one at the end of the headers of the patch being ported.
> 
> That way, we avoid things like:
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

But it will still not add my additional SOB if I merge something across to
userspace that starts out with:

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

And I always felt like the committer should be adding their SOB to the end of
the chain when they move code from one place to another, especially if any
tweaks got made along the way.

IOWs I see the rationale for removing duplicate /sequential/ SOBs, but not
for removing duplicate SOBs in general.

Am I thinking about that wrong?

> ---
>  tools/libxfs-apply |   14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> 
> diff --git a/tools/libxfs-apply b/tools/libxfs-apply
> index 3258272d6189..9271db380198 100755
> --- a/tools/libxfs-apply
> +++ b/tools/libxfs-apply
> @@ -193,6 +193,14 @@ filter_xfsprogs_patch()
>  	rm -f $_libxfs_files
>  }
>  
> +add_header()
> +{
> +	local hdr="$1"
> +	local hdrfile="$2"
> +
> +	tail -n 1 "$hdrfile" | grep -q "^${hdr}$" || echo "$hdr" >> "$hdrfile"
> +}
> +
>  fixup_header_format()
>  {
>  	local _source=$1
> @@ -280,13 +288,13 @@ fixup_header_format()
>  	sed -i '${/^[[:space:]]*$/d;}' $_hdr.new
>  
>  	# Add Signed-off-by: header if specified
> -	if [ ! -z ${SIGNED_OFF_BY+x} ]; then 
> -		echo "Signed-off-by: $SIGNED_OFF_BY" >> $_hdr.new
> +	if [ ! -z ${SIGNED_OFF_BY+x} ]; then
> +		add_header "Signed-off-by: $SIGNED_OFF_BY" $_hdr.new
>  	else	# get it from git config if present
>  		SOB_NAME=`git config --get user.name`
>  		SOB_EMAIL=`git config --get user.email`
>  		if [ ! -z ${SOB_NAME+x} ]; then
> -			echo "Signed-off-by: $SOB_NAME <$SOB_EMAIL>" >> $_hdr.new
> +			add_header "Signed-off-by: $SOB_NAME <$SOB_EMAIL>" $_hdr.new
>  		fi
>  	fi
>  
> 

  reply	other threads:[~2020-11-25 21:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25 20:37 [PATCH v3 0/5] xfsprogs: fixes for 5.10-rc1 Darrick J. Wong
2020-11-25 20:38 ` [PATCH 1/5] libxfs-apply: don't add duplicate headers Darrick J. Wong
2020-11-25 21:12   ` Eric Sandeen [this message]
2020-11-30 17:13     ` Darrick J. Wong
2020-11-30 17:16       ` Eric Sandeen
2020-12-04 17:16   ` Eric Sandeen
2020-11-25 20:38 ` [PATCH 2/5] libxfs: fix weird comment Darrick J. Wong
2020-11-25 20:53   ` Eric Sandeen
2020-12-01 10:17   ` Christoph Hellwig
2020-11-25 20:38 ` [PATCH 3/5] libxfs: add realtime extent reservation and usage tracking to transactions Darrick J. Wong
2020-12-01 10:18   ` Christoph Hellwig
2020-11-25 20:38 ` [PATCH 4/5] debian: fix version in changelog Darrick J. Wong
2020-11-25 20:55   ` Eric Sandeen
2020-11-25 20:38 ` [PATCH 5/5] debian: add build dependency on libinih-dev Darrick J. Wong
2020-11-25 21:07   ` Eric Sandeen
2020-11-25 22:09   ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4bc2eb57-a5e8-59e5-9c69-0d8767df4796@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).