From: Eric Sandeen <sandeen@sandeen.net>
To: Eric Sandeen <sandeen@redhat.com>, linux-xfs <linux-xfs@vger.kernel.org>
Subject: [PATCH 6/5] libxfs-apply: add Signed-off-by:
Date: Tue, 6 Mar 2018 17:24:16 -0600 [thread overview]
Message-ID: <12ef6721-1f1d-9dfa-507f-47e3d8143234@sandeen.net> (raw)
In-Reply-To: <d81cf576-6082-008b-761e-82c487e6a87a@redhat.com>
Technically when a maintainer moves a patch from another project,
they should add their Signed-off-by: tag. Pick up SOB info
from git-config, and add an option to override that value if
desired.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
--
diff --git a/tools/libxfs-apply b/tools/libxfs-apply
index e7d7e0a..2957fa0 100755
--- a/tools/libxfs-apply
+++ b/tools/libxfs-apply
@@ -8,7 +8,7 @@ usage()
echo $*
echo
echo "Usage:"
- echo " libxfs-apply [--verbose] --source <repodir> --commit <commit_id>"
+ echo " libxfs-apply [--verbose] [--sob <name/email>] --source <repodir> --commit <commit_id>"
echo " libxfs-apply --patch <patchfile>"
echo
echo "libxfs-apply should be run in the destination git repository."
@@ -73,6 +73,7 @@ while [ $# -gt 0 ]; do
--source) REPO=$2 ; shift ;;
--patch) PATCH=$2; shift ;;
--commit) COMMIT_ID=$2 ; shift ;;
+ --sob) SIGNED_OFF_BY=$2 ; shift ;;
--verbose) VERBOSE=true ;;
*) usage ;;
esac
@@ -274,6 +275,20 @@ fixup_header_format()
print $0
}' > $_hdr.new
+ # Remove the last line if it contains only whitespace
+ sed -i '${/^ *$/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
+ 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
+ fi
+ fi
+
# now output the new patch
cat $_hdr.new $_diff
next prev parent reply other threads:[~2018-03-06 23:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-06 21:52 [PATCH 0/5] xfsprogs: my very own patchbomb Eric Sandeen
2018-03-06 21:54 ` [PATCH 1/5] libxfs: Replace XFS_BUF_SET_PTR with xfs_buf_associate_memory Eric Sandeen
2018-03-06 22:57 ` Darrick J. Wong
2018-03-08 8:09 ` Christoph Hellwig
2018-03-06 21:54 ` [PATCH 2/5] libxfs: add function to free all buffers in bcache Eric Sandeen
2018-03-06 23:11 ` Darrick J. Wong
2018-03-08 8:11 ` Christoph Hellwig
2018-03-06 21:55 ` [PATCH 3/5] libxfs: move xfs_inode_zone to rdwr.c Eric Sandeen
2018-03-06 23:01 ` Darrick J. Wong
2018-03-08 8:12 ` Christoph Hellwig
2018-03-06 21:56 ` [PATCH 4/5] libxfs: Catch non-empty zones on destroy Eric Sandeen
2018-03-06 23:06 ` Darrick J. Wong
2018-03-06 23:25 ` Eric Sandeen
2018-03-06 23:37 ` [PATCH 4/5 V2] " Eric Sandeen
2018-03-06 23:39 ` Darrick J. Wong
2018-03-08 8:13 ` Christoph Hellwig
2018-03-06 21:56 ` [PATCH 5/5] Call libxfs_destroy from other utilities Eric Sandeen
2018-03-06 23:06 ` Darrick J. Wong
2018-03-08 8:13 ` Christoph Hellwig
2018-03-06 23:24 ` Eric Sandeen [this message]
2018-03-06 23:32 ` [PATCH 6/5] libxfs-apply: add Signed-off-by: Darrick J. Wong
2018-03-06 23:36 ` Eric Sandeen
2018-03-06 23:44 ` Darrick J. Wong
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=12ef6721-1f1d-9dfa-507f-47e3d8143234@sandeen.net \
--to=sandeen@sandeen.net \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.