Signed-off-by: Jörg Sommer <joerg@xxxxxxxxxxxx> --- git-rebase--interactive.sh | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index ffd4823..94c6827 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -131,6 +131,10 @@ redo_merge() { fi } +parents_of_commit() { + git rev-list --parents -1 "$1" | cut -d' ' -f2- +} + pick_one () { no_ff= case "$1" in -n) sha1=$2; no_ff=t ;; *) sha1=$1 ;; esac @@ -166,7 +170,7 @@ pick_one_preserving_merges () { fast_forward=t preserve=t new_parents= - for p in $(git rev-list --parents -1 $sha1 | cut -d' ' -f2-) + for p in $(parents_of_commit $sha1) do if test -f "$REWRITTEN"/$p then -- 1.5.4.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html