[PATCH] qf: Add more wiggle helpers.

Rodrigo Vivi rodrigo.vivi at intel.com
Wed Jan 24 23:00:50 UTC 2018


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.

Cc: Paulo Zanoni <paulo.r.zanoni at intel.com>
Cc: Michel Thierry <michel.thierry at intel.com>
Cc: James Ausmus <james.ausmus at intel.com>
Cc: Lucas De Marchi <lucas.demarchi at intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
 qf | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/qf b/qf
index b28ca70ddcfd..e4bb2e95e17d 100755
--- a/qf
+++ b/qf
@@ -432,6 +432,38 @@ function qf_stage
 	echo All applied patches successfully staged
 }
 
+function qf_wiggle_clean
+{
+	cd_toplevel
+	conflict_files=$(git status --porcelain | grep "\.rej" | cut -c4-)
+	for file in $conflict_files ; do
+		echo cleaning $file ${file%.rej}.porig
+		rm -rf $file ${file%.rej}.porig
+	done
+}
+
+function qf_conflict_files
+{
+	cd_toplevel
+	conflict_files=$(git status --porcelain | grep "\.rej" | cut -c4-)
+
+	if [[ $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
 {
-- 
2.13.6



More information about the dim-tools mailing list