41 lines
724 B
Diff
41 lines
724 B
Diff
|
guilt: add support for pushing and tagging
|
||
|
|
||
|
It can be handy to push AND tag at the same time.
|
||
|
|
||
|
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
|
||
|
+
|