@@ -15,6 +15,7 @@ q,quiet be quiet
1515s,signoff add a Signed-off-by line to the commit message
1616u,utf8 recode into utf8 (default)
1717k,keep pass -k flag to git-mailinfo
18+ c,scissors strip everything before a scissors line
1819whitespace= pass it through git-apply
1920ignore-space-change pass it through git-apply
2021ignore-whitespace pass it through git-apply
@@ -288,7 +289,7 @@ split_patches () {
288289prec=4
289290dotest=" $GIT_DIR /rebase-apply"
290291sign= utf8=t keep= skip= interactive= resolved= rebasing= abort=
291- resolvemsg= resume=
292+ resolvemsg= resume= scissors=
292293git_apply_opt=
293294committer_date_is_author_date=
294295ignore_date=
310311 utf8= ;;
311312 -k|--keep)
312313 keep=t ;;
314+ -c|--scissors)
315+ scissors=t ;;
316+ --no-scissors)
317+ scissors=f ;;
313318 -r|--resolved)
314319 resolved=t ;;
315320 --skip)
316321 skip=t ;;
317322 --abort)
318323 abort=t ;;
319324 --rebasing)
320- rebasing=t threeway=t keep=t ;;
325+ rebasing=t threeway=t keep=t scissors=f ;;
321326 -d|--dotest)
322327 die " -d option is no longer supported. Do not use."
323328 ;;
@@ -435,14 +440,14 @@ else
435440
436441 split_patches " $@ "
437442
438- # -s, -u, -k, --whitespace, -3, -C, -q and -p flags are kept
439- # for the resuming session after a patch failure.
440- # -i can and must be given when resuming.
443+ # -i can and must be given when resuming; everything
444+ # else is kept
441445 echo " $git_apply_opt " > " $dotest /apply-opt"
442446 echo " $threeway " > " $dotest /threeway"
443447 echo " $sign " > " $dotest /sign"
444448 echo " $utf8 " > " $dotest /utf8"
445449 echo " $keep " > " $dotest /keep"
450+ echo " $scissors " > " $dotest /scissors"
446451 echo " $GIT_QUIET " > " $dotest /quiet"
447452 echo 1 > " $dotest /next"
448453 if test -n " $rebasing "
@@ -484,6 +489,12 @@ if test "$(cat "$dotest/keep")" = t
484489then
485490 keep=-k
486491fi
492+ case " $( cat " $dotest /scissors" ) " in
493+ t)
494+ scissors=--scissors ;;
495+ f)
496+ scissors=--no-scissors ;;
497+ esac
487498if test " $( cat " $dotest /quiet" ) " = t
488499then
489500 GIT_QUIET=t
538549 # by the user, or the user can tell us to do so by --resolved flag.
539550 case " $resume " in
540551 ' ' )
541- git mailinfo $keep $utf8 " $dotest /msg" " $dotest /patch" \
552+ git mailinfo $keep $scissors $ utf8 " $dotest /msg" " $dotest /patch" \
542553 < " $dotest /$msgnum " > " $dotest /info" ||
543554 stop_here $this
544555
0 commit comments