Re: [PATCH v2 27/30] subtree: allow --squash to be used with --rejoin
From: Luke Shumaker <hidden>
Date: 2021-04-26 19:58:49
From: Luke Shumaker <hidden>
Date: 2021-04-26 19:58:49
On Mon, 26 Apr 2021 11:45:22 -0600, Luke Shumaker wrote:
@@ -857,10 +874,12 @@ cmd_split () { then debug "Merging split branch into HEAD..." latest_old=$(cache_get latest_old) || exit $? - git merge -s ours \ - --allow-unrelated-histories \ - -m "$(rejoin_msg "$dir" "$latest_old" "$latest_new")" \ - "$latest_new" >&2 || exit $? + arg_addmerge_message="$(rejoin_msg "$dir" "$latest_old" "$latest_new")" || exit $? + if test -z "$(find_latest_squash "$dir")"; then + cmd_add "$latest_new" >&2 || exit $? + else + cmd_merge "$latest_new" >&2 || exit $? + fi fi if test -n "$arg_split_branch" then
Whoops, that `if ...; then` should put the `then` on its own line. -- Happy hacking, ~ Luke Shumaker