mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:27:45 +00:00
Ports: Force patch regeneration after resolving conflicts
Otherwise, the post-conflict state will be used as a reference point, and no changes will be detected.
This commit is contained in:
parent
fb049d6913
commit
6f47c53ff9
1 changed files with 6 additions and 3 deletions
|
@ -773,7 +773,9 @@ do_dev() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -d "$workdir" ] || (
|
local force_patch_regeneration='false'
|
||||||
|
|
||||||
|
[ -d "$workdir" ] || {
|
||||||
do_fetch
|
do_fetch
|
||||||
pushd "$workdir"
|
pushd "$workdir"
|
||||||
if [ ! -d ".git" ]; then
|
if [ ! -d ".git" ]; then
|
||||||
|
@ -840,6 +842,7 @@ do_dev() {
|
||||||
>&2 echo "- This patch does not apply, you'll be dropped into a shell to investigate and fix this, quit the shell when the problem is resolved."
|
>&2 echo "- This patch does not apply, you'll be dropped into a shell to investigate and fix this, quit the shell when the problem is resolved."
|
||||||
>&2 echo "Note that the patch needs to be committed into the current repository!"
|
>&2 echo "Note that the patch needs to be committed into the current repository!"
|
||||||
launch_user_shell
|
launch_user_shell
|
||||||
|
force_patch_regeneration='true'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! git diff --quiet >/dev/null 2>&1; then
|
if ! git diff --quiet >/dev/null 2>&1; then
|
||||||
|
@ -860,7 +863,7 @@ do_dev() {
|
||||||
git tag original
|
git tag original
|
||||||
|
|
||||||
popd
|
popd
|
||||||
)
|
}
|
||||||
|
|
||||||
[ -d "$workdir/.git" ] || {
|
[ -d "$workdir/.git" ] || {
|
||||||
>&2 echo "$workdir does not appear to be a git repository."
|
>&2 echo "$workdir does not appear to be a git repository."
|
||||||
|
@ -876,7 +879,7 @@ do_dev() {
|
||||||
local current_hash="$(git -C "$workdir" rev-parse HEAD)"
|
local current_hash="$(git -C "$workdir" rev-parse HEAD)"
|
||||||
|
|
||||||
# If the hashes are the same, we have no changes, otherwise generate patches
|
# If the hashes are the same, we have no changes, otherwise generate patches
|
||||||
if [ "$original_hash" != "$current_hash" ]; then
|
if [ "$original_hash" != "$current_hash" ] || [ "${force_patch_regeneration}" = "true" ]; then
|
||||||
>&2 echo "Note: Regenerating patches as there are changed commits in the port repo (started at $original_hash, now is $current_hash)"
|
>&2 echo "Note: Regenerating patches as there are changed commits in the port repo (started at $original_hash, now is $current_hash)"
|
||||||
rm -fr "${PORT_META_DIR}"/patches/*.patch
|
rm -fr "${PORT_META_DIR}"/patches/*.patch
|
||||||
git -C "$workdir" format-patch --no-numbered --zero-commit --no-signature --full-index refs/tags/import -o "$(realpath "${PORT_META_DIR}/patches")"
|
git -C "$workdir" format-patch --no-numbered --zero-commit --no-signature --full-index refs/tags/import -o "$(realpath "${PORT_META_DIR}/patches")"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue