Andy Parkins <andyparkins@xxxxxxxxx> writes: > If the series of patches you are applying via git-am was based in a > different directory there was no way to strip the directory (as you > would with git-apply). > > This patch adds a --patchdepth option to git-am.sh whose argument is > passed as a "-p" option to git-apply. > > Signed-off-by: Andy Parkins <andyparkins@xxxxxxxxx> > --- > I know git-apply isn't going anywhere, but git-applypatch is. However, all > this talk of it made me remember this patch. I do not understand this remark, as applypatch does not have -p either. If we were to do this, I agree with others that this should simply be called -p (we do not have name crash with existing options, do we?). I am not sure how useful applying a patch though git-am with -p would be. I can understand, After seeing that a patch does not apply because the patch was generated at the wrong level, it would be very natural to use "git apply -p0 --index .dotest/patch" and then continue with "git am --resolved". So obviously, -p to git-apply is very useful, but -p given to "am" means all of the patches in your mailbox has uniformly wrong patch depth. I wonder how common would that be in practice. But other than that "how useful would that be in practice?" issue, I do not think the patch is too bad, except one hunk: > @@ -389,12 +392,12 @@ do > fi > > echo > - echo "Applying '$SUBJECT'" > + echo "Applying '$SUBJECT' at depth $patchdepth" > echo > This is wrong if you do not use any $patchdepth. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html