File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -314,23 +314,28 @@ do_next () {
314
314
315
315
mark_action_done
316
316
make_squash_message $sha1 > " $MSG "
317
+ failed=f
318
+ author_script=$( get_author_ident_from_commit HEAD)
319
+ output git reset --soft HEAD^
320
+ pick_one -n $sha1 || failed=t
317
321
case " $( peek_next_command) " in
318
322
squash|s)
319
323
EDIT_COMMIT=
320
324
USE_OUTPUT=output
325
+ MSG_OPT=-F
326
+ MSG_FILE=" $MSG "
321
327
cp " $MSG " " $SQUASH_MSG "
322
328
;;
323
329
* )
324
330
EDIT_COMMIT=-e
325
331
USE_OUTPUT=
332
+ MSG_OPT=
333
+ MSG_FILE=
326
334
rm -f " $SQUASH_MSG " || exit
335
+ cp " $MSG " " $GIT_DIR " /SQUASH_MSG
336
+ rm -f " $GIT_DIR " /MERGE_MSG || exit
327
337
;;
328
338
esac
329
-
330
- failed=f
331
- author_script=$( get_author_ident_from_commit HEAD)
332
- output git reset --soft HEAD^
333
- pick_one -n $sha1 || failed=t
334
339
echo " $author_script " > " $DOTEST " /author-script
335
340
if test $failed = f
336
341
then
@@ -339,7 +344,7 @@ do_next () {
339
344
GIT_AUTHOR_NAME=" $GIT_AUTHOR_NAME " \
340
345
GIT_AUTHOR_EMAIL=" $GIT_AUTHOR_EMAIL " \
341
346
GIT_AUTHOR_DATE=" $GIT_AUTHOR_DATE " \
342
- $USE_OUTPUT git commit --no-verify -F " $MSG " $EDIT_COMMIT || failed=t
347
+ $USE_OUTPUT git commit --no-verify $MSG_OPT " $MSG_FILE " $EDIT_COMMIT || failed=t
343
348
fi
344
349
if test $failed = t
345
350
then
You can’t perform that action at this time.
0 commit comments