Commit 9ebe5840 authored by Rodrigo Vivi's avatar Rodrigo Vivi

qf: Add more wiggle helpers.

When working with wiggle to easily solve rebasing
conflicts we also need to be able to easily continue,
easily see the impacted files and easily clean the
repo to avoid ending up with many .rej and .porig files.

v2: Remove -r from rm. (Lucas)
    Use -z instead of '== ""' comparison. (Lucas)
    Add documentation to the helpers. (Required by make check).

Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Michel Thierry <michel.thierry@intel.com>
Cc: James Ausmus <james.ausmus@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: 's avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: 's avatarLucas De Marchi <lucas.demarchi@intel.com>
parent 7d4df0ed
......@@ -421,6 +421,39 @@ function qf_stage
echo All applied patches successfully staged
}
function qf_wiggle_clean
{
cd_toplevel
conflict_files=$(git status -u --porcelain=2 -- '*.rej' | grep -E "^?" | cut -d' ' -f2)
for file in $conflict_files ; do
echo cleaning $file ${file%.rej}.porig
rm -f $file ${file%.rej}.porig
done
}
function qf_conflict_files
{
cd_toplevel
conflict_files=$(git status -u --porcelain=2 -- '*.rej' | grep -E "^?" | cut -d' ' -f2)
if [[ -z $conflict_files ]] ; then
echo No conflicted files found!
else
echo Conflict found on:
for file in $conflict_files ; do
echo ${file%.rej}
done
fi
}
function qf_continue
{
cd_toplevel
qf_wiggle_clean
quilt push -a
}
qf_alias_wp=wiggle_push
function qf_wiggle_push
{
......
......@@ -200,6 +200,22 @@ Resets the git index and then (re-)applies all currently applied
quilt patches to it. Useful to use git tools like git diff to
compare changes against the quilt patch state.
conflict-files
--------------
List the files that are probably in a unresolved stage of conflict.
Wiggle push will leave .rej and .porig files behind.
This is useful for manual conflict solving during the quilt rebase.
continue
--------
Clean up after wiggle and continue with quilt push -a to continue
applying and rebasing all the following patches.
wiggle-clean
------------
Clean up all .rej and .porig files that wiggle probably
left behind.
wiggle-push|wp
--------------
Force-push the next patch and then wiggle in any conflicts. Does
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment