M7350/oe-core/meta/recipes-devtools/guilt/files/guilt-push.patch
2024-09-09 08:52:07 +00:00

43 lines
770 B
Diff

guilt: add support for pushing and tagging
It can be handy to push AND tag at the same time.
Upstream-Status: Inappropriate [oe-specific]
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
guilt-push | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
--- a/guilt-push
+++ b/guilt-push
@@ -19,7 +19,11 @@ while [ $# -gt 0 ]; do
-n)
num=t
;;
- *)
+ -t|--t)
+ tag=$2
+ shift
+ ;;
+ *)
break
;;
esac
@@ -126,3 +130,13 @@ do
fi
done
+ret=$?
+if [ $ret -ne 0 ]; then
+ exit $ret
+fi
+
+# if a tag was specified, tag the tree now.
+if [ -n "$tag" ]; then
+ git-rev-parse HEAD > "$GIT_DIR/refs/tags/$tag"
+fi
+