File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -222,8 +222,8 @@ do_with_author () {
222222}
223223
224224pick_one () {
225- no_ff=
226- case " $1 " in -n) sha1=$2 ; no_ff=t ;; * ) sha1=$1 ;; esac
225+ ff=--ff
226+ case " $1 " in -n) sha1=$2 ; ff= ;; * ) sha1=$1 ;; esac
227227 output git rev-parse --verify $sha1 || die " Invalid commit name: $sha1 "
228228 test -d " $REWRITTEN " &&
229229 pick_one_preserving_merges " $@ " && return
@@ -232,16 +232,7 @@ pick_one () {
232232 output git cherry-pick " $@ "
233233 return
234234 fi
235- parent_sha1=$( git rev-parse --verify $sha1 ^) ||
236- die " Could not get the parent of $sha1 "
237- current_sha1=$( git rev-parse --verify HEAD)
238- if test -z " $no_ff " && test " $current_sha1 " = " $parent_sha1 "
239- then
240- output git reset --hard $sha1
241- output warn Fast-forward to $( git rev-parse --short $sha1 )
242- else
243- output git cherry-pick " $@ "
244- fi
235+ output git cherry-pick $ff " $@ "
245236}
246237
247238pick_one_preserving_merges () {
You can’t perform that action at this time.
0 commit comments