File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -222,8 +222,8 @@ do_with_author () {
222
222
}
223
223
224
224
pick_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
227
227
output git rev-parse --verify $sha1 || die " Invalid commit name: $sha1 "
228
228
test -d " $REWRITTEN " &&
229
229
pick_one_preserving_merges " $@ " && return
@@ -232,16 +232,7 @@ pick_one () {
232
232
output git cherry-pick " $@ "
233
233
return
234
234
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 " $@ "
245
236
}
246
237
247
238
pick_one_preserving_merges () {
You can’t perform that action at this time.
0 commit comments