summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9c9214a)
raw | patch | inline | side by side (parent: 9c9214a)
author | Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> | |
Tue, 28 Dec 2010 09:30:48 +0000 (10:30 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 28 Dec 2010 23:05:50 +0000 (15:05 -0800) |
Before calling 'git cherry-pick', interactive rebase currently checks
if we are rebasing from root (if --root was passed). If we are, the
'--ff' flag to 'git cherry-pick' is omitted. However, according to the
documentation for 'git cherry-pick --ff', "If the current HEAD is the
same as the parent of the cherry-picked commit, then a fast forward to
this commit will be performed.". This should never be the case when
rebasing from root, so it should not matter whether --ff is passed, so
simplify the code by removing the condition.
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
if we are rebasing from root (if --root was passed). If we are, the
'--ff' flag to 'git cherry-pick' is omitted. However, according to the
documentation for 'git cherry-pick --ff', "If the current HEAD is the
same as the parent of the cherry-picked commit, then a fast forward to
this commit will be performed.". This should never be the case when
rebasing from root, so it should not matter whether --ff is passed, so
simplify the code by removing the condition.
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase--interactive.sh | patch | blob | history |
index d20a9b218bd2904698e775cdc1e245c793910a7a..a9f44d81f27d63696aa36ea2cd8fdb932cca133d 100755 (executable)
output git rev-parse --verify $sha1 || die "Invalid commit name: $sha1"
test -d "$REWRITTEN" &&
pick_one_preserving_merges "$@" && return
- if test -n "$rebase_root"
- then
- output git cherry-pick "$@"
- return
- fi
output git cherry-pick $ff "$@"
}
die "Could not skip unnecessary pick commands"
}
-get_saved_options () {
- test -f "$state_dir"/rebase-root && rebase_root=t
-}
-
# Rearrange the todo list that has both "pick sha1 msg" and
# "pick sha1 fixup!/squash! msg" appears in it so that the latter
# comes immediately after the former, and change "pick" to
: > "$state_dir"/interactive || die "Could not mark as interactive"
write_basic_state
-case "$rebase_root" in
-'')
- rm -f "$state_dir"/rebase-root ;;
-*)
- : >"$state_dir"/rebase-root ;;
-esac
if test t = "$preserve_merges"
then
if test -z "$rebase_root"