From dea7ccfea105b7a3c051b758c08aeacda6839de2 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 24 Jul 2026 13:22:28 -0700 Subject: [PATCH] Meta/update-from-lore: support initial import as well --- update-from-lore.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/update-from-lore.sh b/update-from-lore.sh index ad3fcef40e..d4bddcf7e6 100755 --- a/update-from-lore.sh +++ b/update-from-lore.sh @@ -1,5 +1,18 @@ #!/bin/sh +afresh () { + if git symbolic-ref -q HEAD + then + echo >&2 "HEAD not detached" + exit 1 + fi + b4 am -o- -t "$1" | + tee ./+b4am.mbx | + git am -s3 && rm -f ./+b4am.mbx + + exit $? +} + force= while case "$#" in 0) break;; esac do @@ -17,6 +30,7 @@ done case "$#" in 0) : happy ;; +1) afresh "$1" ;; *) echo >&2 "$0: extra arguments" ;; esac