Skip to content

Commit f24cd41

Browse files
winksavillegitster
authored andcommitted
rebase: remove merges_option and a blank line
merges_option is unused in git_rebase__interactive and always empty in git_rebase__interactive__preserve_merges so it can be removed. Signed-off-by: Wink Saville <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ca3d446 commit f24cd41

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

git-rebase--interactive.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -961,8 +961,6 @@ git_rebase__interactive () {
961961
setup_reflog_action
962962
init_basic_state
963963

964-
merges_option="--no-merges --cherry-pick"
965-
966964
init_revisions_and_shortrevisions
967965

968966
git rebase--helper --make-script ${keep_empty:+--keep-empty} \
@@ -996,22 +994,16 @@ git_rebase__interactive__preserve_merges () {
996994
die "$(gettext "Could not init rewritten commits")"
997995
fi
998996

999-
# No cherry-pick because our first pass is to determine
1000-
# parents to rewrite and skipping dropped commits would
1001-
# prematurely end our probe
1002-
merges_option=
1003-
1004997
init_revisions_and_shortrevisions
1005998

1006999
format=$(git config --get rebase.instructionFormat)
10071000
# the 'rev-list .. | sed' requires %m to parse; the instruction requires %H to parse
1008-
git rev-list $merges_option --format="%m%H ${format:-%s}" \
1001+
git rev-list --format="%m%H ${format:-%s}" \
10091002
--reverse --left-right --topo-order \
10101003
$revisions ${restrict_revision+^$restrict_revision} | \
10111004
sed -n "s/^>//p" |
10121005
while read -r sha1 rest
10131006
do
1014-
10151007
if test -z "$keep_empty" && is_empty_commit $sha1 && ! is_merge_commit $sha1
10161008
then
10171009
comment_out="$comment_char "

0 commit comments

Comments
 (0)