Skip to contentSkip to conversation

support git am in tools/libxfs-apply

RFC In review Christoph Hellwig 2 participants 2 messages May 9, 2020

lore
Share & tools
lore
#0 lore raw

RFC 1/1 support git am in tools/libxfs-apply

Here is my local hack for using git am in tools/libxfs-apply. What would be the best way to integrate it for real?

---
 tools/libxfs-apply | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxfs-apply +1 -1
index deb9c225..923dc10f 100755
@@ -396,7 +396,7 @@ apply_patch()
 		fi
 	else
 		echo "Applying with patch utility:"
-		patch -p1 < $_new_patch.2
+		git am -s $_new_patch.2
 		echo "Patch was applied in $REPO; check for rejects, etc"
 	fi
 
Signature · 1 line
2.26.2
#1 lore raw
Quoted 2 lines · Christoph Hellwig

Here is my local hack for using git am in tools/libxfs-apply. What would be the best way to integrate it for real?

I only use the tool in a guilt environment so this "else" doesn't matter too much to me. :)

but I'm not sure who would ever want a bare "patch," since iterating over libxfs commits would just pile patch upon patch, and IMHO git am makes much more sense (other than the tight fuzz restrictions of git-am?)

so maybe this is the right solution, not a hack, other than also changing the echoed messages as well.

-Eric

Quoted 18 lines
---
 tools/libxfs-apply | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxfs-apply +1 -1
index deb9c225..923dc10f 100755
@@ -396,7 +396,7 @@ apply_patch()
 		fi
 	else
 		echo "Applying with patch utility:"
-		patch -p1 < $_new_patch.2
+		git am -s $_new_patch.2
 		echo "Patch was applied in $REPO; check for rejects, etc"
 	fi