rebase-interactive: simplify pick_on_preserving_merges
Use compound if statement instead of nested if statements to simplify pick_on_preserving_merges. Signed-off-by: Wink Saville <wink@saville.com> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
90bbd502d5
commit
0c4030ca26
@ -307,9 +307,7 @@ pick_one_preserving_merges () {
|
|||||||
esac
|
esac
|
||||||
sha1=$(git rev-parse $sha1)
|
sha1=$(git rev-parse $sha1)
|
||||||
|
|
||||||
if test -f "$state_dir"/current-commit
|
if test -f "$state_dir"/current-commit && test "$fast_forward" = t
|
||||||
then
|
|
||||||
if test "$fast_forward" = t
|
|
||||||
then
|
then
|
||||||
while read current_commit
|
while read current_commit
|
||||||
do
|
do
|
||||||
@ -318,7 +316,6 @@ pick_one_preserving_merges () {
|
|||||||
rm "$state_dir"/current-commit ||
|
rm "$state_dir"/current-commit ||
|
||||||
die "$(gettext "Cannot write current commit's replacement sha1")"
|
die "$(gettext "Cannot write current commit's replacement sha1")"
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
echo $sha1 >> "$state_dir"/current-commit
|
echo $sha1 >> "$state_dir"/current-commit
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user