xfsprogs: new libxfs-apply option for Signed-off-by: tag
PATCH 1/1 xfsprogs: new libxfs-apply option for Signed-off-by: tag
Technically when a maintainer moves a patch from another project, they should add their Signed-off-by: tag. Add an option to libxfs-apply to make that easy when cross-porting libxfs patches.
---
tools/libxfs-apply +10 -1
@@ -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,14 @@ 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 + fi + # now output the new patch cat $_hdr.new $_diff
Quoted 22 lines · Eric Sandeen
Technically when a maintainer moves a patch from another project, they should add their Signed-off-by: tag. Add an option to libxfs-apply to make that easy when cross-porting libxfs patches.
Signed-off-by Eric Sandeen <[email protected]>---
tools/libxfs-apply +1
-1@@ -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."
tools/libxfs-apply while [ $# -gt 0 ]; do · line 76
Quoted 4 lines
tools/libxfs-apply +1
-0@@ -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 ;;
I wonder, under what circumstances does the user /not/ want to have their S-o-b added to the commit? It seems to me that this ought to be the default, since the $maintainer is importing code from another libxfs, which (to me anyway) doesn't seem all that different from pulling in regular patches from the mailing list or wherever.
Second, can we just pull the name and email from the output of git config --get user.{name,email} unless the user explicitly provided a sob line?
Quoted 4 lines
tools/libxfs-apply +0
-0--verbose) VERBOSE=true ;; *) usage ;; esac
tools/libxfs-apply fixup_header_format() · line 284
Quoted 10 lines
tools/libxfs-apply +7
-0@@ -274,6 +275,14 @@ 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 + fi
Third, we could detect that the patch already has the particular S-o-b that we'd be adding here, and avoid adding a duplicate.
--D
Quoted 9 lines
tools/libxfs-apply +1
-1+ # now output the new patch cat $_hdr.new $_diff --To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 34 lines · Darrick J. Wong
Quoted 22 lines · Eric Sandeen
Technically when a maintainer moves a patch from another project, they should add their Signed-off-by: tag. Add an option to libxfs-apply to make that easy when cross-porting libxfs patches.
Signed-off-by Eric Sandeen <[email protected]>---
tools/libxfs-apply +1
-1@@ -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."tools/libxfs-apply while [ $# -gt 0 ]; do · line 76
Quoted 4 lines
tools/libxfs-apply +1
-0@@ -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 ;;I wonder, under what circumstances does the user /not/ want to have their S-o-b added to the commit? It seems to me that this ought to be the default, since the $maintainer is importing code from another libxfs, which (to me anyway) doesn't seem all that different from pulling in regular patches from the mailing list or wherever.
Quoted 3 lines
Second, can we just pull the name and email from the output of git config --get user.{name,email} unless the user explicitly provided a sob line?
<shakes fist>
yes that's a good idea :)
Quoted 7 lines
Quoted 7 lines
tools/libxfs-apply +0
-0--verbose) VERBOSE=true ;; *) usage ;; esac@@ -274,6 +275,14 @@ fixup_header_format() print $0 }' > $_hdr.new
Quoted 10 lines
tools/libxfs-apply fixup_header_format() · line 284
Quoted 7 lines
tools/libxfs-apply +7
-0+ # 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 + fiThird, we could detect that the patch already has the particular S-o-b that we'd be adding here, and avoid adding a duplicate.
hm. well, I /always/ add mine at the end when I merge it. So even if it's like this in the kernel:
if Bob commits it to userspace, I'd still suggest that we should end up with:
because it got moved again...
Quoted 11 lines
--D
Quoted 9 lines
tools/libxfs-apply +1
-1+ # now output the new patch cat $_hdr.new $_diff --To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html