Skip to contentSkip to conversation

libxfs-apply: use git am instead of patch

PATCH In review Christoph Hellwig 2 participants 2 messages May 10, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxfs-apply: use git am instead of patch

If neither guilt or stgit are used default to git am instead of patch so that all the commit information is properly propagated.

---
 tools/libxfs-apply | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/libxfs-apply +2 -2
index deb9c225..3258272d 100755
@@ -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
 
Signature · 1 line
2.26.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Christoph Hellwig

If neither guilt or stgit are used default to git am instead of patch so that all the commit information is properly propagated.

Looks good to me.

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

Quoted 9 lines
---
 tools/libxfs-apply | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/libxfs-apply +0 -0
index deb9c225..3258272d 100755

tools/libxfs-apply apply_patch() · line 400

Quoted 8 lines
tools/libxfs-apply +2 -2
@@ -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* ;)

Quoted 3 lines
tools/libxfs-apply +0 -0
 	fi