Meta/update-from-lore: pass --force down to 'git detach'

Junio C Hamano committed Jul 14, 2026 at 14:43 UTC ac7d686d2915a764011e1cbe9a789d56e2f1f635
1 file changed +3 -3
update-from-lore.sh
+3 -3
@@ -5,7 +5,7 @@ while case "$#" in 0) break;; esac
5 do
6 case "$1" in
7 -f | --force)
8 - force=force ;;
8 + force=--force ;;
9 -*)
10 echo >&2 "$0: unknown option '$1'"
11 exit 1 ;;
@@ -24,7 +24,7 @@ above_master=$(git rev-list --first-parent master.. | wc -l)
24 above_next=$(git rev-list --first-parent next.. | wc -l)
25 if test "$above_master" != "$above_next"
26 then
27 - if test "$force" = force
27 + if test "$force" = "--force"
28 then
29 echo >&2 warning: some patches are already in next
30 else
@@ -35,7 +35,7 @@ fi
35
36 MID=
37 OLD=$(git rev-parse HEAD)
38 -git detach || exit
38 +git detach ${force+--force} || exit
39 git rev-list HEAD..$OLD |
40 while read commit
41 do