Re: [PATCH v2 27/30] subtree: allow --squash to be used with --rejoin
- From
Luke Shumaker <lukeshu@lukeshu.com>
- Date
- Apr 26, 2021, 19:58 UTC
- Message-ID
- <87mttkakcp.wl-lukeshu@lukeshu.com>
- In-Reply-To
- <20210426174525.3937858-28-lukeshu@lukeshu.com>
On Mon, 26 Apr 2021 11:45:22 -0600, Luke Shumaker wrote:
Show 17 quoted lines
> @@ -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"
> thenWhoops, that `if ...; then` should put the `then` on its own line.
-- Happy hacking, ~ Luke Shumaker