am: return control to caller, for housekeeping
We only need to do these two tasks
git gc --auto
rm -fr "$dotest"
ourselves if the script was invoked as a standalone program; when
invoked with --rebasing (from git-rebase--am.sh), cascade control back
to the ultimate caller git-rebase.sh to do this for us.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
parent
f5f758a5df
commit
a1549e1049
|
|
@ -906,5 +906,10 @@ if test -s "$dotest"/rewritten; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -fr "$dotest"
|
# If am was called with --rebasing (from git-rebase--am), it's up to
|
||||||
git gc --auto
|
# the caller to take care of housekeeping.
|
||||||
|
if ! test -f "$dotest/rebasing"
|
||||||
|
then
|
||||||
|
rm -fr "$dotest"
|
||||||
|
git gc --auto
|
||||||
|
fi
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,12 @@ case "$action" in
|
||||||
continue)
|
continue)
|
||||||
git am --resolved --resolvemsg="$resolvemsg" &&
|
git am --resolved --resolvemsg="$resolvemsg" &&
|
||||||
move_to_original_branch
|
move_to_original_branch
|
||||||
exit
|
return
|
||||||
;;
|
;;
|
||||||
skip)
|
skip)
|
||||||
git am --skip --resolvemsg="$resolvemsg" &&
|
git am --skip --resolvemsg="$resolvemsg" &&
|
||||||
move_to_original_branch
|
move_to_original_branch
|
||||||
exit
|
return
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
@ -56,7 +56,7 @@ else
|
||||||
|
|
||||||
As a result, git cannot rebase them.
|
As a result, git cannot rebase them.
|
||||||
EOF
|
EOF
|
||||||
exit $?
|
return $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git am $git_am_opt --rebasing --resolvemsg="$resolvemsg" <"$GIT_DIR/rebased-patches"
|
git am $git_am_opt --rebasing --resolvemsg="$resolvemsg" <"$GIT_DIR/rebased-patches"
|
||||||
|
|
@ -68,7 +68,7 @@ fi
|
||||||
if test 0 != $ret
|
if test 0 != $ret
|
||||||
then
|
then
|
||||||
test -d "$state_dir" && write_basic_state
|
test -d "$state_dir" && write_basic_state
|
||||||
exit $ret
|
return $ret
|
||||||
fi
|
fi
|
||||||
|
|
||||||
move_to_original_branch
|
move_to_original_branch
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue