diff mbox series

libxfs-apply: use git am instead of patch

Message ID 20200510071455.986111-1-hch@lst.de (mailing list archive)
State Accepted
Headers show
Series libxfs-apply: use git am instead of patch | expand

Commit Message

Christoph Hellwig May 10, 2020, 7:14 a.m. UTC
If neither guilt or stgit are used default to git am instead of patch
so that all the commit information is properly propagated.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 tools/libxfs-apply | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Eric Sandeen May 10, 2020, 2:07 p.m. UTC | #1
On 5/10/20 2:14 AM, Christoph Hellwig wrote:
> If neither guilt or stgit are used default to git am instead of patch
> so that all the commit information is properly propagated.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Looks good to me.

Reviewed-by: Eric Sandeen <sandeen@sandeen.net>

reminds me I need to change the help to show that the signed off by cmdline option is optional....

> ---
>  tools/libxfs-apply | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/libxfs-apply b/tools/libxfs-apply
> index deb9c225..3258272d 100755
> --- a/tools/libxfs-apply
> +++ b/tools/libxfs-apply
> @@ -395,8 +395,8 @@ apply_patch()
>  			fi
>  		fi
>  	else
> -		echo "Applying with patch utility:"
> -		patch -p1 < $_new_patch.2
> +		echo "Applying with git am:"
> +		git am -s $_new_patch.2
>  		echo "Patch was applied in $REPO; check for rejects, etc"

I suppose git-am will already be pretty noisy if there are rejects but *shrug* ;)

>  	fi
>  
>
diff mbox series

Patch

diff --git a/tools/libxfs-apply b/tools/libxfs-apply
index deb9c225..3258272d 100755
--- a/tools/libxfs-apply
+++ b/tools/libxfs-apply
@@ -395,8 +395,8 @@  apply_patch()
 			fi
 		fi
 	else
-		echo "Applying with patch utility:"
-		patch -p1 < $_new_patch.2
+		echo "Applying with git am:"
+		git am -s $_new_patch.2
 		echo "Patch was applied in $REPO; check for rejects, etc"
 	fi